
    F	                     8   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                  j                   e	j                  j"                  e	j                  j$                         G d	 d
e	j&                               Zy)z'Update public delegated prefix command.    )absolute_import)division)unicode_literals)base_classes)public_delegated_prefixes)base)flagsc                   &    e Zd ZdZed        Zd Zy)Updatea-  Updates a Compute Engine public delegated prefix.

  ## EXAMPLES

  To announce a regional v2 public delegated prefix:

    $ {command} my-pdp --announce-prefix --region=us-central1

  To withdraw a regional v2 public delegated prefix:

    $ {command} my-pdp --withdraw-prefix --region=us-central1
  c                     t        j                         j                  |        | j                  d      }t        j                  |       y )NT)required)r	   &MakeRegionalPublicDelegatedPrefixesArgAddArgumentadd_mutually_exclusive_groupAddUpdatePrefixArgs)parserannounce_withdraw_parsers     7lib/surface/compute/public_delegated_prefixes/update.pyArgszUpdate.Args-   sD    	002>>vF%BB  C   
67    c                    t        j                  | j                               }t        j                  |j
                  |j
                  j                  |j                        }t        j                         j                  ||j                  t        j                  |j
                              }|j                  r|j                  |      S |j                  r|j!                  |      S y )N)scope_lister)r   ComputeApiHolderReleaseTrackr   PublicDelegatedPrefixesClientclientmessages	resourcesr	   r   ResolveAsResourcecompute_flagsGetDefaultScopeListerannounce_prefixAnnouncewithdraw_prefixWithdraw)selfargsholder
pdp_clientpdp_refs        r   Runz
Update.Run5   s    **4+<+<+>?F*HHv}}--v/?/?J ::<NN"88G O G   ))  )) r   N)__name__
__module____qualname____doc__staticmethodr   r+    r   r   r   r      s      8 8*r   r   N)r/   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r    <googlecloudsdk.command_lib.compute.public_delegated_prefixesReleaseTracksr   ALPHABETAGAUpdateCommandr   r1   r   r   <module>r<      s{    . &  ' 7 D ( E N T..33T5F5F5I5I%*T %*%*r   