
    v                        S 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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                  R*                  5       " S S\5      5       rg)z#bigtable app profiles list command.    N)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      sa     +
%;<
<-.{;;"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                 \    U R                  S5      (       a  U S   R                  S5      b  gg)z:Extracts whether memory layer is enabled from app profile.r   memoryConfigYesNo)getr   s    r   2_TransformAppProfileToStandardIsolationMemoryLayerr%   ;   s1     oo)**
)
*
.
.~
>
J	r   c                 2    SU ;   a  SU S   ;   a  U S   S   $ g)r   r   computeBillingOwnerr   r   r   s    r   2_TransformAppProfileToDataBoostComputeBillingOwnerr(   E   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)	ListAppProfilesGAP   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.Args^   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.Runq   s-     ==))//1L\**r   r   N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr7   rA   __static_attributes__r   r   r   r*   r*   P   s<     $ (// # -  $+r   r*   c                   (    \ rS rSrSr\S 5       rSrg)ListAppProfilesBeta   r,   c                     [         R                  " U S5        U R                  R                  [        [
        [        [        S.5        U R                  R                  S5        g )Nr/   )r0   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   r1   r2   r3   r   r   r   r(   r4   r5   s    r   r7   ListAppProfilesBeta.Args   sU    $$V-GH
%%8<; ?	' 	 !! 
# 
r   r   NrC   rD   rE   rF   rG   rK   r7   rL   r   r   r   rN   rN      s    # r   rN   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 )Nr/   )r0   rQ   rR   standardIsolationMemoryLayerrS   a  
          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,
            standardIsolationMemoryLayer():label=STANDARD_ISOLATION_MEMORY_LAYER,
            dataBoostComputeBillingOwner():label=DATA_BOOST_COMPUTE_BILLING_OWNER
          )
        )
r   r1   r2   r3   r   r   r   r%   r(   r4   r5   s    r   r7   ListAppProfilesAlpha.Args   sZ    $$V-GH
%%8<; ? ?'   !! # r   r   NrU   r   r   r   rW   rW      s    # r   rW   )rG   rH   googlecloudsdk.api_lib.bigtabler   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   r   r   r   r%   r(   DefaultUniverseOnlyReleaseTracksReleaseTrackGAListCommandr*   BETArN   ALPHArW   r   r   r   <module>rf      s    *  8 ( 9
 D%%(()*+(( *+ * *+Z D%%**++  ,B D%%++,". " -"r   