
    C                     :   S 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
  \R                  \R                  " \R                  R                  \R                  R                  \R                  R                   5       " S S	\R"                  5      5       5       rg)
z$Bigtable logical views list command.    N)logical_views)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	)
UpdateLogicalView   zUpdate a Bigtable logical view.EXAMPLESaW            To update a logical view to a new query, run:

            $ {command} my-logical-view-id --instance=my-instance-id --query="SELECT my-column-family2 FROM my-table"

          To enable deletion protection on a logical view, run:

            $ {command} my-logical-view-id --instance=my-instance-id --deletion-protection

          c                    [         R                  " U S5        U R                  SS9n[         R                  " U5      nUR	                  5         UR                  5         [         R                  " U 5      R                  5         g)z Register flags for this command.z	to updateT)requiredN)r   AddLogicalViewResourceArg	add_groupArgAdderAddDeletionProtectionAddViewQueryAddAsync)parserupdate_group	arg_adders      ,lib/surface/bigtable/logical_views/update.pyArgsUpdateLogicalView.Args.   sf     ''<##T#2L""<0I##%v'')    c                 X    [         R                  " XR                  UR                  5      $ )a  Updates a logical view with the given arguments.

Args:
  logical_view_ref: A resource reference of the new logical view.
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  Long running operation.
)r   Updatequerydeletion_protection)selflogical_view_refargss      r   _UpdateLogicalView$UpdateLogicalView._UpdateLogicalView9   s&     **d&>&> r   c                    UR                   R                  R                  5       nU R                  X!5      nUR                  (       dJ  [
        R                  " U5      n[
        R                  " USR                  UR                  5       5      5      $ [        R                  " UR                  5       SUR                  S9  g)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:
  Updated resource.
zUpdating logical view {0}zlogical view)kindis_asyncN)CONCEPTSlogical_viewParser"   async_r   GetOperationRefAwaitLogicalViewformatNamer   UpdatedResource)r   r!   r    	operationoperation_refs        r   RunUpdateLogicalView.RunH   s     }}11779''(8?I;;**95m""

%
,
,-=-B-B-D
E 
 nt{{ r    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r"   r2   __static_attributes__r4   r   r   r	   r	      sA    
 ( (// 	# 	- * *r   r	   )r9   r:   googlecloudsdk.api_lib.bigtabler   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   googlecloudsdk.corer   UniverseCompatibleReleaseTracksReleaseTrackGABETAALPHAUpdateCommandr	   r4   r   r   <module>rJ      s    +  9 0 ( 9 # $++00$2C2C2I2I@** @ @r   