
                         z   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dZe
j"                   e
j$                  e
j&                  j(                  e
j&                  j*                  e
j&                  j,                         G d de
j.                                      Zee_        y)z4Command for updating interconnect attachment groups.    )absolute_import)division)unicode_literals)base_classes)client)base)
exceptions)flags)
propertiesz        *{command}* is used to update interconnect attachment groups.

        For an example, refer to the *EXAMPLES* section below.
        a          To update an interconnect attachment group example-attachment-group's
        intended availability SLA to PRODUCTION_CRITICAL, run:

          $ {command} example-attachment-group
          --intended-availability-sla=PRODUCTION_CRITICAL

        To update an interconnect attachment group example-attachment-group's
        description to "example attachment group description", run:

          $ {command} example-attachment-group
          --description="example attachment group description"

        To update an interconnect attachment group example-attachment-group's
        member attachments to attachment-1 and attachment-2, run:

          $ {command} example-attachment-group
          --attachments=region-1/attachment-1,region-2/attachment-2
          --update-mask=attachments

        Although you can add or remove member attachments using this command, it
        is recommended to add or remove member attachments using the
        *add-members* and *remove-members* commands.
        )DESCRIPTIONEXAMPLESc                   0    e Zd ZdZdZed        Zd Zd Zy)UpdatezUpdate a Compute Engine interconnect attachment group.

  *{command}* is used to update interconnect attachment groups. An interconnect
  attachment group connects a set of redundant interconnect attachments between
  Google and the customer.
  Nc                    t        j                  d      | _        | j                  j                  |d       t        j                  |       t        j
                  |       t        j                  |       t        j                  |       y )NF)pluralupdate)operation_type)r
   #InterconnectAttachmentGroupArgumentATTACHMENT_GROUP_ARGAddArgumentAddDescription#AddIntendedAvailabilitySlaForUpdate)GetMemberInterconnectAttachmentsForCreateAddUpdateMask)clsparsers     >lib/surface/compute/interconnects/attachments/groups/update.pyArgszUpdate.ArgsK   sk    $HH C (((I	 	--f5	33F;	    c                      y)Nz$compute.interconnectAttachmentGroups )selfs    r   
CollectionzUpdate.CollectionV   s    1r   c                    |j                   /|j                  #|j                  st        j                  g d      t        j                  | j                               }| j                  j                  ||j                        }t        j                  j                  j                  j                         }t!        j"                  |||j                   |j                        }t%        j&                  |j                   j(                  |j                        }t%        j*                  |j                        }|j-                  |j                   |||j.                        S )N)z--descriptionz--intended-availability-slaz--attachments)compute_client	resources)descriptionavailability_slaattachmentsupdate_mask)r'   intended_availability_slar)   r	   MinimumArgumentExceptionr   ComputeApiHolderReleaseTrackr   ResolveAsResourcer&   r   VALUEScoreproject	GetOrFailr   InterconnectAttachmentGroupr
   GetIntendedAvailabilitySlamessagesParseAttachmentsPatchr*   )r"   argsholderrefr2   attachment_groupr(   r)   s           r   Runz
Update.RunY   s&    **2  //
K  **4+<+<+>?F

#
#
5
5dF<L<L
MC$$,,668G99WV]]f>N>N 77 > > (()9)9:K!!$$)$$	 "  r   )	__name__
__module____qualname____doc__r   classmethodr   r#   r=   r!   r   r   r   r   =   s+    
    2r   r   N)rA   
__future__r   r   r   googlecloudsdk.api_lib.computer   ?googlecloudsdk.api_lib.compute.interconnects.attachments.groupsr   googlecloudsdk.callioper   r	   Cgooglecloudsdk.command_lib.compute.interconnects.attachments.groupsr
   googlecloudsdk.corer   DETAILED_HELPUniverseCompatibleReleaseTracksr.   ALPHABETAGAUpdateCommandr   detailed_helpr!   r   r   <module>rQ      s    ; &  ' 7 R ( . U *
B T..33T5F5F5I5I1T 1 1h % r   