
    H
                     h   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 e	j                   e	j                  e	j                  j                  e	j                  j                   e	j                  j"                        e	j$                   G d	 d
e	j&                                             Zy)z&Command to update a folder capability.    )absolute_import)division)unicode_literals)capabilities)arg_parsers)base)flagsc                   &    e Zd ZdZed        Zd Zy)Updatea   Update a folder capability.

  Command to Update/Set the `value` field of the Folder capability. This
  can be done by using the `--enable` flag to set the value to True, and
  the `--no-enable` flag to set the value to False.

  This command can fail for the following reasons:
      * There is no folder parenting the given capability name.
      * The active account does not have permission to update the given
        folder/capability.

  ## EXAMPLES

  The following command updates a capability with the ID
  `folders/123/capabilities/app-management` to have
  the value True:

    $ {command} "folders/123/capabilities/app-management" --enable

  In order to set the value to False, the following command can be used:

    $ {command} "folders/123/capabilities/app-management" --no-enable
  c                     t        j                  d      j                  |        | j                  dt        j
                  ddd       | j                  dd	       y )
Nzyou want to update.z--enablevalueTzEnable the Capability)actiondestrequiredhelpz--update-maskziUpdate Mask. This is an optional field, and the only valid value this can be set to currently is "value".)r   )r	   CapabilityIdArgAddToParseradd_argumentr   StoreTrueFalseAction)parsers    3lib/surface/resource_manager/capabilities/update.pyArgszUpdate.Args9   sa    	/0<<VD
//$   8      c                 p    |j                   }t        j                  ||j                  |j                        S )N)idr   UpdateCapabilityr   update_mask)selfargscapability_names      r   Runz
Update.RunK   s/    ggO((T%5%5 r   N)__name__
__module____qualname____doc__staticmethodr   r!    r   r   r   r      s     0  "r   r   N)r%   
__future__r   r   r   'googlecloudsdk.api_lib.resource_managerr   googlecloudsdk.callioper   r   +googlecloudsdk.command_lib.resource_managerr	   HiddenReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyCommandr   r'   r   r   <module>r4      s    - &  ' @ / ( = T..33T5F5F5I5I /T\\ /  
/r   