
                         0   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  SS	KJr  SS
KJr  SSS.r\
R*                  \
R,                  " \
R.                  R0                  5       " S S\
R2                  5      5       5       r\
R*                  \
R,                  " \
R.                  R6                  5       " S S\5      5       5       r\
R*                  \
R,                  " \
R.                  R:                  5       " S S\5      5       5       rg)z!Command for updating wire groups.    )absolute_import)division)unicode_literals)base_classes)client)base)scope)flags)
propertiesz{        *{command}* is used to update wire groups.

        For an example, refer to the *EXAMPLES* section below.
        a          To disable a wire group, run:

        $ {command} example-wg --cross-site-network=example-csn --no-admin-enabled

        To change a wire group's unmetered bandwidth, run:

        $ {command} example-wg --cross-site-network=example-csn --bandwidth-unmetered=5

        To enable automatic failure detection for a wire group, run:

        $ {command} example-wg --cross-site-network=example-csn --fault-response=DISABLE_PORT

        To enable bandwidth sharing for a wire group, run:

        $ {command} example-wg --cross-site-network=example-csn --bandwidth-allocation=SHARED_WITH_WIRE_GROUP

        To update a wire group's description, run:

        $ {command} example-wg --cross-site-network=example-csn --description="new description"
        )DESCRIPTIONEXAMPLESc                   @    \ rS rSrSr\rSrSr\	S 5       r
S rS rSrg)Update<   Update a Compute Engine wire group.

*{command}* is used to update wire groups. A wire group represents a group of
redundant wires.
Nc                    [         R                  " SS9U l        U R                  R                  USS9  [        R
                  " 5       U l        U R                  R                  U5        [         R                  " U5        [         R                  " USS9  [         R                  " USS9  [         R                  " U5        [         R                  " USS9  [         R                  " U5        g )NF)pluralupdate)operation_type)requiredT)r   )r
   WireGroupArgumentWIRE_GROUP_ARGAddArgumentcross_site_network_flags(CrossSiteNetworkArgumentForOtherResourceCROSS_SITE_NETWORK_ARGAddDescriptionAddBandwidthUnmeteredAddBandwidthAllocationAddFaultResponseAddAdminEnabledAddValidateOnly)clsparsers     7lib/surface/compute/interconnects/wire_groups/update.pyArgsUpdate.ArgsK   s    00>C""6("C IIK  **62	 	7	  %8	6"	&.	&!    c                     g)Nzcompute.wireGroups )selfs    r%   
CollectionUpdate.CollectionZ   s    r(   c                    [         R                  " U R                  5       5      nU R                  R	                  UUR
                  [        R                  R                  SUR                  0S9n[        R                  R                  R                  R                  5       n[        R                   " UUUR                  UR                  S9nUR#                  UR$                  ['        USS 5      UR(                  ['        USS 5      UR*                  UR,                  ['        USS 5      ['        USS 5      UR.                  S9	$ )	NcrossSiteNetwork)default_scopeadditional_params)compute_clienttypebandwidth_meterednetwork_service_classbandwidth_allocation)	descriptionwire_group_typebandwidth_unmeteredr4   fault_responseadmin_enabledr5   r6   validate_only)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcescompute_scope	ScopeEnumGLOBALcross_site_networkr   VALUEScoreproject	GetOrFailr   	WireGroupPatchr7   getattrr9   r:   r;   r<   )r+   argsholderrefrG   
wire_groups         r%   Run
Update.Run]   s!   **4+<+<+>?F



/
/#--44-t/F/FG	 0 C $$,,668G!!}}	J $$fd3 44!$(;TB**((%d,CTJ$T+A4H((  
 
r(   r*   )__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpr   r   classmethodr&   r,   rP   __static_attributes__r*   r(   r%   r   r   <   s5     !-." " r(   r   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )
UpdateBeta{   r   c                 P   > [         TU ]  U5        [        R                  " U5        g N)superr&   r
   AddTyper#   r$   	__class__s     r%   r&   UpdateBeta.Args   s    	GL	MM&r(   r*   	rR   rS   rT   rU   rV   rY   r&   rZ   __classcell__rc   s   @r%   r\   r\   {   s      r(   r\   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )UpdateAlpha   r   c                 |   > [         TU ]  U5        [        R                  " U5        [        R                  " U5        g r_   )r`   r&   r
   AddBandwidthMeteredAddNetworkServiceClassrb   s     r%   r&   UpdateAlpha.Args   s+    	GL	f%	  (r(   r*   re   rg   s   @r%   ri   ri      s     ) )r(   ri   N)rV   
__future__r   r   r   googlecloudsdk.api_lib.computer   8googlecloudsdk.api_lib.compute.interconnects.wire_groupsr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   rA   Dgooglecloudsdk.command_lib.compute.interconnects.cross_site_networksr
   r   <googlecloudsdk.command_lib.compute.interconnects.wire_groupsgooglecloudsdk.corer   rW   UniverseCompatibleReleaseTracksr>   GAUpdateCommandr   BETAr\   ALPHAri   r*   r(   r%   <module>r}      s    ( &  ' 7 K ( E r N *
< D%%(():T : * :z D%%**+
 
 , 
 D%%++,)* ) - )r(   