Google.LongRunning - Class Operations.OperationsClient (3.3.0)

public class Operations.OperationsClient : ClientBase<Operations.OperationsClient>

Reference documentation and code samples for the Google.LongRunning class Operations.OperationsClient.

Client for Operations

Inheritance

object > ClientBase > ClientBaseOperationsOperationsClient > Operations.OperationsClient

Namespace

Google.LongRunning

Assembly

Google.LongRunning.dll

Constructors

OperationsClient()

protected OperationsClient()

Protected parameterless constructor to allow creation of test doubles.

OperationsClient(CallInvoker)

public OperationsClient(CallInvoker callInvoker)

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

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

OperationsClient(ChannelBase)

public OperationsClient(ChannelBase channel)

Creates a new client for Operations

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

OperationsClient(ClientBaseConfiguration)

protected OperationsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

CancelOperation(CancelOperationRequest, CallOptions)

public virtual Empty CancelOperation(CancelOperationRequest request, CallOptions options)

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.

Parameters
Name Description
request CancelOperationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Empty

The response received from the server.

CancelOperation(CancelOperationRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty CancelOperation(CancelOperationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request CancelOperationRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

CancelOperationAsync(CancelOperationRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> CancelOperationAsync(CancelOperationRequest request, CallOptions options)

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.

Parameters
Name Description
request CancelOperationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

CancelOperationAsync(CancelOperationRequest, Metadata, DateTime?, CancellationToken)

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

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.

Parameters
Name Description
request CancelOperationRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

DeleteOperation(DeleteOperationRequest, CallOptions)

public virtual Empty DeleteOperation(DeleteOperationRequest request, CallOptions options)

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.

Parameters
Name Description
request DeleteOperationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteOperation(DeleteOperationRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteOperation(DeleteOperationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request DeleteOperationRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteOperationAsync(DeleteOperationRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteOperationAsync(DeleteOperationRequest request, CallOptions options)

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.

Parameters
Name Description
request DeleteOperationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

DeleteOperationAsync(DeleteOperationRequest, Metadata, DateTime?, CancellationToken)

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

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.

Parameters
Name Description
request DeleteOperationRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

GetOperation(GetOperationRequest, CallOptions)

public virtual Operation GetOperation(GetOperationRequest request, CallOptions options)

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.

Parameters
Name Description
request GetOperationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

GetOperation(GetOperationRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation GetOperation(GetOperationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request GetOperationRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

GetOperationAsync(GetOperationRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> GetOperationAsync(GetOperationRequest request, CallOptions options)

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.

Parameters
Name Description
request GetOperationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

GetOperationAsync(GetOperationRequest, Metadata, DateTime?, CancellationToken)

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

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.

Parameters
Name Description
request GetOperationRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

ListOperations(ListOperationsRequest, CallOptions)

public virtual ListOperationsResponse ListOperations(ListOperationsRequest request, CallOptions options)

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.

Parameters
Name Description
request ListOperationsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListOperationsResponse

The response received from the server.

ListOperations(ListOperationsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListOperationsResponse ListOperations(ListOperationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request ListOperationsRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListOperationsResponse

The response received from the server.

ListOperationsAsync(ListOperationsRequest, CallOptions)

public virtual AsyncUnaryCall<ListOperationsResponse> ListOperationsAsync(ListOperationsRequest request, CallOptions options)

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.

Parameters
Name Description
request ListOperationsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListOperationsResponse

The call object.

ListOperationsAsync(ListOperationsRequest, Metadata, DateTime?, CancellationToken)

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

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.

Parameters
Name Description
request ListOperationsRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListOperationsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override Operations.OperationsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
OperationsOperationsClient
Overrides

WaitOperation(WaitOperationRequest, CallOptions)

public virtual Operation WaitOperation(WaitOperationRequest request, CallOptions options)

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.

Parameters
Name Description
request WaitOperationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

WaitOperation(WaitOperationRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation WaitOperation(WaitOperationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request WaitOperationRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

WaitOperationAsync(WaitOperationRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> WaitOperationAsync(WaitOperationRequest request, CallOptions options)

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.

Parameters
Name Description
request WaitOperationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

WaitOperationAsync(WaitOperationRequest, Metadata, DateTime?, CancellationToken)

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

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.

Parameters
Name Description
request WaitOperationRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.