Show / Hide Table of Contents

Class Operations.OperationsClient

Client for Operations

Inheritance
System.Object
ClientBase
ClientBase<Operations.OperationsClient>
Operations.OperationsClient
Inherited Members
ClientBase<Operations.OperationsClient>.WithHost(String)
ClientBase.CallInvoker
System.Object.ToString()
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.LongRunning
Assembly: Google.LongRunning.dll
Syntax
public class OperationsClient : ClientBase<Operations.OperationsClient>

Constructors

OperationsClient()

Protected parameterless constructor to allow creation of test doubles.

Declaration
protected OperationsClient()

OperationsClient(CallInvoker)

Creates a new client for Operations that uses a custom CallInvoker.

Declaration
public OperationsClient(CallInvoker callInvoker)
Parameters
Type Name Description
CallInvoker callInvoker

The callInvoker to use to make remote calls.

OperationsClient(Channel)

Creates a new client for Operations

Declaration
public OperationsClient(Channel channel)
Parameters
Type Name Description
Channel channel

The channel to use to make remote calls.

OperationsClient(ClientBase.ClientBaseConfiguration)

Protected constructor to allow creation of configured clients.

Declaration
protected OperationsClient(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type Name Description
ClientBase.ClientBaseConfiguration configuration

The client configuration.

Methods

CancelOperation(CancelOperationRequest, CallOptions)

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.

Declaration
public virtual Empty CancelOperation(CancelOperationRequest request, CallOptions options)
Parameters
Type Name Description
CancelOperationRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Empty

The response received from the server.

CancelOperation(CancelOperationRequest, Metadata, Nullable<DateTime>, CancellationToken)

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.

Declaration
public virtual Empty CancelOperation(CancelOperationRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CancelOperationRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

CancelOperationAsync(CancelOperationRequest, CallOptions)

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.

Declaration
public virtual AsyncUnaryCall<Empty> CancelOperationAsync(CancelOperationRequest request, CallOptions options)
Parameters
Type Name Description
CancelOperationRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

CancelOperationAsync(CancelOperationRequest, Metadata, Nullable<DateTime>, CancellationToken)

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.

Declaration
public virtual AsyncUnaryCall<Empty> CancelOperationAsync(CancelOperationRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CancelOperationRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteOperation(DeleteOperationRequest, CallOptions)

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.

Declaration
public virtual Empty DeleteOperation(DeleteOperationRequest request, CallOptions options)
Parameters
Type Name Description
DeleteOperationRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteOperation(DeleteOperationRequest, Metadata, Nullable<DateTime>, CancellationToken)

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.

Declaration
public virtual Empty DeleteOperation(DeleteOperationRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
DeleteOperationRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteOperationAsync(DeleteOperationRequest, CallOptions)

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.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteOperationAsync(DeleteOperationRequest request, CallOptions options)
Parameters
Type Name Description
DeleteOperationRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteOperationAsync(DeleteOperationRequest, Metadata, Nullable<DateTime>, CancellationToken)

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.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteOperationAsync(DeleteOperationRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
DeleteOperationRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

GetOperation(GetOperationRequest, CallOptions)

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.

Declaration
public virtual Operation GetOperation(GetOperationRequest request, CallOptions options)
Parameters
Type Name Description
GetOperationRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Operation

The response received from the server.

GetOperation(GetOperationRequest, Metadata, Nullable<DateTime>, CancellationToken)

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.

Declaration
public virtual Operation GetOperation(GetOperationRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
GetOperationRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

GetOperationAsync(GetOperationRequest, CallOptions)

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.

Declaration
public virtual AsyncUnaryCall<Operation> GetOperationAsync(GetOperationRequest request, CallOptions options)
Parameters
Type Name Description
GetOperationRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Operation>

The call object.

GetOperationAsync(GetOperationRequest, Metadata, Nullable<DateTime>, CancellationToken)

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.

Declaration
public virtual AsyncUnaryCall<Operation> GetOperationAsync(GetOperationRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
GetOperationRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Operation>

The call object.

ListOperations(ListOperationsRequest, CallOptions)

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 &quot;/v1/{name=users/*}/operations&quot; 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.

Declaration
public virtual ListOperationsResponse ListOperations(ListOperationsRequest request, CallOptions options)
Parameters
Type Name Description
ListOperationsRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ListOperationsResponse

The response received from the server.

ListOperations(ListOperationsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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 &quot;/v1/{name=users/*}/operations&quot; 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.

Declaration
public virtual ListOperationsResponse ListOperations(ListOperationsRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
ListOperationsRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ListOperationsResponse

The response received from the server.

ListOperationsAsync(ListOperationsRequest, CallOptions)

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 &quot;/v1/{name=users/*}/operations&quot; 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.

Declaration
public virtual AsyncUnaryCall<ListOperationsResponse> ListOperationsAsync(ListOperationsRequest request, CallOptions options)
Parameters
Type Name Description
ListOperationsRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ListOperationsResponse>

The call object.

ListOperationsAsync(ListOperationsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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 &quot;/v1/{name=users/*}/operations&quot; 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.

Declaration
public virtual AsyncUnaryCall<ListOperationsResponse> ListOperationsAsync(ListOperationsRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
ListOperationsRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ListOperationsResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

Creates a new instance of client from given ClientBaseConfiguration.

Declaration
protected override Operations.OperationsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type Name Description
ClientBase.ClientBaseConfiguration configuration
Returns
Type Description
Operations.OperationsClient
Overrides
Grpc.Core.ClientBase<Google.LongRunning.Operations.OperationsClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

WaitOperation(WaitOperationRequest, CallOptions)

Waits for the specified long-running operation until it 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.

Declaration
public virtual Operation WaitOperation(WaitOperationRequest request, CallOptions options)
Parameters
Type Name Description
WaitOperationRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Operation

The response received from the server.

WaitOperation(WaitOperationRequest, Metadata, Nullable<DateTime>, CancellationToken)

Waits for the specified long-running operation until it 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.

Declaration
public virtual Operation WaitOperation(WaitOperationRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
WaitOperationRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

WaitOperationAsync(WaitOperationRequest, CallOptions)

Waits for the specified long-running operation until it 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.

Declaration
public virtual AsyncUnaryCall<Operation> WaitOperationAsync(WaitOperationRequest request, CallOptions options)
Parameters
Type Name Description
WaitOperationRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Operation>

The call object.

WaitOperationAsync(WaitOperationRequest, Metadata, Nullable<DateTime>, CancellationToken)

Waits for the specified long-running operation until it 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.

Declaration
public virtual AsyncUnaryCall<Operation> WaitOperationAsync(WaitOperationRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
WaitOperationRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

System.Nullable<System.DateTime> deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

System.Threading.CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Operation>

The call object.

Back to top