
                         n   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dZe
j                    e
j"                  e
j$                  j&                  e
j$                  j(                  e
j$                  j*                         G d de
j,                                      Zee_        y)zPCommand for adding interconnect attachments to an interconnect attachment group.    )absolute_import)division)unicode_literals)base_classes)client)base)flags)
propertiesz        *{command}* is used to add member interconnect attachments to an
        interconnect attachment group.

        For an example, refer to the *EXAMPLES* section below.
        z        To add attachment-1 and attachment-2 to interconnect attachment group
        example-attachment-group, run:

          $ {command} example-attachment-group
          --attachments=region-1/attachment-1,region-2/attachment-2
        )DESCRIPTIONEXAMPLESc                   0    e Zd ZdZdZed        Zd Zd Zy)
AddMemberszAdd member interconnect attachments to a Compute Engine interconnect attachment group.

  *{command}* adds member interconnect attachments to a Compute Engine
  interconnect attachment group.
  Nc                     t        j                  d      | _        | j                  j                  |d       t        j                  |       y )NF)pluralupdate)operation_type)r	   #InterconnectAttachmentGroupArgumentATTACHMENT_GROUP_ARGAddArgument GetMemberInterconnectAttachments)clsparsers     Clib/surface/compute/interconnects/attachments/groups/add_members.pyArgszAddMembers.Args:   sA    $HH C (((I	**62    c                      y)Nz$compute.interconnectAttachmentGroups )selfs    r   
CollectionzAddMembers.CollectionB   s    1r   c           	      t   t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  j                  j                  j                         }t        j                  |||j                  |j
                        }t               }|j                         j                  }|t        d |j                   D              }|t        |j                        z  }|j#                  t%        j&                  t)        t+        |                        S )N)compute_client	resourcesc              3   4   K   | ]  }|j                     y w)N)key).0propertys     r   	<genexpr>z!AddMembers.Run.<locals>.<genexpr>Q   s      Kh ,,Ks   )attachments)r   ComputeApiHolderReleaseTrackr   ResolveAsResourcer"   r
   VALUEScoreproject	GetOrFailr   InterconnectAttachmentGroupsetDescriber(   additionalPropertiesPatchr	   ParseAttachmentssortedlist)r   argsholderrefr.   attachment_groupr(   attachment_group_attachmentss           r   RunzAddMembers.RunE   s   **4+<+<+>?F

#
#
5
5dF<L<L
MC$$,,668G99WV]]f>N>N %K#3#<#<#>#J#J #/ 6KK k 3t''((K!!**6${2C+DE "  r   )	__name__
__module____qualname____doc__r   classmethodr   r   r=   r   r   r   r   r   -   s+    
 3 32r   r   N)rA   
__future__r   r   r   googlecloudsdk.api_lib.computer   ?googlecloudsdk.api_lib.compute.interconnects.attachments.groupsr   googlecloudsdk.callioper   Cgooglecloudsdk.command_lib.compute.interconnects.attachments.groupsr	   googlecloudsdk.corer
   DETAILED_HELPUniverseCompatibleReleaseTracksr*   ALPHABETAGAUpdateCommandr   detailed_helpr   r   r   <module>rQ      s     W &  ' 7 R ( U *" T..33T5F5F5I5I(## ( (V )
 r   