Class Operations.OperationsClient (2.3.0)

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

Client for Operations

Inheritance

Object > Operations.OperationsClient

Namespace

Google.LongRunning

Assembly

Google.LongRunning.dll

Constructors

OperationsClient()

protected OperationsClient()

Protected parameterless constructor to allow creation of test doubles.

OperationsClient(ClientBaseConfiguration)

protected OperationsClient(ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseConfiguration

The client configuration.

OperationsClient(Grpc.Core.CallInvoker)

public OperationsClient(Grpc.Core.CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerGrpc.Core.CallInvoker

The callInvoker to use to make remote calls.

OperationsClient(Grpc.Core.ChannelBase)

public OperationsClient(Grpc.Core.ChannelBase channel)

Creates a new client for Operations

Parameter
NameDescription
channelGrpc.Core.ChannelBase

The channel to use to make remote calls.

Methods

CancelOperation(CancelOperationRequest, Grpc.Core.CallOptions)

public virtual Protobuf.WellKnownTypes.Empty CancelOperation(CancelOperationRequest request, Grpc.Core.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
NameDescription
requestCancelOperationRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Protobuf.WellKnownTypes.Empty

The response received from the server.

CancelOperation(CancelOperationRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Protobuf.WellKnownTypes.Empty CancelOperation(CancelOperationRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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
NameDescription
requestCancelOperationRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Protobuf.WellKnownTypes.Empty

The response received from the server.

CancelOperationAsync(CancelOperationRequest, Grpc.Core.CallOptions)

public virtual Grpc.Core.AsyncUnaryCall<Protobuf.WellKnownTypes.Empty> CancelOperationAsync(CancelOperationRequest request, Grpc.Core.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
NameDescription
requestCancelOperationRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<Protobuf.WellKnownTypes.Empty>

The call object.

CancelOperationAsync(CancelOperationRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Grpc.Core.AsyncUnaryCall<Protobuf.WellKnownTypes.Empty> CancelOperationAsync(CancelOperationRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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
NameDescription
requestCancelOperationRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<Protobuf.WellKnownTypes.Empty>

The call object.

DeleteOperation(DeleteOperationRequest, Grpc.Core.CallOptions)

public virtual Protobuf.WellKnownTypes.Empty DeleteOperation(DeleteOperationRequest request, Grpc.Core.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
NameDescription
requestDeleteOperationRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Protobuf.WellKnownTypes.Empty

The response received from the server.

DeleteOperation(DeleteOperationRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Protobuf.WellKnownTypes.Empty DeleteOperation(DeleteOperationRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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
NameDescription
requestDeleteOperationRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Protobuf.WellKnownTypes.Empty

The response received from the server.

DeleteOperationAsync(DeleteOperationRequest, Grpc.Core.CallOptions)

public virtual Grpc.Core.AsyncUnaryCall<Protobuf.WellKnownTypes.Empty> DeleteOperationAsync(DeleteOperationRequest request, Grpc.Core.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
NameDescription
requestDeleteOperationRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<Protobuf.WellKnownTypes.Empty>

The call object.

DeleteOperationAsync(DeleteOperationRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Grpc.Core.AsyncUnaryCall<Protobuf.WellKnownTypes.Empty> DeleteOperationAsync(DeleteOperationRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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
NameDescription
requestDeleteOperationRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<Protobuf.WellKnownTypes.Empty>

The call object.

GetOperation(GetOperationRequest, Grpc.Core.CallOptions)

public virtual Operation GetOperation(GetOperationRequest request, Grpc.Core.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
NameDescription
requestGetOperationRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

GetOperation(GetOperationRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Operation GetOperation(GetOperationRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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
NameDescription
requestGetOperationRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

GetOperationAsync(GetOperationRequest, Grpc.Core.CallOptions)

public virtual Grpc.Core.AsyncUnaryCall<Operation> GetOperationAsync(GetOperationRequest request, Grpc.Core.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
NameDescription
requestGetOperationRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<Operation>

The call object.

GetOperationAsync(GetOperationRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Grpc.Core.AsyncUnaryCall<Operation> GetOperationAsync(GetOperationRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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
NameDescription
requestGetOperationRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<Operation>

The call object.

ListOperations(ListOperationsRequest, Grpc.Core.CallOptions)

public virtual ListOperationsResponse ListOperations(ListOperationsRequest request, Grpc.Core.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 &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.

Parameters
NameDescription
requestListOperationsRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
ListOperationsResponse

The response received from the server.

ListOperations(ListOperationsRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual ListOperationsResponse ListOperations(ListOperationsRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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.

Parameters
NameDescription
requestListOperationsRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListOperationsResponse

The response received from the server.

ListOperationsAsync(ListOperationsRequest, Grpc.Core.CallOptions)

public virtual Grpc.Core.AsyncUnaryCall<ListOperationsResponse> ListOperationsAsync(ListOperationsRequest request, Grpc.Core.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 &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.

Parameters
NameDescription
requestListOperationsRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<ListOperationsResponse>

The call object.

ListOperationsAsync(ListOperationsRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Grpc.Core.AsyncUnaryCall<ListOperationsResponse> ListOperationsAsync(ListOperationsRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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.

Parameters
NameDescription
requestListOperationsRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<ListOperationsResponse>

The call object.

NewInstance(ClientBaseConfiguration)

protected override Operations.OperationsClient NewInstance(ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseConfiguration
Returns
TypeDescription
Operations.OperationsClient

WaitOperation(WaitOperationRequest, Grpc.Core.CallOptions)

public virtual Operation WaitOperation(WaitOperationRequest request, Grpc.Core.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
NameDescription
requestWaitOperationRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

WaitOperation(WaitOperationRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Operation WaitOperation(WaitOperationRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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
NameDescription
requestWaitOperationRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

WaitOperationAsync(WaitOperationRequest, Grpc.Core.CallOptions)

public virtual Grpc.Core.AsyncUnaryCall<Operation> WaitOperationAsync(WaitOperationRequest request, Grpc.Core.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
NameDescription
requestWaitOperationRequest

The request to send to the server.

optionsGrpc.Core.CallOptions

The options for the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<Operation>

The call object.

WaitOperationAsync(WaitOperationRequest, Grpc.Core.Metadata, Nullable<System.DateTime>, System.Threading.CancellationToken)

public virtual Grpc.Core.AsyncUnaryCall<Operation> WaitOperationAsync(WaitOperationRequest request, Grpc.Core.Metadata headers = null, System.DateTime? deadline = null, System.Threading.CancellationToken cancellationToken = null)

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
NameDescription
requestWaitOperationRequest

The request to send to the server.

headersGrpc.Core.Metadata

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

deadlineNullable<System.DateTime>

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

cancellationTokenSystem.Threading.CancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Grpc.Core.AsyncUnaryCall<Operation>

The call object.