
    ni                     F    d dl mZ d dlmZ d dlmZ  G d de          ZdS )    )	Operation)GetOperationRequest)KaggleHttpClientc                   4    e Zd ZdZdefdZd	dededefdZ	dS )
OperationsClientaC  
  Manages long-running operations with an API service.

  When an API method normally takes long time to complete, it can be designed
  to return [Operation][google.longrunning.Operation] to the client, and the
  client can use this interface to receive the real response asynchronously by
  polling the operation resource, or pass the operation resource to another API
  (such as Pub/Sub API) to receive the response.  Any API service that returns
  long-running operations should implement the `Operations` interface so
  developers can have a consistent client experience.
  clientc                     || _         d S )N)_client)selfr   s     i/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/kagglesdk/common/services/operations_service.py__init__zOperationsClient.__init__   s    DLLL    Nrequestnamereturnc                     t          |g          }||rt          d          |t                      }|||_        | j                            dd|t                    S )a  
    Gets the latest state of a long-running operation.  Clients can use this
    method to poll the operation result at intervals as recommended by the API
    service.

    Args:
      request (GetOperationRequest):
        The request object; initialized to empty instance if not specified.
        May not be specified if any of the flattened field params are specified.
      name (str)
        This corresponds to the ``name`` field on the ``request`` instance;
        if ``request`` is provided, this should not be set.
    Nz\If the `request` argument is set, then none of the individual field arguments should be set.zcommon.OperationsServiceGetOperation)any
ValueErrorr   r   r
   callr   )r   r   r   has_flattened_argss       r   get_operationzOperationsClient.get_operation   sv     dV1 G H H H #%%g		<7R[\\\r   )NN)
__name__
__module____qualname____doc__r   r   r   strr   r    r   r   r   r      st        
 
-    ] ]#6 ]S ]T] ] ] ] ] ] ]r   r   N)!kagglesdk.common.types.operationsr   )kagglesdk.common.types.operations_servicer   kagglesdk.kaggle_http_clientr   objectr   r   r   r   <module>r#      sy    7 7 7 7 7 7 I I I I I I 9 9 9 9 9 9)] )] )] )] )]v )] )] )] )] )]r   