
    	                     8   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"                  \	R                  R$                  5       " S	 S
\	R&                  5      5       rg)z(Update public advertised prefix command.    )absolute_import)division)unicode_literals)base_classes)public_advertised_prefixes)base)flagsc                   .    \ rS rSrSr\S 5       rS rSrg)Update   a7  Updates a Compute Engine public advertised prefix.

## EXAMPLES

To update a public advertised prefix:

  $ {command} my-pap --status=ptr-configured

To announce a public advertised prefix:

  $ {command} my-pap --announce-prefix

To withdraw a public advertised prefix:

  $ {command} my-pap --withdraw-prefix
c                     [         R                  " 5       R                  U5        UR                  SS9n[         R                  " U5        g )NT)required)r	   MakePublicAdvertisedPrefixesArgAddArgumentadd_mutually_exclusive_groupAddUpdatePapArgsToParser)clsparserannounce_withdraw_parsers      8lib/surface/compute/public_advertised_prefixes/update.pyArgsUpdate.Args1   sB    	))+77?%BB  C  	""#;<    c                 .   [         R                  " U R                  5       5      nUR                  nUR                  R                  nUR
                  n[        R                  " 5       R                  UU[        R                  " UR                  5      S9n[        R                  " X4U5      nUR                  b  UR                  XaR                  S9$ UR                  (       a  UR!                  U5      $ UR"                  (       a  UR%                  U5      $ g )N)scope_lister)status)r   ComputeApiHolderReleaseTrackclientmessages	resourcesr	   r   ResolveAsResourcecompute_flagsGetDefaultScopeListerr   PublicAdvertisedPrefixesClientr   Patchannounce_prefixAnnouncewithdraw_prefixWithdraw)selfargsholderr   r    r!   pap_ref
pap_clients           r   Run
Update.Run8   s    **4+<+<+>?F]]F}}%%H  I335GG"88G H IG
 ,JJ)%J {{gkk::  ))  )) r    N)	__name__
__module____qualname____firstlineno____doc__classmethodr   r0   __static_attributes__r2   r   r   r   r      s     " = =*r   r   N)r7   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r#   =googlecloudsdk.command_lib.compute.public_advertised_prefixesReleaseTracksr   ALPHABETAGAUpdateCommandr   r2   r   r   <module>rD      sy    / &  ' 7 E ( E O T..33T5F5F5I5I,*T ,*,*r   