
    `                         S r SSKJr  SSKJr  SSKJr  SSK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S.r " S S\	R                   5      r\\l        g)zUpdate endpoint command.    )absolute_import)division)unicode_literalsN)activation_api)base)
exceptions)activation_flags)labels_utilz
          Update a firewall endpoint. Check the progress of endpoint update
          by using `gcloud network-security firewall-endpoints describe`.

          For more examples, refer to the EXAMPLES section below.

        a  
            To update labels k1 and k2, run:

            $ {command} my-endpoint --zone=us-central1-a --organization=1234 --update-labels=k1=v1,k2=v2

            To remove labels k3 and k4, run:

            $ {command} my-endpoint --zone=us-central1-a --organization=1234 --remove-labels=k3,k4

            To clear all labels from the firewall endpoint, run:

            $ {command} my-endpoint --zone=us-central1-a --organization=1234 --clear-labels
        )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Update4   zYUpdate a Firewall Plus endpoint.

This command is used to update labels on the endpoint.
c                 ~   [         R                  " U R                  5       U5        [         R                  " US5        [         R                  " U5        [         R
                  " U5        [        R                  R                  U5        [        R                  R                  US5        [        R                  " U5        g )N60mT)r	   AddEndpointResourceReleaseTrack
AddMaxWaitAddDescriptionArgAddUpdateBillingProjectArgr   
ASYNC_FLAGAddToParser
SetDefaultr
   AddUpdateLabelsFlags)clsparsers     9lib/surface/network_security/firewall_endpoints/update.pyArgsUpdate.Args:   s{    (()9)9);VD.&&v.//7OO'OOvt,$$V,    c                 t   [         R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  UR                  5       5      nUc  [        R                  " SS5      e/ nS n[        R                  R                  U5      nUR                  5       (       at  UR                  S5        UR                  nUR!                  UR"                  R$                  R&                  UR                  5      nUR(                  (       a  UR                  nUR*                  n	U	(       a  UR                  S5        U(       d  [        R,                  " / SQ5      eUR.                  n
[0        R2                  " UR4                  S9nUR7                  UR                  5       [9        USS 5      SR;                  U5      UU	S	9nU
(       a  UR=                  S
5      (       d  SUl        U$ URA                  URC                  U5      SR?                  UR                  5       5      SUS9$ )Nzfirewall-endpointz!Firewall endpoint does not exist.labelsbilling_project_id)z--clear-labelsz--remove-labelsz--update-labelsz--update-billing-project)secondsdescription,)namer%   update_maskr"   r#   formatdefaultz0waiting for firewall endpoint [{}] to be updatedT)operation_refmessage
has_resultmax_wait)"r   Clientr   CONCEPTSfirewall_endpointParseDescribeEndpointRelativeNamer   InvalidArgumentExceptionr
   DiffFromUpdateArgsMayHaveUpdatesappendr"   ApplymessagesFirewallEndpointLabelsValueneeds_updateupdate_billing_projectMinimumArgumentExceptionasync_datetime	timedeltar.   UpdateEndpointgetattrjoinIsSpecifiedr)   WaitForOperationGetOperationRef)selfargsclientendpointoriginalr(   r"   labels_difflabels_updater#   is_asyncr.   	operations                r   Run
Update.RunD   s   ""4#4#4#67F}}..446H&&x'<'<'>?H//

-/ / KF""11$7K!!##"f!''
//
*
*
6
6
//m 
	#	#%%44-.// 1 	 	 {{H!!$--8H%%""$D-6HH[)- & I  h''"",,Y7BII!!#
  #  r     N)	__name__
__module____qualname____firstlineno____doc__classmethodr   rS   __static_attributes__rU   r    r   r   r   4   s     
 - -<r    r   )rZ   
__future__r   r   r   rB   :googlecloudsdk.api_lib.network_security.firewall_endpointsr   googlecloudsdk.callioper   r   +googlecloudsdk.command_lib.network_securityr	   $googlecloudsdk.command_lib.util.argsr
   DETAILED_HELPUpdateCommandr   detailed_helprU   r    r   <module>re      sU     &  '  U ( . H <0LT L^ % r    