
                            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  \R                  " \R                  R                   \R                  R"                  5       " S
 S\R$                  5      5       rg)zBCommand to update an archive deployment in an Apigee organization.    )absolute_import)division)unicode_literals)apigee)base)defaults)resource_args)labels_utilc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Update   z-Update an existing Apigee archive deployment.zD  {description}

  `{command}` updates an Apigee archive deployment.am    To update the ``tag'' and ``rev'' labels of an archive deployment with the id
  ``abcdef01234'' in the Apigee environment called ``my-env'' using the active
  Cloud Platform project, run:

      $ {command} abcdef01234 --environment=my-env --update-labels=tag=my-tag,rev=1234

  To remove the ``dev'' label on an archive deployment with the id
  ``uvwxyz56789'', in the Apigee environment called ``my-env'', in an
  organization called ``my-org'', run:

      $ {command} uvwxyz56789 --environment=my-env --organization=my-org --remove-labels=dev

  To clear all labels on an archive deployment with the id ``mnop4321'', in
  the Apigee environment called ``my-env'', in an organization called
  ``my-org'', and return the updated archive deployment as a JSON object, run:

      $ {command} mnop4321 --environment=my-env --organization=my-org --clear-labels --format=json
  )DESCRIPTIONEXAMPLESc           
          [         R                  " U SSSSS[        R                  " 5       /S9  [        R
                  " U 5        g )Nz+organization.environment.archive_deploymentziArchive deployment to update. To get a list of existing archive deployments, run `{parent_command} list`.archive_deploymentT)	help_textargument_name
positionalrequiredfallthroughs)r	   AddSingleResourceArgumentr   !GCPProductOrganizationFallthroughr
   AddUpdateLabelsFlags)parsers    %lib/surface/apigee/archives/update.pyArgsUpdate.Args?   sE    ++5E*@@BCE $$V,    c                    [         R                  " U5        UR                  R                  R	                  5       R                  5       n[        R                  R                  U5      nSU;   a  UR                  (       d  US   nO0 nUR                  (       a  UR                  UR                  5        UR                  (       a  UR                   H  nXT;   d  M
  XE	 M     SU0n[        R                  R                  X&5      $ )zRun the update command.labels)r
   GetAndValidateOpsFromArgsCONCEPTSr   ParseAsDictr   ArchivesClientDescribeclear_labelsupdate_labelsupdateremove_labelsr   )selfargsidentifiersexisting_archive
new_labelslabellabels_protos          r   Run
Update.RunM   s    ))$/--2288:AACK,,55kB##D,=,=#H-jj**+%%% & j)L  ''BBr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r2   __static_attributes__r4   r   r   r   r      s0    57
-8 - -Cr   r   N)r9   
__future__r   r   r   googlecloudsdk.api_libr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apigeer   r	   $googlecloudsdk.command_lib.util.argsr
   ReleaseTracksReleaseTrackALPHABETADescribeCommandr   r4   r   r   <module>rG      sm    I &  ' ) ( 6 ; < D%%++T->->-C-CD?CT!! ?C E?Cr   