
                             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lmZ ddlmZ dZdZdZd Z	 ddZd ZddZd Zde	j4                  fdZddZd Zd Zy)z,Flags for Mirroring Endpoint Group commands.    )absolute_import)division)unicode_literals)api)arg_parsers)parser_arguments)concepts)deps)concept_parsers)presentation_specs)	resourcesMIRRORING_ENDPOINT_GROUPz:networksecurity.projects.locations.mirroringEndpointGroupsz<networksecurity.projects.locations.mirroringDeploymentGroupsc                 b   t        j                  |       }t        j                  t        d|t        j
                  t        j                  ddd      t        j                  ddd      	      }t        j                  t        |d
d      }t        j                  |g      j                  |      S )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           	      V    | j                  ddd||t        j                                y)zAdds --max-wait flag.z
--max-waitmax_waitF)destr   defaulthelptypeN)add_argumentr   Duration)r'   default_max_wait	help_texts      r*   
AddMaxWaitr7   D   s2     	!  r,   c                       fdS )Nc                 H    t        j                        | j                  z   S N)r   GetEffectiveApiEndpointr   )xr&   s    r*   <lambda>z MakeGetUriFunc.<locals>.<lambda>U   s    3..}=Fr,    )r&   s   `r*   MakeGetUriFuncr?   T   s	    	FFr,   c                      g } r7|j                  t        j                   fddj                                      t	        j
                  dd|      S )z.Gets Google Cloud location resource attribute.c                       S r:   r>   )r0   s   r*   r=   z)LocationAttributeConfig.<locals>.<lambda>^   s    Gr,   z8Location of the Mirroring Endpoint Group. Defaults to {}r   r   )r   r6   fallthroughs)appendr
   Fallthroughformatr	   r!   )r0   rB   s   ` r*   LocationAttributeConfigrF   X   sY    ,FMM	
 
	2	2-
 r,   c                  `    t        j                  ddt               t         j                        S )z?Constructs and returns the Resource specification for Location.z"networksecurity.projects.locationsr   )resource_namer   r   )r	   r   rF   r    r>   r,   r*   GetLocationResourceSpecrI   h   s*    			*)+::	
 r,   r'   c                 x    t         j                  j                  dt               |d      j	                  |        y)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$   ForResourcerI   r%   r'   r6   s     r*   AddLocationResourceArgrN   r   s8     ++	 , 
 Kr,   c                 ,    | j                  dd|       y)z6Adds a resource argument for Google Cloud description.z--descriptionF)r   r1   Nr3   rM   s     r*   AddDescriptionArgrQ      s    oIFr,   c                 F   t        j                  |       }t        j                  j	                         j                  t        |      }t        j                  t        d|t        j                  t        j                  dddt        j                  d      t        j                  t        j                  t              g|d      g      t        j                  ddd	
            }t!        j"                  d|ddd      }t%        j&                  |g      j)                  |      S )z)Adds mirroring deployment group resource.zmirroring deployment groupr   r   r   rK   )r   rB   idr   mirroringDeploymentGroupsIdr   )r   r   r   rT   z--mirroring-deployment-groupTzMirroring Deployment Group.)r   r   r   r   prefixes)r   r   r   REGISTRYCloneGetCollectionInfor   r	   r   $DEPLOYMENT_GROUP_RESOURCE_COLLECTIONr    r!   r
   ArgFallthroughFullySpecifiedAnchorFallthroughr#   r   r"   r   r$   r%   )r&   r'   r   collection_infor(   r)   s         r*   #AddMirroringDeploymentGroupResourcer]      s   !!-0+&&,,.@@(+/ ''*"::;;

'&!!,/22&&2  "		 #+"K"K

 6#)-4 )AA) . 
	&	&(9':	;	G	G	OOr,   c                 0    | j                  dddgd       y)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.)choicesr1   NrP   )r'   s    r*   AddTyperb      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    googlecloudsdk.calliope.conceptsr	   r
   (googlecloudsdk.command_lib.util.conceptsr   r   googlecloudsdk.corer   r#   r   rY   r+   r7   r?   rF   rI   ArgumentInterceptorrN   rQ   r]   rb   r>   r,   r*   <module>rl      s    3 &  ' Q / 4 5 1 D G )  : @ # C %
P> c G #3#G#G  G
'PX	r,   