
    >	                     n    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  G d dej                        Z
y	)
z<Client for interaction with Gateway CRUD on API Gateway API.    )absolute_import)division)unicode_literals)base)common_flagsc                        e Zd ZdZddZddZy)GatewayClientz4Client for gateway objects on Cloud API Gateway API.Nc                     t         j                  j                  | |dd       | j                          | j	                          | j                  d       | j                  d       | j                          y )N#ApigatewayProjectsLocationsGatewaysprojects_locations_gateways)clientmessage_baseservice_namegatewaysapigatewayGateway)r   
BaseClient__init__	DefineGetDefineDelete
DefineListDefineUpdateDefineIamPolicyFunctions)selfr   s     2lib/googlecloudsdk/api_lib/api_gateway/gateways.pyr   zGatewayClient.__init__   sd    OOT$**O*G  I 	NNOOJ)*!!#    c                    t        j                  || j                  j                  j                        }| j                  j                  |j                         ||j                         |      }| j                  |j                         j                         |j                         |      }| j                  j                  |      }|S )a*  Creates a new gateway object.

    Args:
      gateway_ref: Resource, a resource reference for the gateway
      api_config: Resource, a resource reference for the gateway
      display_name: Optional display name
      labels: Optional cloud labels

    Returns:
      Long running operation.
    )namelabels	apiConfigdisplayName)parent	gatewayIdr   )r   ProcessLabelsFlagmessagesApigatewayGatewayLabelsValueRelativeNamecreate_requestParentNameserviceCreate)r   gateway_ref
api_configdisplay_namer   gatewayreqresps           r   r,   zGatewayClient.Create(   s     ++''335F mm--%%'))+ 	 . 
G 

!!#002""$!  
C
 <<s#DKr   )N)NN)__name__
__module____qualname____doc__r   r,    r   r   r	   r	      s    <	$r   r	   N)r6   
__future__r   r   r   "googlecloudsdk.api_lib.api_gatewayr   &googlecloudsdk.command_lib.api_gatewayr   r   r	   r7   r   r   <module>r;      s*     C &  ' 3 ?,DOO ,r   