
    
                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr   " S	 S
\R                  5      rg)z!Command to get history of assets.    )absolute_import)division)unicode_literals)client_util)base)flags)common_argsc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	
GetHistory   z=Get the update history of assets that overlaps a time window.EXAMPLESa        To get the history of asset metadata for
      '//compute.googleapis.com/projects/test-project/zones/us-central1-f/instances/instance1'
      between '2018-10-02T15:01:23.045Z' and '2018-12-05T13:01:21.045Z', run:

        $ {command} --project='test-project' --asset-names='//compute.googleapis.com/projects/test-project/zones/us-central1-f/instances/instance1' --start-time='2018-10-02T15:01:23.045Z' --end-time='2018-12-05T13:01:21.045Z' --content-type='resource'

      To get the history of asset iam policy for
      '//cloudresourcemanager.googleapis.com/projects/10179387634'
      between '2018-10-02T15:01:23.045Z' and '2018-12-05T13:01:21.045Z', and
      project '10179387634' is in organization '1060499660910', run:

        $ {command} --organization='1060499660910' --asset-names='//cloudresourcemanager.googleapis.com/projects/10179387634' --start-time='2018-10-02T15:01:23.045Z' --end-time='2018-12-05T13:01:21.045Z' --content-type='iam-policy'
      c                 p   U R                  SS9n[        R                  " US5        [        R                  " SS9R                  U5        [        R                  " U 5        [        R                  " U SS9  [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        g )NT)requiredz3The ID of the organization which is the root asset.z$The project which is the root asset.)help_text_to_prepend)add_mutually_exclusive_groupr   AddOrganizationArgsr	   ProjectArgumentAddToParserAddAssetNamesArgsAddContentTypeArgsAddRelationshipTypesArgsAddStartTimeArgsAddEndTimeArgs)parserparent_groups      lib/surface/asset/get_history.pyArgsGetHistory.Args0   s    666EL	KMCk,	F#	Vd3	""6*	6"	     c                 N    [         R                  " 5       nUR                  U5      $ )N)r   GetHistoryClientr   )selfargsclients      r   RunGetHistory.Run>   s!    ))+FT""r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r%   __static_attributes__r'   r   r   r   r      s/    E 
-$ ! !#r   r   N)r,   
__future__r   r   r   googlecloudsdk.api_lib.assetr   googlecloudsdk.callioper    googlecloudsdk.command_lib.assetr   $googlecloudsdk.command_lib.util.argsr	   Commandr   r'   r   r   <module>r6      s/    ( &  ' 4 ( 2 <%# %#r   