
    z
                     z    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	\	R                  5      rg
)z8Client for interaction with Api CRUD on API Gateway API.    )absolute_import)division)unicode_literals)
exceptions)base)common_flagsc                   6    \ rS rSrSrSS jrS r  S	S jrSrg)
	ApiClient   z0Client for Api objects on Cloud API Gateway API.Nc                     [         R                  R                  U USSS9  U R                  5         U R	                  S5        U R                  S5        U R                  5         U R                  5         g )NApigatewayProjectsLocationsApisprojects_locations_apis)clientmessage_baseservice_nameapisapigatewayApi)r   
BaseClient__init__	DefineGet
DefineListDefineUpdateDefineDeleteDefineIamPolicyFunctions)selfr   s     .lib/googlecloudsdk/api_lib/api_gateway/apis.pyr   ApiClient.__init__   sc    OOT$**K*C  E 	NNOOFo&!!#    c                 \     U R                  U5        g! [        R                   a     gf = f)zChecks if an Api object exists.

Args:
  api_ref: Resource, a resource reference for the api

Returns:
  Boolean, indicating whether or not exists
FT)Getapitools_exceptionsHttpNotFoundError)r   api_refs     r   	DoesExistApiClient.DoesExist*   s2    
hhw  00 s    ++c                 l   [         R                  " UU R                  R                  R                  5      nU R                  R                  UR                  5       UUUS9nU R                  UR                  5       UUR                  5       R                  5       S9nU R                  R                  U5      $ )a  Creates a new Api object.

Args:
  api_ref: Resource, a resource reference for the api
  managed_service: Optional string, reference name for OP service
  labels: Optional cloud labels
  display_name: Optional display name

Returns:
  Long running operation response object.
)namemanagedServicelabelsdisplayName)apiIdr   parent)r   ProcessLabelsFlagmessagesApigatewayApiLabelsValueRelativeNamecreate_requestNameParentserviceCreate)r   r#   managed_servicer)   display_nameapireqs          r   r6   ApiClient.Create:   s     ++##//1F --
%
%!!#& 	 & "C 

lln~~,,.  0C
 <<s##r    )N)NNN)	__name__
__module____qualname____firstlineno____doc__r   r$   r6   __static_attributes__r<   r   r   r
   r
      s    8	$  :>$r   r
   N)rA   
__future__r   r   r   apitools.base.pyr   r!   "googlecloudsdk.api_lib.api_gatewayr   &googlecloudsdk.command_lib.api_gatewayr   r   r
   r<   r   r   <module>rG      s,     ? &  ' > 3 ?9$ 9$r   