
                             S 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	S r
S	 rS
 rS rS rS rS rS rS rS rg)a"  Common flags for some of the Looker commands.

Flags are specified with functions that take in a single argument, the parser,
and add the newly constructed flag to that parser.

Example:

def AddFlagName(parser):
  parser.add_argument(
    '--flag-name',
    ... // Other flag details.
  )
    )concepts)
completers)concept_parsers)presentation_specsc                   (   ^  \ rS rSrU 4S jrSrU =r$ )InstanceCompleter#   c                 4   > [         [        U ]
  " SSSS.UD6  g )N#looker.projects.locations.instanceszlooker instances list)
collectionlist_command )superr   __init__)selfkwargs	__class__s     .lib/googlecloudsdk/command_lib/looker/flags.pyr   InstanceCompleter.__init__%   s(    	
T+ 8,     r   )__name__
__module____qualname____firstlineno__r   __static_attributes____classcell__)r   s   @r   r   r   #   s     r   r   c                 0    U R                  SS[        SS9  g )Nz
--instanceTz               ID of the instance or fully qualified identifier for the instance.
              To set the instance attribute:

              - provide the argument --instance on the command line.
          )required	completerhelp)add_argumentr   parsers    r   AddInstancer$   -   s#    !	  
r   c                 b    [         R                  " [        U5      /5      R                  U 5        g )N)r   ConceptParserGetInstancePresentationSpecAddToParser)r#   instance_concept_strs     r   AddInstanceConceptr*   ;   s&    "#789Kr   c                 H    U R                  SSS9nUR                  SSSSS9  g)	zRegister flags for KMS Key.Ta,  Key resource - The Cloud KMS (Key Management Service) cryptokey that will be used to protect the Looker instance and backups. The 'Looker Service Agent' service account must hold role 'Cloud KMS CryptoKey Encrypter'. The arguments in this group can be used to specify the attributes of this resource.)r   r    z	--kms-keyKMS_KEYz.Fully qualified identifier (name) for the key.)metavarr   r    N	add_groupr!   )r#   	key_groups     r   AddKmsKeyGroupr1   A   sA    E  	) ;	  r   c                 H    U R                  SSSS9nUR                  SSSS9  g)	z"Register flags for Target GCS URI.TzJExport Destination - The path and storage where the export will be stored.mutexr   r    z--target-gcs-uriTARGET_GCS_URIzThe path to the folder in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/folderName`. The Looker Service Agent should have the role Storage Object Creator.r-   r    Nr.   )r#   target_groups     r   AddTargetGcsUriGroupr8   V   sC    !!	 " , O	  r   c                 H    [        U S5        [        U 5        [        U 5        g)z'Register flags Export Instance command.zHArguments and flags that specify the Looker instance you want to export.N)r*   r8   r1   r"   s    r   AddExportInstanceArgsr:   k   s$     vr   c                 `    [        U S5        U R                  SSSS9nUR                  SSSS9  g	)
z'Register flags Import Instance command.zHArguments and flags that specify the Looker instance you want to import.TzRImport Destination - The path and storage where the import will be retrieved from.r3   z--source-gcs-uriSOURCE_GCS_URIzThe path to the folder in Google Cloud Storage where the import will be retrieved from. The URI is in the form `gs://bucketName/folderName`.r6   N)r*   r/   r!   )r#   source_groups     r   AddImportInstanceArgsr>   x   sT     !!	 " , +	  r   c                  0    [         R                  " SS5      $ )NregionzThe region of the {resource}.r    ResourceParameterAttributeConfigr   r   r   GetRegionAttributeConfigrC      s    		2	2/
 r   c                  0    [         R                  " SS5      $ )NinstancezThe instance of the {resource}.rA   r   r   r   GetInstanceAttributeConfigrF      s    		2	23
 r   c                  n    [         R                  " SS[         R                  [        5       [	        5       S9$ )Nr   rE   )
projectsIdlocationsIdinstancesId)r   ResourceSpec DEFAULT_PROJECT_ATTRIBUTE_CONFIGrC   rF   r   r   r   GetInstanceResourceSpecrM      s0    			+::*,,.
 r   c                 @    [         R                  " S[        5       U SS9$ )NrE   T)r   )r   ResourcePresentationSpecrM   )
group_helps    r   r'   r'      s"    		4	4)+Z$
 r   N)__doc__ googlecloudsdk.calliope.conceptsr   googlecloudsdk.command_lib.utilr   (googlecloudsdk.command_lib.util.conceptsr   r   ListCommandCompleterr   r$   r*   r1   r8   r:   r>   rC   rF   rM   r'   r   r   r   <module>rV      s\    6 6 D G
77 **
8r   