
                            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 dd	lmZ dd
lmZ e
j(                   e
j*                  e
j,                  j.                         G d de
j0                                      Ze
j(                   e
j*                  e
j,                  j4                         G d de                    Zy)z!Command for updating wire groups.    )absolute_import)division)unicode_literals)base_classes)client)base)scope)flags)
propertiesc                   4    e Zd ZdZdZdZed        Zd Zd Z	y)UpdateUpdate a Compute Engine wire group.

  *{command}* is used to update wire groups. A wire group represents a group of
  redundant wires.
  Nc                    t        j                  d      | _        | j                  j                  |d       t	        j
                         | _        | j                  j                  |       t        j                  |       t        j                  |       t        j                  |d       t        j                  |d       t        j                  |       t        j                  |d       t        j                  |       y )NF)pluralupdate)operation_type)requiredT)r   )r
   WireGroupArgumentWIRE_GROUP_ARGAddArgumentcross_site_network_flags(CrossSiteNetworkArgumentForOtherResourceCROSS_SITE_NETWORK_ARGAddDescriptionAddTypeAddBandwidthUnmeteredAddBandwidthAllocationAddFaultResponseAddAdminEnabledAddValidateOnly)clsparsers     7lib/surface/compute/interconnects/wire_groups/update.pyArgszUpdate.Args*   s    00>C""6("C IIK  **62	 	MM&	7	  %8	6"	&.	&!    c                      y)Nzcompute.wireGroups )selfs    r#   
CollectionzUpdate.Collection:   s    r%   c                    t        j                  | j                               }| j                  j	                  ||j
                  t        j                  j                  d|j                  i      }t        j                  j                  j                  j                         }t        j                   |||j                  |j                        }|j#                  |j$                  |j&                  |j(                  t+        |dd       |j,                  |j.                  t+        |dd       t+        |dd       |j0                  	      S )NcrossSiteNetwork)default_scopeadditional_params)compute_clientbandwidth_meterednetwork_service_classbandwidth_allocation)	descriptionwire_group_typebandwidth_unmeteredr/   fault_responseadmin_enabledr0   r1   validate_only)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcescompute_scope	ScopeEnumGLOBALcross_site_networkr   VALUEScoreproject	GetOrFailr   	WireGroupPatchr2   typer4   getattrr5   r6   r7   )r(   argsholderrefrB   
wire_groups         r#   Runz
Update.Run=   s   **4+<+<+>?F



/
/#--44-t/F/FG	 0 C $$,,668G!!}}	J $$		 44!$(;TB**((%d,CTJ$T+A4H((   r%   )
__name__
__module____qualname____doc__r   r   classmethodr$   r)   rL   r'   r%   r#   r   r      s0     ." " r%   r   c                   ,     e Zd ZdZe fd       Z xZS )UpdateAlphar   c                     t         t        |   |       t        j                  |       t        j
                  |       y )N)superrS   r$   r
   AddBandwidthMeteredAddNetworkServiceClass)r!   r"   	__class__s     r#   r$   zUpdateAlpha.Argse   s.    	+s (	f%	  (r%   )rM   rN   rO   rP   rQ   r$   __classcell__)rX   s   @r#   rS   rS   \   s     ) )r%   rS   N)rP   
__future__r   r   r   googlecloudsdk.api_lib.computer   8googlecloudsdk.api_lib.compute.interconnects.wire_groupsr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r<   Dgooglecloudsdk.command_lib.compute.interconnects.cross_site_networksr
   r   <googlecloudsdk.command_lib.compute.interconnects.wire_groupsgooglecloudsdk.corer   UniverseCompatibleReleaseTracksr9   BETAUpdateCommandr   ALPHArS   r'   r%   r#   <module>rg      s    ( &  ' 7 K ( E r N * D%%**+9T 9 , 9x D%%++,)& ) - )r%   