
                         ^   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
  SSKJr  \R                  r\R                  \R                  " \R                   R"                  \R                   R$                  \R                   R&                  5       " S	 S
\R(                  5      5       5       rg)z&Bigtable logical views create command.    N)
exceptions)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	)
CreateLogicalView   z#Create a new Bigtable logical view.EXAMPLESz          To create a logical view, run:

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

          c                     [         R                  " U S5        [         R                  " U 5      R                  SS9R	                  5       R                  5         g )Nz	to createT)required)r   AddLogicalViewResourceArgArgAdderAddViewQueryAddAsyncAddDeletionProtection)parsers    ,lib/surface/bigtable/logical_views/create.pyArgsCreateLogicalView.Args-   sC    ''<v++ , hj&&(    c                 X    [         R                  " XR                  UR                  5      $ )a  Creates 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:
  Created logical view resource object.
)r   Createquerydeletion_protection)selflogical_view_refargss      r   _CreateLogicalView$CreateLogicalView._CreateLogicalView4   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:
  Created resource.
zCreating logical view {0}zlogical view)kindis_asyncN)CONCEPTSlogical_viewParser    async_r   GetOperationRefAwaitLogicalViewformatNamer   CreatedResource)r   r   r   	operationoperation_refs        r   RunCreateLogicalView.RunC   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    r0   __static_attributes__r2   r   r   r
   r
      sA    
 , (// # - ) )r   r
   )r7   r8   apitools.base.pyr   googlecloudsdk.api_lib.bigtabler   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   googlecloudsdk.corer   	HttpErrorUniverseCompatibleReleaseTracksReleaseTrackGABETAALPHACreateCommandr
   r2   r   r   <module>rJ      s    -  ' 9 0 ( 9 #  	 $++00$2C2C2I2I7** 7 7r   