
                             S 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  SSKJr  SS	KJr   " S
 S\R                   5      rg)z$The configs variables unset command.    )absolute_import)division)unicode_literals)
exceptions)util)base)flags)logc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Unset   z`Delete variable resources.

This command deletes the variable resource with the specified name.
EXAMPLESa            To delete a variable named "my-var", run:

            $ {command} --config-name=my-config my-var

          To delete a variable, but fail if it does not exist, run:

            $ {command} --config-name=my-config my-var --fail-if-absent

          To recursively delete a parent variable and its children, run:

            $ {command} --config-name=my-config my-parent-var --recursive
          c                     [         R                  " U 5        U R                  SSSS9  U R                  SSSS9  U R                  SSS	9  g
)zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go
      on the command line after this command. Positional arguments are
      allowed.
z--fail-if-absentz:Fail if a variable with the specified name does not exist.
store_true)helpactionz--recursivez-Delete a parent node and all of its children.namezThe variable name.)r   N)r	   AddRequiredConfigFlagadd_argument)parsers    5lib/surface/runtime_config/configs/variables/unset.pyArgs
Unset.Args4   sb     
'
I  
 <  
 %9:    c                    [         R                  " 5       n[         R                  " 5       n[         R                  " UR                  U5      n UR                  UR                  UR                  5       UR                  S95        [        R                  " U5        g! [        R                   a    UR                  (       a  e  gf = f)zRun 'runtime-configs variables set'.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
      with.

Returns:
  The new variable.

Raises:
  HttpException: An http error response was received while executing api
      request.
)r   	recursiveN)r   VariableClientMessagesParseVariableNamer   Delete2RuntimeconfigProjectsConfigsVariablesDeleteRequestRelativeNamer   r
   DeletedResourceapitools_exceptionsHttpNotFoundErrorfail_if_absent)selfargsvariable_clientmessagesvar_resources        r   Run	Unset.RunK   s     ))+O}}H))$))T:L

E
E,,. F  
,'00 			 
s   AB &CC N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r,   __static_attributes__r.   r   r   r   r      s1      -  ; ;, r   r   N)r3   
__future__r   r   r   apitools.base.pyr   r$   %googlecloudsdk.api_lib.runtime_configr   googlecloudsdk.callioper   )googlecloudsdk.command_lib.runtime_configr	   googlecloudsdk.corer
   DeleteCommandr   r.   r   r   <module>r>      s6     + &  ' > 6 ( ; #MD Mr   