
                         D   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	K	Jr  SS
KJr  \R                   " \R"                  R$                  \R"                  R&                  \R"                  R(                  5       " S S\R*                  5      5       rg)zCommand QueryAsset API.    )absolute_import)division)unicode_literals)client_util)base)asset_query_printer)flags)utils)common_argsc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Query   zQuery the Cloud assets.zp      Issue an analytical query on Cloud assets using a BigQuery Standard SQL
      compatible statement.
      a_        To count the number of compute instances, run:

        $ {command} --project='test-project' --statement='SELECT * FROM compute_googleapis_com_Instance'

      To see the query result of the previous job, pass the job-reference from the previous response:

        $ {command} --project='test-project' --job-reference=<job-reference-from>
      )DESCRIPTIONEXAMPLESc                 \   U R                  SS9n[        R                  " US5        [        R                  " SS9R                  U5        [        R                  " US5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        U R                  R                  [        R                   5        [        R"                  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_prependz-The ID of the folder which is the root asset.)add_mutually_exclusive_groupr	   AddOrganizationArgsr   ProjectArgumentAddToParserAddFolderArgsAddQueryArgsAddPageSizeAddPageToken
AddTimeoutAddTimeArgsAddQuerySystemBigQueryArgsdisplay_info	AddFormatr   ASSET_QUERY_PRINTER_FORMATAssetQueryPrinterRegister)parserparent_groups     lib/surface/asset/query.pyArgs
Query.Args6   s    666EL	KMCk,	GI	v	f	v	V	f	$$V,
!!668 ))226:    c                     [         R                  " UR                  UR                  UR                  5      n[
        R                  " U5      nUR                  U5      nU$ )N)asset_utilsGetParentNameForExportorganizationprojectfolderr   AssetQueryClientr   )selfargsparentclientresps        r&   Run	Query.RunL   sJ    //0A0A4<<04=F))&1F<<DKr)    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr'   r6   __static_attributes__r8   r)   r&   r   r      s1      



-& ; ;*r)   r   N)r=   
__future__r   r   r   googlecloudsdk.api_lib.assetr   googlecloudsdk.callioper    googlecloudsdk.command_lib.assetr   r	   r
   r+   $googlecloudsdk.command_lib.util.argsr   ReleaseTracksReleaseTrackALPHABETAGACommandr   r8   r)   r&   <module>rL      sz     &  ' 4 ( @ 2 A < D%%++T->->-C-C%%((*3DLL 3*3r)   