
    F                     8   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddl	mZ dd	lmZ  ej                  ej                   j"                  ej                   j$                  ej                   j&                         G d
 dej(                               Zy)zCommand to list assets.    )absolute_import)division)unicode_literals)client_util)base)flags)utils)common_argsc                   0    e Zd ZdZdddZed        Zd Zy)ListzList the Cloud assets.aJ        List the Cloud assets. Note
      that to list a project different from the project you want to bill, you
      can use  --billing-project or authenticate with a service account.
      See https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/gcloud-asset
      for examples of using a service account.
      a        To list a snapshot of assets of type 'compute.googleapis.com/Disk' in
      project 'test-project' at '2019-03-05T00:00:00Z', run:

        $ {command} --project='test-project' --asset-types='compute.googleapis.com/Disk' --snapshot-time='2019-03-05T00:00:00Z'
      )DESCRIPTIONEXAMPLESc                    | j                  d      }t        j                  |d       t        j                  d      j                  |       t        j                  |d       t        j                  |        t        j                  |        t        j                  |        t        j                  |        t        j                  j                  |        y )NT)requiredz3The ID of the organization which is the root asset.z$The project which is the root asset.)help_text_to_prependz-The ID of the folder which is the root asset.)add_mutually_exclusive_groupr   AddOrganizationArgsr
   ProjectArgumentAddToParserAddFolderArgsAddSnapshotTimeArgsAddAssetTypesArgsAddListContentTypeArgsAddRelationshipTypesArgsr   URI_FLAGRemoveFromParser)parserparent_groups     lib/surface/asset/list.pyArgsz	List.Args5   s    666EL	KMCk,	GI	f%	F#	  (	""6*MM""6*    c                     t        j                  |j                  |j                  |j                        }t        j                  |      }|j                  |      S )N)asset_utilsGetParentNameForExportorganizationprojectfolderr   AssetListClientr   )selfargsparentclients       r   RunzList.RunE   sF    //0A0A4<<04=F((0F;;tr!   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr    r-    r!   r   r   r      s1     


-& + +r!   r   N)r1   
__future__r   r   r   googlecloudsdk.api_lib.assetr   googlecloudsdk.callioper    googlecloudsdk.command_lib.assetr   r	   r#   $googlecloudsdk.command_lib.util.argsr
   ReleaseTracksReleaseTrackALPHABETAGAListCommandr   r4   r!   r   <module>r@      s{     &  ' 4 ( 2 A < D%%++T->->-C-C%%((*+4 +*+r!   