Retail v2 API - Class ControlService.ControlServiceClient (2.3.0)

public class ControlServiceClient : ClientBase<ControlService.ControlServiceClient>

Reference documentation and code samples for the Retail v2 API class ControlService.ControlServiceClient.

Client for ControlService

Inheritance

Object > ClientBase > ClientBase<ControlService.ControlServiceClient> > ControlService.ControlServiceClient

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Constructors

ControlServiceClient()

protected ControlServiceClient()

Protected parameterless constructor to allow creation of test doubles.

ControlServiceClient(CallInvoker)

public ControlServiceClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ControlServiceClient(ChannelBase)

public ControlServiceClient(ChannelBase channel)

Creates a new client for ControlService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ControlServiceClient(ClientBase.ClientBaseConfiguration)

protected ControlServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

CreateControl(CreateControlRequest, CallOptions)

public virtual Control CreateControl(CreateControlRequest request, CallOptions options)

Creates a Control.

If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
NameDescription
requestCreateControlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Control

The response received from the server.

CreateControl(CreateControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Control CreateControl(CreateControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Creates a Control.

If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
NameDescription
requestCreateControlRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Control

The response received from the server.

CreateControlAsync(CreateControlRequest, CallOptions)

public virtual AsyncUnaryCall<Control> CreateControlAsync(CreateControlRequest request, CallOptions options)

Creates a Control.

If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
NameDescription
requestCreateControlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Control>

The call object.

CreateControlAsync(CreateControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Control> CreateControlAsync(CreateControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Creates a Control.

If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
NameDescription
requestCreateControlRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Control>

The call object.

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
TypeDescription
Locations.LocationsClient

A new Locations.LocationsClient for the same target as this client.

DeleteControl(DeleteControlRequest, CallOptions)

public virtual Empty DeleteControl(DeleteControlRequest request, CallOptions options)

Deletes a Control.

If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestDeleteControlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteControl(DeleteControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes a Control.

If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestDeleteControlRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteControlAsync(DeleteControlRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteControlAsync(DeleteControlRequest request, CallOptions options)

Deletes a Control.

If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestDeleteControlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

DeleteControlAsync(DeleteControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes a Control.

If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestDeleteControlRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

GetControl(GetControlRequest, CallOptions)

public virtual Control GetControl(GetControlRequest request, CallOptions options)

Gets a Control.

Parameters
NameDescription
requestGetControlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Control

The response received from the server.

GetControl(GetControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Control GetControl(GetControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets a Control.

Parameters
NameDescription
requestGetControlRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Control

The response received from the server.

GetControlAsync(GetControlRequest, CallOptions)

public virtual AsyncUnaryCall<Control> GetControlAsync(GetControlRequest request, CallOptions options)

Gets a Control.

Parameters
NameDescription
requestGetControlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Control>

The call object.

GetControlAsync(GetControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Control> GetControlAsync(GetControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets a Control.

Parameters
NameDescription
requestGetControlRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Control>

The call object.

ListControls(ListControlsRequest, CallOptions)

public virtual ListControlsResponse ListControls(ListControlsRequest request, CallOptions options)

Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].

Parameters
NameDescription
requestListControlsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListControlsResponse

The response received from the server.

ListControls(ListControlsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ListControlsResponse ListControls(ListControlsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].

Parameters
NameDescription
requestListControlsRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListControlsResponse

The response received from the server.

ListControlsAsync(ListControlsRequest, CallOptions)

public virtual AsyncUnaryCall<ListControlsResponse> ListControlsAsync(ListControlsRequest request, CallOptions options)

Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].

Parameters
NameDescription
requestListControlsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListControlsResponse>

The call object.

ListControlsAsync(ListControlsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ListControlsResponse> ListControlsAsync(ListControlsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].

Parameters
NameDescription
requestListControlsRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ListControlsResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override ControlService.ControlServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
ControlService.ControlServiceClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Retail.V2.ControlService.ControlServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

UpdateControl(UpdateControlRequest, CallOptions)

public virtual Control UpdateControl(UpdateControlRequest request, CallOptions options)

Updates a Control.

[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestUpdateControlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Control

The response received from the server.

UpdateControl(UpdateControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Control UpdateControl(UpdateControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Updates a Control.

[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestUpdateControlRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Control

The response received from the server.

UpdateControlAsync(UpdateControlRequest, CallOptions)

public virtual AsyncUnaryCall<Control> UpdateControlAsync(UpdateControlRequest request, CallOptions options)

Updates a Control.

[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestUpdateControlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Control>

The call object.

UpdateControlAsync(UpdateControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Control> UpdateControlAsync(UpdateControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Updates a Control.

[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestUpdateControlRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Control>

The call object.