
    9                      D   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SKJr  SSKJr  SSKJr  SrSrSr\	R.                  R0                  4rS r SS jrS rSS jrS rS\
R>                  4S jr S S jr!S r"S r#S r$g)!z,Flags for Mirroring Endpoint Group commands.    )absolute_import)division)unicode_literals)api)arg_parsers)base)parser_arguments)concepts)deps)concept_parsers)presentation_specs)
properties)	resourcesMIRRORING_ENDPOINT_GROUPz:networksecurity.projects.locations.mirroringEndpointGroupsz<networksecurity.projects.locations.mirroringDeploymentGroupsc                 V   [         R                  " U 5      n[        R                  " [        SU[        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 Endpoint Group resource.zmirroring endpoint grouplocationLocation of the {resource}.locationsIdparameter_namezendpoint-group-idId of the {resource}mirroringEndpointGroupsId)api_version
projectsIdr   r   TzMirroring Endpoint Group.)nameconcept_specrequired
group_help)r   GetApiVersionr
   ResourceSpec"ENDPOINT_GROUP_RESOURCE_COLLECTION DEFAULT_PROJECT_ATTRIBUTE_CONFIG ResourceParameterAttributeConfigr   ResourcePresentationSpecENDPOINT_GROUP_RESOURCE_NAMEr   ConceptParserAddToParser)release_trackparserr   resource_specpresentation_specs        Glib/googlecloudsdk/command_lib/network_security/endpoint_group_flags.pyAddEndpointGroupResourcer-   ,   s    !!-0+''( ::;;

'&
 !) I I

 4!-  )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,   
AddMaxWaitr9   H   s2     	!  r.   c                    ^  U 4S j$ )Nc                 J   > [         R                  " T5      U R                  -   $ N)r   GetEffectiveApiEndpointr   )xr(   s    r,   <lambda> MakeGetUriFunc.<locals>.<lambda>Y   s    3..}=Fr.    )r(   s   `r,   MakeGetUriFuncrB   X   s	    	FFr.   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<   rA   )r2   s   r,   r?   )LocationAttributeConfig.<locals>.<lambda>b   s    Gr.   z8Location of the Mirroring Endpoint Group. Defaults to {}r   r   )r   r8   fallthroughs)appendr   Fallthroughformatr
   r#   )r2   rF   s   ` r,   LocationAttributeConfigrJ   \   sY    ,FMM	
 
	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    rJ   r"   rA   r.   r,   GetLocationResourceSpecrM   o   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.

--locationT)r   N)r   r&   ForResourcerM   r'   r)   r8   s     r,   AddLocationResourceArgrR   y   s8     ++	 , 
 Kr.   c                 &    U R                  SSUS9  g)z6Adds a resource argument for Google Cloud description.z--descriptionF)r   r3   Nr5   rQ   s     r,   AddDescriptionArgrU      s    oIFr.   c                 N   [         R                  " U 5      n[        R                  R	                  5       R                  [        U5      n[        R                  " [        SU[        R                  " SSS[        R                  " S5      [        R                  " [        R                  R                   R"                  5      [        R$                  " [        R                  " [&        5      /US5      /S9[        R                  " SSS	[        R                  " S
5      [        R$                  " [        R                  " [&        5      /US	5      /S9[        R                  " SSSS9S9n[(        R*                  " SUSSSS0SS9n[,        R.                  " U/5      R1                  U5        g)z)Adds mirroring deployment group resource.zmirroring deployment groupprojectzProject of the {resource}.r   z	--project)r   r8   r   rF   r   r   r   rO   )r   rF   idr   mirroringDeploymentGroupsIdr   )r   r   r   rY   z--mirroring-deployment-groupFzMirroring Deployment Group.z$--mirroring-deployment-group-projectT)r   r   r   r   flag_name_overridesprefixesN)r   r   r   REGISTRYCloneGetCollectionInfor!   r
   r    $DEPLOYMENT_GROUP_RESOURCE_COLLECTIONr#   r   ArgFallthroughPropertyFallthroughr   VALUEScorerW   FullySpecifiedAnchorFallthroughr%   r   r$   r   r&   r'   )r(   r)   r   collection_infor*   r+   s         r,   #AddMirroringDeploymentGroupResourcerf      sw   !!-0+&&,,.@@(+/ ''*"::0%!!+.&&z'8'8'='='E'EF22&&'CDE!	 ;;

'&!!,/22&&'CDE!	 #+"K"K

 6#?$-J )AA) .$&LM !2 34@@Hr.   c                     UR                  SSS9n[        X5        U [        ;   a&  UR                  SS[        R
                  " SS9SSS	9  g
g
)z*Adds mirroring deployment groups resource.T)mutexr   z--mirroring-deployment-groupsMIRRORING_DEPLOYMENT_GROUPS   )
min_lengtha?  A comma-separated list of Mirroring Deployment Groups to associate with the Endpoint Group. Each deployment group must be specified by its full resource name. e.g. --mirroring-deployment-groups=projects/123/locations/global/mirroringDeploymentGroups/my-dg1,projects/456/locations/global/mirroringDeploymentGroups/my-dg2F)metavarr4   r3   r   N)	add_grouprf   _PACKET_BROKER_SUPPORTEDr5   r   ArgList)r(   r)   mutex_groups      r,   AddDeploymentGroupMutexGrouprq      sc      td ;+ &mA ..'-  A.k
    /r.   c                 *    U R                  SSS/SS9  g)z0Adds the endpoint group type flag to the parser.z--typeDIRECTBROKERzMThe type of the endpoint group. If not specified, the default type is DIRECT.)choicesr3   NrT   )r)   s    r,   AddTyperv      s%    "	  r.   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.)global)zDescription of the endpoint)%__doc__
__future__r   r   r   Agooglecloudsdk.api_lib.network_security.mirroring_endpoint_groupsr   googlecloudsdk.callioper   r   r	    googlecloudsdk.calliope.conceptsr
   r   (googlecloudsdk.command_lib.util.conceptsr   r   googlecloudsdk.corer   r   r%   r!   r_   ReleaseTrackALPHArn   r-   r9   rB   rJ   rM   ArgumentInterceptorrR   rU   rf   rq   rv   rA   r.   r,   <module>r      s    3 &  ' Q / ( 4 5 1 D G * )  : @ # C % !--335 P> c G&00"G
3Il4	r.   