
    Q                        d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 ddlmZ dd	lmZ dd
lmZ e	j"                   e	j$                  e	j&                  j(                         G d de	j*                                      Ze	j"                   e	j$                  e	j&                  j.                         G d de                    Zy)z*Enable the version of the provided secret.    )absolute_import)division)unicode_literals)api)base)parser_arguments)parser_extensions)args)logc                   r    e Zd ZdZedej                  fd       Zdej                  de
j                  fdZy)Createax  Enable the version of the provided secret.

  Enable the version of the provided secret. It can be disabled with
  `{parent_command} disable`.

  ## EXAMPLES

  Enable version `123` of the secret named `my-secret`:

    $ {command} 123 --secret=my-secret

  Enable version `123` of the secret named `my-secret` using etag:

    $ {command} 123 --secret=my-secret --etag=123
  parserc                     t        j                  | ddd       t        j                  | dd       t        j                  | d       y)	zArgs is called by calliope to gather arguments for secrets versions enable command.

    Args:
      parser: An argparse parser that you can use to add arguments that will be
        available to this command.
    	to enableTpurpose
positionalrequiredFr   hiddenenabledactionNsecrets_args
AddVersionAddLocationAddVersionEtagr   s    &lib/surface/secrets/versions/enable.pyArgszCreate.Args0   s?     t V[Gy9    r
   returnc                 R   t        j                  | j                               }|j                  j                  j                         }t        j                  |      j                  ||j                  |j                        }t        j                         j                  |       |S )a  Run is called by calliope to implement the secret versions enable command.

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

    Returns:
      API call to invoke secret version enable.
    api_versionetagsecret_locationsecrets_apiGetApiFromTrackReleaseTrackCONCEPTSversionParseVersionsEnabler(   locationsecrets_logEnabledselfr
   r&   version_refresults        r    Runz
Create.Run>   s     --d.?.?.ABK--''--/K!!k:AA$))T]] B F "";/Mr"   N)__name__
__module____qualname____doc__staticmethodr   ArgumentInterceptorr!   r	   	Namespacer+   r1   r:    r"   r    r   r      sI      :#77 : :'11 k6J6J r"   r   c                   &    e Zd ZdZed        Zd Zy)
CreateBetaa{  Enable the version of the provided secret.

  Enable the version of the provided secret. It can be disabled with
  `{parent_command} disable`.

  ## EXAMPLES

  Enable version `123` of the secret named `my-secret`:

    $ {command} 123 --secret=my-secret

  Enable version `123` of the secret named `my-secret` using an etag:

    $ {command} 123 --secret=my-secret --etag=123
  c                     t        j                  | ddd       t        j                  | dd       t        j                  | d       y )Nr   Tr   Fr   r   r   r   r   s    r    r!   zCreateBeta.Argsd   s=    t V[Gy9r"   c                 R   t        j                  | j                               }|j                  j                  j                         }t        j                  |      j                  ||j                  |j                        }t        j                         j                  |       |S )Nr%   r'   r*   r6   s        r    r:   zCreateBeta.Runl   s    --d.?.?.ABK--''--/K!!k:AA$))T]] B F "";/Mr"   N)r;   r<   r=   r>   r?   r!   r:   rB   r"   r    rD   rD   Q   s       : :r"   rD   N)r>   
__future__r   r   r   googlecloudsdk.api_lib.secretsr   r+   googlecloudsdk.callioper   r   r	   "googlecloudsdk.command_lib.secretsr
   r   r   r4   DefaultUniverseOnlyReleaseTracksr-   GACreateCommandr   BETArD   rB   r"   r    <module>rP      s    1 &  ' = ( 4 5 C A D%%(()/T / * /d D%%**+    ,  r"   