
    s	                         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 e	j                  e	j                   e	j                   e	j"                  j$                         G d	 d
e	j&                                             Zy)z2Unset-value command for the Resource Settings CLI.    )absolute_import)division)unicode_literals)utils)base)	arguments)
console_ioc                   &    e Zd ZdZed        Zd Zy)Cleara  Remove the value of a resource setting.

  Remove the value of a resource setting. This reverts the resource to
  inheriting the resource settings from above it in the resource hierarchy,
  if any is set on a resource above it.

  ## EXAMPLES

  To unset the resource settings ``net-preferredDnsServers'' with the
  project ``foo-project'', run:

    $ {command} net-preferredDnsServers --project=foo-project
  c                 X    t        j                  |        t        j                  |        y )N)r   AddSettingsNameArgToParserAddResourceFlagsToParser)parsers    .lib/surface/resource_manager/settings/clear.pyArgsz
Clear.Args.   s    ((0&&v.    c                     t        j                  |      }t        j                  |      }t	        j
                  d      syt        j                  ||      }|j                  |      }|S )zUnset the resource settings.

    Args:
      args: argparse.Namespace, An object that contains the values for the
        arguments specified in the Args method.

    Returns:
       The deleted settings.
    zYour setting will be cleared.)messageN)	api_utilsGetServiceFromArgsr   GetSettingsPathFromArgsr	   PromptContinueGetDeleteValueRequestFromArgsr   )selfargssettings_servicesetting_nameget_requestsetting_values         r   Runz	Clear.Run3   sc     !33D9006L$$0 99$MK$**;7Mr   N)__name__
__module____qualname____doc__staticmethodr   r     r   r   r   r      s      / /r   r   N)r$   
__future__r   r   r   0googlecloudsdk.api_lib.resource_manager.settingsr   r   googlecloudsdk.callioper   4googlecloudsdk.command_lib.resource_manager.settingsr   googlecloudsdk.core.consoler	   HiddenDefaultUniverseOnlyReleaseTracksReleaseTrackALPHADescribeCommandr   r&   r   r   <module>r2      sv    9 &  ' O ( J F 2 D%%++,*D   * -  *r   