Retail v2 API - Class ControlService.ControlServiceClient (2.6.0)

public class ControlService.ControlServiceClient : ClientBase<ControlService.ControlServiceClient>

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

Client for ControlService

Inheritance

object > ClientBase > ClientBaseControlServiceControlServiceClient > 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(ClientBaseConfiguration)

protected ControlServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

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, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallControl

The call object.

CreateControlAsync(CreateControlRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallControl

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
LocationsLocationsClient

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, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallEmpty

The call object.

DeleteControlAsync(DeleteControlRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallEmpty

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, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallControl

The call object.

GetControlAsync(GetControlRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallControl

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, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallListControlsResponse

The call object.

ListControlsAsync(ListControlsRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallListControlsResponse

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
ControlServiceControlServiceClient
Overrides

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, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallControl

The call object.

UpdateControlAsync(UpdateControlRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineSystem.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
AsyncUnaryCallControl

The call object.