o
    }j6h8                     @   s`   d Z ddlmZ ddlZddlmZ G dd deZ	G dd deZ
d	d
 ZG dd deZdS )zEClient and server classes corresponding to protobuf-defined services.    )	empty_pb2N)operations_proto_pb2c                   @   s   e Zd ZdZdd ZdS )OperationsStub]  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
    Google Cloud 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.
    c                 C   s   |j dtjjtjjd| _|j dtjjtjjd| _	|j dtj
jtjjd| _|j dtjjtjjd| _|j dtjjtjjd| _dS )zIConstructor.

        Args:
            channel: A grpc.Channel.
        -/google.longrunning.Operations/ListOperations)request_serializerresponse_deserializer+/google.longrunning.Operations/GetOperation./google.longrunning.Operations/DeleteOperation./google.longrunning.Operations/CancelOperation,/google.longrunning.Operations/WaitOperationN)unary_unary*google_dot_longrunning_dot_operations__pb2ListOperationsRequestSerializeToStringListOperationsResponse
FromStringListOperationsGetOperationRequest	OperationGetOperationDeleteOperationRequest"google_dot_protobuf_dot_empty__pb2EmptyDeleteOperationCancelOperationRequestCancelOperationWaitOperationRequestWaitOperation)selfchannel r!   u/var/www/html/chefvision.cloud.itp360.com/venv/lib/python3.10/site-packages/google/longrunning/operations_pb2_grpc.py__init__&   s2   zOperationsStub.__init__N)__name__
__module____qualname____doc__r#   r!   r!   r!   r"   r      s    r   c                   @   s8   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d ZdS )OperationsServicerr   c                 C       | tjj |d td)a  Lists operations that match the specified filter in the request. If the
        server doesn't support this method, it returns `UNIMPLEMENTED`.

        NOTE: the `name` binding allows API services to override the binding
        to use different resource name schemes, such as `users/*/operations`. To
        override the binding, API services can add a binding such as
        `"/v1/{name=users/*}/operations"` to their service configuration.
        For backwards compatibility, the default name includes the operations
        collection id, however overriding users must ensure the name binding
        is the parent resource, without the operations collection id.
        Method not implemented!set_codegrpc
StatusCodeUNIMPLEMENTEDset_detailsNotImplementedErrorr   requestcontextr!   r!   r"   r   S      
z!OperationsServicer.ListOperationsc                 C   r)   )zGets 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.
        r*   r+   r2   r!   r!   r"   r   c   s   
zOperationsServicer.GetOperationc                 C   r)   )a  Deletes a long-running operation. This method indicates that the client is
        no longer interested in the operation result. It does not cancel the
        operation. If the server doesn't support this method, it returns
        `google.rpc.Code.UNIMPLEMENTED`.
        r*   r+   r2   r!   r!   r"   r   l   s   
z"OperationsServicer.DeleteOperationc                 C   r)   )a  Starts asynchronous cancellation on a long-running operation.  The server
        makes a best effort to cancel the operation, but success is not
        guaranteed.  If the server doesn't support this method, it returns
        `google.rpc.Code.UNIMPLEMENTED`.  Clients can use
        [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
        other methods to check whether the cancellation succeeded or whether the
        operation completed despite cancellation. On successful cancellation,
        the operation is not deleted; instead, it becomes an operation with
        an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
        corresponding to `Code.CANCELLED`.
        r*   r+   r2   r!   r!   r"   r   v   r5   z"OperationsServicer.CancelOperationc                 C   r)   )a  Waits until the specified long-running operation is done or reaches at most
        a specified timeout, returning the latest state.  If the operation is
        already done, the latest state is immediately returned.  If the timeout
        specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
        timeout is used.  If the server does not support this method, it returns
        `google.rpc.Code.UNIMPLEMENTED`.
        Note that this method is on a best-effort basis.  It may return the latest
        state before the specified timeout (including immediately), meaning even an
        immediate response is no guarantee that the operation is done.
        r*   r+   r2   r!   r!   r"   r      s   
z OperationsServicer.WaitOperationN)	r$   r%   r&   r'   r   r   r   r   r   r!   r!   r!   r"   r(   G   s    	
r(   c              	   C   s   t j| jtjjtjjdt j| jtj	jtj
jdt j| jtjjtjjdt j| jtjjtjjdt j| jtjjtj
jdd}t d|}||f d S )N)request_deserializerresponse_serializer)r   r   r   r   r   zgoogle.longrunning.Operations)r-   unary_unary_rpc_method_handlerr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   method_handlers_generic_handleradd_generic_rpc_handlers)servicerserverrpc_method_handlersgeneric_handlerr!   r!   r"    add_OperationsServicer_to_server   s<   r?   c                   @   s   e Zd ZdZe								dddZe								dddZe								dd	d
Ze								dddZe								dddZ	dS )
Operationsr   r!   NFc
           
      C   ,   t j| |dtjjtjj||||||||	S )Nr   )r-   experimentalr   r   r   r   r   r   
r3   targetoptionschannel_credentialscall_credentialsinsecurecompressionwait_for_readytimeoutmetadatar!   r!   r"   r         zOperations.ListOperationsc
           
      C   rA   )Nr	   )r-   rB   r   r   r   r   r   r   rC   r!   r!   r"   r      rM   zOperations.GetOperationc
           
      C   ,   t j| |dtjjtjj||||||||	S )Nr
   )	r-   rB   r   r   r   r   r   r   r   rC   r!   r!   r"   r      rM   zOperations.DeleteOperationc
           
      C   rN   )Nr   )	r-   rB   r   r   r   r   r   r   r   rC   r!   r!   r"   r     rM   zOperations.CancelOperationc
           
      C   rA   )Nr   )r-   rB   r   r   r   r   r   r   rC   r!   r!   r"   r   9  rM   zOperations.WaitOperation)r!   NNFNNNN)
r$   r%   r&   r'   staticmethodr   r   r   r   r   r!   r!   r!   r"   r@      sh    r@   )r'   google.protobufr   r   r-   google.longrunningr   r   objectr   r(   r?   r@   r!   r!   r!   r"   <module>   s   -O#