
                            S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSK
Jr  S	 rS
 rS rS r\	R                   \	R"                  " \	R$                  R&                  5       " S S\	R(                  5      5       5       r\	R"                  " \	R$                  R,                  5       " S S\5      5       r\	R"                  " \	R$                  R0                  5       " S S\5      5       rg)z#bigtable app profiles list command.    )absolute_import)division)unicode_literalsN)app_profiles)base)	argumentsc                     SU ;   a  SU S   ;   a  U S   S   $ SU ;   a!  SU S   ;   a  SR                  U S   S   5      $ gg)z/Extracts the routing info from the app profile.singleClusterRouting	clusterIdmultiClusterRoutingUseAny
clusterIds,MULTI_CLUSTER_USE_ANY )joinapp_profiles    )lib/surface/bigtable/app_profiles/list.py!_TransformAppProfileToRoutingInfor      s_    +[!788-.{;;"k1{#>??XXk"=>|LMM"	    c                     SU ;   a  gg)z1Extracts the isolation mode from the app profile.dataBoostIsolationReadOnlyDATA_BOOST_ISOLATION_READ_ONLYSTANDARD_ISOLATION r   s    r   #_TransformAppProfileToIsolationModer   (   s    ![0+	r   c                 @    SU ;   a  gSU ;   a  SU S   ;   a  U S   S   $ g)BExtracts the Data Boot compute billing owner from the app profile.r   r   standardIsolationpriorityPRIORITY_HIGHr   r   s    r   /_TransformAppProfileToStandardIsolationPriorityr"   /   s7    ![0[(
$78
8*+J77r   c                 2    SU ;   a  SU S   ;   a  U S   S   $ g)r   r   computeBillingOwnerr   r   r   s    r   2_TransformAppProfileToDataBoostComputeBillingOwnerr%   <   s/     #k1
;/K#L
L345JKKr   c                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	ListAppProfilesGAG   List Bigtable app profiles.EXAMPLESzw          To list all app profiles for an instance, run:

            $ {command} --instance=my-instance-id

          c                     [         R                  " U S5        U R                  R                  S[        05        U R                  R                  S5        g )Nto list app profiles forroutingInfoz
          table(
            name.basename():sort=1,
            description:wrap,
            routingInfo():wrap:label=ROUTING,
            singleClusterRouting.allowTransactionalWrites.yesno("Yes"):label=TRANSACTIONAL_WRITES
          )
        )r   AddInstanceResourceArgdisplay_infoAddTransformsr   	AddFormatparsers    r   ArgsListAppProfilesGA.ArgsV   sM    $$V-GH
%%8'  !! # r   c                 v    UR                   R                  R                  5       n[        R                  " U5      $ )zThis is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  Some value that we want to have printed later.
)CONCEPTSinstanceParser   List)selfargsinstance_refs      r   RunListAppProfilesGA.Runi   s-     ==))//1L\**r   r   N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr4   r>   __static_attributes__r   r   r   r'   r'   G   s=     $ 
//  -  $+r   r'   c                   (    \ rS rSrSr\S 5       rSrg)ListAppProfilesBetaw   r)   c                     [         R                  " U S5        U R                  R                  [        [
        [        [        S.5        U R                  R                  S5        g Nr,   )r-   isolationModestandardIsolationPrioritydataBoostComputeBillingOwnera  
          table(
            name.basename():sort=1,
            description:wrap,
            routingInfo():wrap:label=ROUTING,
            singleClusterRouting.allowTransactionalWrites.yesno("Yes"):label=TRANSACTIONAL_WRITES,
            isolationMode():label=ISOLATION_MODE,
            standardIsolationPriority():label=STANDARD_ISOLATION_PRIORITY,
            dataBoostComputeBillingOwner():label=DATA_BOOST_COMPUTE_BILLING_OWNER
          )
        	r   r.   r/   r0   r   r   r"   r%   r1   r2   s    r   r4   ListAppProfilesBeta.Args{   U    $$V-GH
%%8<; ?	' 	 !! 
# 
r   r   Nr@   rA   rB   rC   rD   rH   r4   rI   r   r   r   rK   rK   w       # r   rK   c                   (    \ rS rSrSr\S 5       rSrg)ListAppProfilesAlpha   r)   c                     [         R                  " U S5        U R                  R                  [        [
        [        [        S.5        U R                  R                  S5        g rN   rR   r2   s    r   r4   ListAppProfilesAlpha.Args   rT   r   r   NrU   r   r   r   rX   rX      rV   r   rX   )rD   
__future__r   r   r   rE   googlecloudsdk.api_lib.bigtabler   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   r   r   r"   r%   DefaultUniverseOnlyReleaseTracksReleaseTrackGAListCommandr'   BETArK   ALPHArX   r   r   r   <module>rg      s    * &  '  8 ( 9	
 D%%(()++(( ++ * ++\ D%%**++  ,B D%%++,.  -r   