
                         l    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r " S	 S
5      rg)zJAPI wrapper for `gcloud service-extensions wasm-plugin-versions` commands.    )absolute_import)division)unicode_literals)util)waiter)	resourcesNc                   6    \ rS rSrSrS r    SS jrS rSrg)	Client   zzAPI client for WasmPluginVersion commands.

Attributes:
  messages: API messages class, The Networkservices API messages.
c                    [         R                  " U5      U l        U R                  R                  U l        U R                  R
                  U l        U R                  R                  U l        [        R                  " 5       U l        U R                  R                  S[         R                  R                  U5      5        g )Nnetworkservices)r   GetClientInstance_client'projects_locations_wasmPlugins_versions_wasm_plugin_version_clientprojects_locations_operations_operations_clientMESSAGES_MODULEmessagesr   Registry_resource_parserRegisterApiByNameAPI_VERSION_FOR_TRACKget)selfrelease_tracks     Hlib/googlecloudsdk/api_lib/service_extensions/wasm_plugin_version_api.py__init__Client.__init__"   s    ))-8DL<< 	$ #llHHDLL00DM%..0D++45599-H    Nc                     SnU(       a  [         R                  " U5      nU R                  R                  UUU R                  R	                  UUUUUS9S9n	U R
                  R                  U	5      $ )au  Calls the CreateWasmPluginVersion API.

Args:
  name: string, wasmPluginVersion's name.
  parent: string, wasmPluginVersion's parent relative name.
  image: string, URI of the container image containing the Wasm module,
    stored in the Artifact Registry.
  plugin_config_data: string or bytes, WasmPlugin configuration in the
    textual or binary format.
  plugin_config_uri: string, URI of the container image containing the
    plugin configuration, stored in the Artifact Registry.
  description: string, human-readable description of the service.
  labels: set of label tags.

Returns:
  (Operation) The response message.
N)imageUridescriptionlabelspluginConfigDatapluginConfigUri)parentwasmPluginVersionIdwasmPluginVersion)sixensure_binaryr   @NetworkservicesProjectsLocationsWasmPluginsVersionsCreateRequestWasmPluginVersionr   Create)
r   namer'   imageplugin_config_dataplugin_config_urir#   r$   plugin_config_data_binaryrequests
             r   CreateWasmPluginVersionClient.CreateWasmPluginVersion.   s    6 !% #&"3"34F"GVV $"mm=='!: 1 >  	W 
	
  ++227;;r    c                     [         R                  R                  UR                  SS9n[        R
                  " U R                  U R                  5      n[        R                  " UUU5      $ )a  Waits for the opration to complete and returns the result of the operation.

Args:
  operation_ref: A Resource describing the Operation.
  message: The message to display to the user while they wait.

Returns:
  result of result_service.Get request for the provided operation.
z-networkservices.projects.locations.operations)
collection)	r   REGISTRYParseRelativeNamer/   r   CloudOperationPollerr   r   WaitFor)r   operation_refmessageop_resourcepollers        r   WaitForOperationClient.WaitForOperation^   sj     $$66B 7 K (((($*A*AF >> r    )r   r   r   r   r   )NNNN)	__name__
__module____qualname____firstlineno____doc__r   r5   rA   __static_attributes__ r    r   r
   r
      s%    
" .<`r    r
   )rG   
__future__r   r   r   )googlecloudsdk.api_lib.service_extensionsr   googlecloudsdk.api_lib.utilr   googlecloudsdk.corer   r*   r
   rI   r    r   <module>rN      s,    Q &  ' : . ) 
] ]r    