
                         ,   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  \R                  " \R                  R                  \R                  R                   \R                  R"                  5       " S	 S
\R$                  5      5       rg)zCommand to update a folder.    )absolute_import)division)unicode_literals)folders)base)flags)logc                   .    \ rS rSrSr\S 5       rS rSrg)Update   a  Update the display name of a folder.

Updates the given folder with new folder name.

This command can fail for the following reasons:
    * There is no folder with the given ID.
    * The active account does not have permission to update the given
      folder.
    * The new display name is taken by another folder under this folder's
      parent.

## EXAMPLES

The following command updates a folder with the ID `123456789` to have
the name "Foo Bar and Grill":

  $ {command} 123456789 --display-name="Foo Bar and Grill"
c                 p    [         R                  " S5      R                  U 5        U R                  SSSS9  g )Nzyou want to update.z--display-nameTz?New display name for the folder (unique under the same parent).)requiredhelp)r   FolderIdArgAddToParseradd_argument)parsers    .lib/surface/resource_manager/folders/update.pyArgsUpdate.Args1   s9    	+,88@
N  P    c                 0   [         R                  " UR                  5      nUR                  Ul        [         R
                  " 5       R                  X!R                  SS9n[        R                  " [         R                  " 5       R                  U5      5        g )Ndisplay_name)folder	foldersId
updateMask)r   	GetFolderidr   displayNameFoldersMessages'CloudresourcemanagerFoldersPatchRequestr	   UpdatedResourceFoldersServicePatch)selfargsr   requests       r   Run
Update.Run9   so    tww'F**F%%'OO^ P EG..066w?@r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r(   __static_attributes__r*   r   r   r   r      s#    & P PAr   r   N)r/   
__future__r   r   r   'googlecloudsdk.api_lib.resource_managerr   googlecloudsdk.callioper   +googlecloudsdk.command_lib.resource_managerr   googlecloudsdk.corer	   ReleaseTracksReleaseTrackALPHABETAGAUpdateCommandr   r*   r   r   <module>r=      sy    " &  ' ; ( = # D%%++T->->-C-C%%((*!AT !A*!Ar   