
                         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  \R                  \R                  " \R                  R                   5       " S	 S
\
R"                  5      5       5       rSS jrS rS rS rS rS rS rS rS rg)z@Flags and helpers for the compute interconnects groups commands.    )absolute_import)division)unicode_literals)arg_parsers)base)
completers)flagsc                   (   ^  \ rS rSrU 4S jrSrU =r$ )%InterconnectAttachmentGroupsCompleter   c                 4   > [         [        U ]
  " SSSS.UD6  g )N$compute.interconnectAttachmentGroupsz3compute interconnects attachments groups list --uri)
collectionlist_command )superr   __init__)selfkwargs	__class__s     Plib/googlecloudsdk/command_lib/compute/interconnects/attachments/groups/flags.pyr   .InterconnectAttachmentGroupsCompleter.__init__!   s(    	
/? 9J     r   )__name__
__module____qualname____firstlineno__r   __static_attributes____classcell__)r   s   @r   r   r      s     r   r   c                 :    [         R                  " S[        UU SS9$ )Nzinterconnect attachment groupr   )resource_name	completerpluralrequiredglobal_collection)compute_flagsResourceArgumentr   )r$   r#   s     r   #InterconnectAttachmentGroupArgumentr(   )   s$    		'	'35>
 r   c                 $    U R                  SSS9  g)z5Adds description flag to the argparse.ArgumentParser.z--descriptionzT      An optional, textual description for the interconnect attachment group.
      helpNadd_argumentparsers    r   AddDescriptionr0   3   s    
  r   c                 &    U R                  SSSS9  g)AAdds IntendedAvailabilitySla flag to the argparse.ArgumentParser.--intended-availability-slaTN      The availability SLA that the user intends this group to support.
      r$   r+   Nr,   r.   s    r   #AddIntendedAvailabilitySlaForCreater6   =   s     #
  r   c                 &    U R                  SSSS9  g)r2   r3   Fr4   r5   Nr,   r.   s    r   #AddIntendedAvailabilitySlaForUpdater8   H   s     #
  r   c                 $    U R                  SSS9  g)z4Adds UpdateMask flag to the argparse.ArgumentParser.z--update-maskz      Optional update mask to specify which fields to update. Use commas to
      separate masks. If not specified, all fields present in the command will
      be updated.
      r*   Nr,   r.   s    r   AddUpdateMaskr:   S   s    
  r   c                 @    Uc  gU R                   R                  U5      $ )a	  Converts the intended-availability-sla flag to a message enum.

Args:
  messages: The API messages holder.
  intended_availability_sla: The intended availability sla flag value.

Returns:
  An TopologyCapabilityValueValuesEnum of the flag value, or None if absent.
N)!InterconnectAttachmentGroupIntentAvailabilitySlaValueValuesEnum)messagesintended_availability_slas     r   GetIntendedAvailabilitySlar@   _   s)     &55TT! r   c           	      P    U R                  S[        R                  " SS9S/ SSS9  g)	5Adds attachments flag to the argparse.ArgumentParser.--attachments   
max_lengthTINTERCONNECT_ATTACHMENTzn      Member interconnect attachments to add to or remove from the interconnect
      attachment group.
      typer$   defaultmetavarr+   Nr-   r   ArgListr.   s    r    GetMemberInterconnectAttachmentsrN   q   s4    "-'
  
r   c           	      P    U R                  S[        R                  " SS9S/ SSS9  g)	rB   rC   rD   rE   FrG   zi      Member interconnect attachments to add to the interconnect attachment
      group initially.
      rH   NrL   r.   s    r   )GetMemberInterconnectAttachmentsForCreaterP      s4    "-'
  
r   c                     / nU  H)  n UR                  S5      u  p4UR                  X445        M+     U$ ! [         a    [        SU S35      ef = f)z7Converts [region/attachment] to [(region, attachment)]./zInvalid attachment: z&. Must be in the format of region/name)split
ValueErrorappend)attachmentsresultsattregion
attachments        r   ParseAttachmentsr[      si    'c99S>f
 NNF'(  
.   %K
L s	   4AN)TF)__doc__
__future__r   r   r   googlecloudsdk.callioper   r   "googlecloudsdk.command_lib.computer   compute_completersr	   r&   UniverseCompatibleReleaseTracksReleaseTrackALPHAListCommandCompleterr   r(   r0   r6   r8   r:   r@   rN   rP   r[   r   r   r   <module>rf      s    G &  ' / ( O E D%%++,	++	 - 		$r   