
                             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rSr\R"                  " \R$                  R&                  5       " S S\R(                  5      5       r\R"                  " \R$                  R,                  \R$                  R.                  5       " S S\R(                  5      5       rg)z4`gcloud service-directory endpoints create` command.    )absolute_import)division)unicode_literals)	endpoints)base)flags)resource_args)util)logendpointi   c                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Create    Creates an endpoint.EXAMPLESa            To create a Service Directory endpoint, run:

            $ {command} my-endpoint --service=my-service --namespace=my-namespace --location=us-east1 --address=1.2.3.4 --port=5 --annotations=a=b,c=d  --network=projects/123456789/locations/global/networks/default
          c                     [         R                  " U S5        [        R                  " U 5        [        R                  " U 5        [        R
                  " U [        [        5        [        R                  " U 5        g NaT  to create. The endpoint id must be 1-63 characters long and match
        the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means
        the first character must be a lowercase letter, and all following
        characters must be a dash, lowercase letter, or digit, except the last
        character, which cannot be a dash.)	r	   AddEndpointResourceArgr   AddAddressFlagAddPortFlagAddAnnotationsFlag_RESOURCE_TYPE_ENDPOINT_LIMITAddNetworkFlagparsers    1lib/surface/service_directory/endpoints/create.pyArgsCreate.Args-   sV    ((	./ 
 	f	V^_E	     c                 p   [         R                  " 5       nUR                  R                  R	                  5       n[
        R                  " UR                  [        5      nUR                  X1R                  UR                  UUR                  5      n[        R                  " UR                  [        5        U$ N)r   EndpointsClientCONCEPTSr   Parser
   ParseAnnotationsArgannotationsr   r   addressportnetworkr   CreatedResourceendpointsId)selfargsclientendpoint_refr'   results         r   Run
Create.Run;   s~    &&(F==))//1L**4+;+;^LK]]<tyy+<<)F00.AMr     N
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r2   __static_attributes__r4   r    r   r   r       /     - ! !	r    r   c                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	
CreateBetaG   r   r   a            To create a Service Directory endpoint, run:

            $ {command} my-endpoint --service=my-service --namespace=my-namespace --location=us-east1 --address=1.2.3.4 --port=5 --metadata=a=b,c=d --network=projects/123456789/locations/global/networks/default
          c                     [         R                  " U S5        [        R                  " U 5        [        R                  " U 5        [        R
                  " U [        [        5        [        R                  " U 5        g r   )	r	   r   r   r   r   AddMetadataFlagr   r   r   r   s    r   r   CreateBeta.ArgsT   sV    ((	./ 
 	f	&./B	 r    c                 p   [         R                  " 5       nUR                  R                  R	                  5       n[
        R                  " UR                  [        5      nUR                  X1R                  UR                  UUR                  5      n[        R                  " UR                  [        5        U$ r"   )r   EndpointsClientBetar$   r   r%   r
   ParseMetadataArgmetadatar   r   r(   r)   r*   r   r+   r,   )r-   r.   r/   r0   rH   r1   s         r   r2   CreateBeta.Runb   s|    **,F==))//1L$$T]]NCH]]<tyy(<<)F00.AMr    r4   Nr5   r4   r    r   r@   r@   G   r>   r    r@   N)r:   
__future__r   r   r   (googlecloudsdk.api_lib.service_directoryr   googlecloudsdk.callioper   ,googlecloudsdk.command_lib.service_directoryr   r	   r
   googlecloudsdk.corer   r   r   ReleaseTracksReleaseTrackGACreateCommandr   ALPHABETAr@   r4   r    r   <module>rU      s    ; &  ' > ( > F = # D%%(()#T # *#L D%%++T->->-C-CD### # E#r    