
                             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rS r SS jr SS jrS rSS jrSS jrSS jrS rS\	R2                  4S jrS rg)z.Flags for Mirroring Deployment Group commands.    )absolute_import)division)unicode_literals)api)arg_parsers)parser_arguments)concepts)deps)concept_parsers)presentation_specsMIRRORING_DEPLOYMENT_GROUPc                 J   [         R                  " SS[        R                  " U 5      [         R                  [         R
                  " SSSS9[         R
                  " SSS	S9S
9n[        R                  " [        USSS9n[        R                  " U/5      R                  U5      $ )z)Adds Mirroring Deployment Group resource.z<networksecurity.projects.locations.mirroringDeploymentGroupszmirroring deployment grouplocationLocation of the {resource}.locationsIdparameter_namezdeployment-group-idzId of the {resource}mirroringDeploymentGroupsId)api_version
projectsIdr   r   TMirroring Deployment Group.nameconcept_specrequired
group_help)r	   ResourceSpecr   GetApiVersion DEFAULT_PROJECT_ATTRIBUTE_CONFIG ResourceParameterAttributeConfigr   ResourcePresentationSpecDEPLOYMENT_GROUP_RESOURCE_NAMEr   ConceptParserAddToParser)release_trackparserresource_specpresentation_specs       Ilib/googlecloudsdk/command_lib/network_security/deployment_group_flags.pyAddDeploymentGroupResourcer*       s    ''D"##M2::;;

'&
 #+"K"K

 6#-  )AA) .	 
	&	&(9':	;	G	G	OO    c           	      R    U R                  SSSUU[        R                  " 5       S9  g)zAdds --max-wait flag.z
--max-waitmax_waitF)destr   defaulthelptypeN)add_argumentr   Duration)r&   default_max_wait	help_texts      r)   
AddMaxWaitr6   ;   s2     	!  r+   c                 &    U R                  SSUS9  g)z6Adds a resource argument for Google Cloud description.z--descriptionFr   r0   Nr2   r&   r5   s     r)   AddDescriptionArgr;   K   s     	oIFr+   c                    ^  U 4S j$ )Nc                 J   > [         R                  " T5      U R                  -   $ N)r   GetEffectiveApiEndpointr   )xr%   s    r)   <lambda> MakeGetUriFunc.<locals>.<lambda>S   s    3..}=Fr+    )r%   s   `r)   MakeGetUriFuncrD   R   s	    	FFr+   c                 &    U R                  SSUS9  g )Nz	--projectTr8   r9   r:   s     r)   AddProjectArgrF   V   s    kDyAr+   c                 &    U R                  SSUS9  g )N
--locationTr8   r9   r:   s     r)   AddLocationArgrI   Z   s    lT	Br+   c                    ^  / nT (       a9  UR                  [        R                  " U 4S jSR                  T 5      5      5        [        R
                  " SSUS9$ )z.Gets Google Cloud location resource attribute.c                     > T $ r>   rC   )r/   s   r)   rA   )LocationAttributeConfig.<locals>.<lambda>d   s    Gr+   z:Location of the Mirroring Deployment Group. Defaults to {}r   r   )r   r5   fallthroughs)appendr
   Fallthroughformatr	   r    )r/   rM   s   ` r)   LocationAttributeConfigrQ   ^   sY    ,HOO	
 
	2	2-
 r+   c                  \    [         R                  " SS[        5       [         R                  S9$ )z?Constructs and returns the Resource specification for Location.z"networksecurity.projects.locationsr   )resource_namer   r   )r	   r   rQ   r   rC   r+   r)   GetLocationResourceSpecrT   q   s*    			*)+::	
 r+   r&   c                 r    [         R                  R                  S[        5       USS9R	                  U 5        g)zAdds a resource argument for Google Cloud location.

Args:
  parser: The argparse.parser to add the resource arg to.
  help_text: str, the text of the help message.
rH   T)r   N)r   r#   ForResourcerT   r$   r:   s     r)   AddLocationResourceArgrW   {   s8     ++	 , 
 Kr+   c                     [         R                  " SSS[         R                  [         R                  " SSSS9S9n[        R
                  " SUS	S
S9n[        R                  " U/5      R                  U 5      $ )zAdds network resource.zcompute.networksnetworkv1znetwork-namezName of the {resource}r   )r   projectrY   z	--networkTr   r   )	r	   r   r   r    r   r!   r   r#   r$   )r&   r'   r(   s      r)   AddNetworkResourcer\      s|    ''7777

""
- )AA .	 
	&	&(9':	;	G	G	OOr+   N)zTime to synchronously wait for the operation to complete, after which the operation continues asynchronously. Ignored if --no-async isn't specified. See $ gcloud topic datetimes for information on time formats.)z-Description of the mirroring deployment group)z"Project ID of the deployment group)z Location of the deployment group)global)__doc__
__future__r   r   r   Cgooglecloudsdk.api_lib.network_security.mirroring_deployment_groupsr   googlecloudsdk.callioper   r    googlecloudsdk.calliope.conceptsr	   r
   (googlecloudsdk.command_lib.util.conceptsr   r   r"   r*   r6   r;   rD   rF   rI   rQ   rT   ArgumentInterceptorrW   r\   rC   r+   r)   <module>re      s    5 &  ' S / 4 5 1 D G!= P< c" FGGBC&00"Pr+   