
    "                        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S	KJr  SS
KJr  SSKJr  \R"                  \R$                  " \R&                  R(                  5       " S S\R*                  5      5       5       r\R$                  " \R&                  R.                  5       " S S\5      5       r\R$                  " \R&                  R2                  5       " S S\5      5       rg)z%bigtable app profiles update command.    )absolute_import)division)unicode_literalsN)	HttpError)app_profiles)util)base)	arguments)logc                   \    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
S rSrg	)
UpdateAppProfile   Update a Bigtable app profile.EXAMPLESa            To update an app profile to use a multi-cluster routing policy, run:

            $ {command} my-app-profile-id --instance=my-instance-id --route-any

          To update an app profile to use a single-cluster routing policy that
          routes all requests to `my-cluster-id` and allows transactional
          writes, run:

            $ {command} my-app-profile-id --instance=my-instance-id --route-to=my-cluster-id --transactional-writes

          To update the description for an app profile, run:

            $ {command} my-app-profile-id --instance=my-instance-id --description="New description"

          To update the request priority for an app profile to PRIORITY_LOW, run:

            $ {command} my-app-profile-id --instance=my-instance-id --priority=PRIORITY_LOW

          To update an app profile to enable row-affinity routing, run:

            $ {command} my-app-profile-id --instance=my-instance-id --route-any --row-affinity

          To update an app profile to enable Data Boost which bills usage to the host project, run:

            $ {command} my-app-profile-id --instance=my-instance-id --data-boost --data-boost-compute-billing-owner=HOST_PAYS

          c                     [         R                  " U S5        [         R                  " U 5      R                  SSS9R	                  SS9R                  5       R                  S5      R                  5         g Nz	to updatezapp profileF)requiredupdater
   AddAppProfileResourceArgArgAdderAddDescriptionAddAppProfileRoutingAddIsolationAddForceAddAsyncparsers    +lib/surface/bigtable/app_profiles/update.pyArgsUpdateAppProfile.ArgsC   T    &&v{;6"		6		u		-		(		    c                    [         R                  " UUR                  UR                  UR                  UR
                  UR                  UR                  UR                  UR                  UR                  UR                  S9$ am  Updates an AppProfile with the given arguments.

Args:
  app_profile_ref: A resource reference of the new app profile.
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Raises:
  ConflictingArgumentsException,
  OneOfArgumentsRequiredException:
    See app_profiles.Update(...)

Returns:
  Long running operation.
)
clusterdescriptionmulti_clusterrestrict_totransactional_writesrow_affinitypriority
data_boost data_boost_compute_billing_ownerforcer   Updateroute_tor'   	route_anyr)   r*   r+   r,   r-   r.   r/   selfapp_profile_refargss      r   _UpdateAppProfile"UpdateAppProfile._UpdateAppProfileO   j      $$nn$$!66&&??)-)N)Njj r#   c                    UR                   R                  R                  5       n U R                  X!5      n[        R
                  " U5      nUR                  (       a5  [        R                  " USR                  UR                  5       5      SS9  U$ [        R                  " USR                  UR                  5       5      5      $ ! [         a   n[        R                  " U5         SnAgSnAff = f)a/  This 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.

Raises:
  ConflictingArgumentsException,
  OneOfArgumentsRequiredException:
    See _UpdateAppProfile(...)

Returns:
  Updated resource.
zbigtable app profile {0}T)kindis_asyncz!Updating bigtable app profile {0}N)CONCEPTSapp_profileParser8   r   GetOperationRefasync_r   UpdatedResourceformatNameAwaitAppProfiler   FormatErrorMessages)r5   r7   r6   resultoperation_refes         r   RunUpdateAppProfile.Runm   s     mm//557O%%o<f **62m	+22?3G3G3IJ	

 !!

-
4
4_5I5I5K
L   "
q!!"s   C 
C1C,,C1 N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr    r8   rK   __static_attributes__rM   r#   r   r   r      sA     ' (// # -> 	 	<"r#   r   c                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	UpdateAppProfileBeta   r   r   a            To update an app profile to use a multi-cluster routing policy, run:

            $ {command} my-app-profile-id --instance=my-instance-id --route-any

          To update an app profile to use a single-cluster routing policy that
          routes all requests to `my-cluster-id` and allows transactional
          writes, run:

            $ {command} my-app-profile-id --instance=my-instance-id --route-to=my-cluster-id --transactional-writes

          To update the description for an app profile, run:

            $ {command} my-app-profile-id --instance=my-instance-id --description="New description"

          To update the request priority for an app profile to PRIORITY_LOW, run:

            $ {command} my-app-profile-id --instance=my-instance-id --priority=PRIORITY_LOW

          To update an app profile to enable Data Boost which bills usage to the host project, run:

            $ {command} my-app-profile-id --instance=my-instance-id --data-boost --data-boost-compute-billing-owner=HOST_PAYS

          To update an app profile to enable row-affinity routing, run:

            $ {command} my-app-profile-id --instance=my-instance-id --route-any --row-affinity

          c                     [         R                  " U S5        [         R                  " U 5      R                  SSS9R	                  SS9R                  5       R                  S5      R                  5         g r   r   r   s    r   r    UpdateAppProfileBeta.Args   r"   r#   c                    [         R                  " UUR                  UR                  UR                  UR
                  UR                  UR                  UR                  UR                  UR                  UR                  S9$ r%   r0   r4   s      r   r8   &UpdateAppProfileBeta._UpdateAppProfile   r:   r#   rM   N)rN   rO   rP   rQ   rR   rS   rT   rU   rV   r    r8   rW   rM   r#   r   rY   rY      s:    & (// # -> 	 	r#   rY   c                   .    \ rS rSrSr\S 5       rS rSrg)UpdateAppProfileAlpha   r   c                     [         R                  " U S5        [         R                  " U 5      R                  SSS9R	                  SS9R                  5       R                  S5      R                  5         g r   r   r   s    r   r    UpdateAppProfileAlpha.Args   s[    &&v{;6"		6		 
 

 
	(		r#   c                    [         R                  " UUR                  UR                  UR                  UR
                  UR                  UR                  UR                  UR                  UR                  UR                  S9$ r%   r0   r4   s      r   r8   'UpdateAppProfileAlpha._UpdateAppProfile   r:   r#   rM   N)	rN   rO   rP   rQ   rR   rV   r    r8   rW   rM   r#   r   r`   r`      s    & r#   r`   )rR   
__future__r   r   r   rS   apitools.base.py.exceptionsr   googlecloudsdk.api_lib.bigtabler   r   googlecloudsdk.callioper	   #googlecloudsdk.command_lib.bigtabler
   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksReleaseTrackGACreateCommandr   BETArY   ALPHAr`   rM   r#   r   <module>rs      s    , &  '  1 8 0 ( 9 # D%%(()nt)) n * nb D%%**+J+ J ,JZ D%%++,-0 - --r#   