Discovery Engine v1beta API - Class DocumentService.DocumentServiceClient (1.0.0-beta11)

public class DocumentService.DocumentServiceClient : ClientBase<DocumentService.DocumentServiceClient>

Reference documentation and code samples for the Discovery Engine v1beta API class DocumentService.DocumentServiceClient.

Client for DocumentService

Inheritance

object > ClientBase > ClientBaseDocumentServiceDocumentServiceClient > DocumentService.DocumentServiceClient

Namespace

Google.Cloud.DiscoveryEngine.V1Beta

Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

Constructors

DocumentServiceClient()

protected DocumentServiceClient()

Protected parameterless constructor to allow creation of test doubles.

DocumentServiceClient(CallInvoker)

public DocumentServiceClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

DocumentServiceClient(ChannelBase)

public DocumentServiceClient(ChannelBase channel)

Creates a new client for DocumentService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

DocumentServiceClient(ClientBaseConfiguration)

protected DocumentServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateDocument(CreateDocumentRequest, CallOptions)

public virtual Document CreateDocument(CreateDocumentRequest request, CallOptions options)

Creates a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Document

The response received from the server.

CreateDocument(CreateDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual Document CreateDocument(CreateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Document

The response received from the server.

CreateDocumentAsync(CreateDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Document> CreateDocumentAsync(CreateDocumentRequest request, CallOptions options)

Creates a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallDocument

The call object.

CreateDocumentAsync(CreateDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Document> CreateDocumentAsync(CreateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallDocument

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.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
OperationsOperationsClient

A new Operations client for the same target as this client.

DeleteDocument(DeleteDocumentRequest, CallOptions)

public virtual Empty DeleteDocument(DeleteDocumentRequest request, CallOptions options)

Deletes a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteDocument(DeleteDocumentRequest, Metadata, DateTime?, CancellationToken)

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

Deletes a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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.

DeleteDocumentAsync(DeleteDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteDocumentAsync(DeleteDocumentRequest request, CallOptions options)

Deletes a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteDocumentAsync(DeleteDocumentRequest, Metadata, DateTime?, CancellationToken)

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

Deletes a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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.

GetDocument(GetDocumentRequest, CallOptions)

public virtual Document GetDocument(GetDocumentRequest request, CallOptions options)

Gets a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Document

The response received from the server.

GetDocument(GetDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual Document GetDocument(GetDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Document

The response received from the server.

GetDocumentAsync(GetDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Document> GetDocumentAsync(GetDocumentRequest request, CallOptions options)

Gets a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallDocument

The call object.

GetDocumentAsync(GetDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Document> GetDocumentAsync(GetDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallDocument

The call object.

ImportDocuments(ImportDocumentsRequest, CallOptions)

public virtual Operation ImportDocuments(ImportDocumentsRequest request, CallOptions options)

Bulk import of multiple [Document][google.cloud.discoveryengine.v1beta.Document]s. Request processing may be synchronous. Non-existing items will be created.

Note: It is possible for a subset of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be successfully updated.

Parameters
NameDescription
requestImportDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

ImportDocuments(ImportDocumentsRequest, Metadata, DateTime?, CancellationToken)

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

Bulk import of multiple [Document][google.cloud.discoveryengine.v1beta.Document]s. Request processing may be synchronous. Non-existing items will be created.

Note: It is possible for a subset of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be successfully updated.

Parameters
NameDescription
requestImportDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Operation

The response received from the server.

ImportDocumentsAsync(ImportDocumentsRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> ImportDocumentsAsync(ImportDocumentsRequest request, CallOptions options)

Bulk import of multiple [Document][google.cloud.discoveryengine.v1beta.Document]s. Request processing may be synchronous. Non-existing items will be created.

Note: It is possible for a subset of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be successfully updated.

Parameters
NameDescription
requestImportDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

ImportDocumentsAsync(ImportDocumentsRequest, Metadata, DateTime?, CancellationToken)

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

Bulk import of multiple [Document][google.cloud.discoveryengine.v1beta.Document]s. Request processing may be synchronous. Non-existing items will be created.

Note: It is possible for a subset of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be successfully updated.

Parameters
NameDescription
requestImportDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallOperation

The call object.

ListDocuments(ListDocumentsRequest, CallOptions)

public virtual ListDocumentsResponse ListDocuments(ListDocumentsRequest request, CallOptions options)

Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListDocumentsResponse

The response received from the server.

ListDocuments(ListDocumentsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListDocumentsResponse ListDocuments(ListDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
ListDocumentsResponse

The response received from the server.

ListDocumentsAsync(ListDocumentsRequest, CallOptions)

public virtual AsyncUnaryCall<ListDocumentsResponse> ListDocumentsAsync(ListDocumentsRequest request, CallOptions options)

Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListDocumentsResponse

The call object.

ListDocumentsAsync(ListDocumentsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListDocumentsResponse> ListDocumentsAsync(ListDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallListDocumentsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override DocumentService.DocumentServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
DocumentServiceDocumentServiceClient
Overrides

PurgeDocuments(PurgeDocumentsRequest, CallOptions)

public virtual Operation PurgeDocuments(PurgeDocumentsRequest request, CallOptions options)

Permanently deletes all selected [Document][google.cloud.discoveryengine.v1beta.Document]s in a branch.

This process is asynchronous. Depending on the number of [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, this operation can take hours to complete. Before the delete operation completes, some [Document][google.cloud.discoveryengine.v1beta.Document]s might still be returned by [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] or [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].

To get a list of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, set [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] to false.

Parameters
NameDescription
requestPurgeDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

PurgeDocuments(PurgeDocumentsRequest, Metadata, DateTime?, CancellationToken)

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

Permanently deletes all selected [Document][google.cloud.discoveryengine.v1beta.Document]s in a branch.

This process is asynchronous. Depending on the number of [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, this operation can take hours to complete. Before the delete operation completes, some [Document][google.cloud.discoveryengine.v1beta.Document]s might still be returned by [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] or [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].

To get a list of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, set [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] to false.

Parameters
NameDescription
requestPurgeDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Operation

The response received from the server.

PurgeDocumentsAsync(PurgeDocumentsRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> PurgeDocumentsAsync(PurgeDocumentsRequest request, CallOptions options)

Permanently deletes all selected [Document][google.cloud.discoveryengine.v1beta.Document]s in a branch.

This process is asynchronous. Depending on the number of [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, this operation can take hours to complete. Before the delete operation completes, some [Document][google.cloud.discoveryengine.v1beta.Document]s might still be returned by [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] or [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].

To get a list of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, set [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] to false.

Parameters
NameDescription
requestPurgeDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

PurgeDocumentsAsync(PurgeDocumentsRequest, Metadata, DateTime?, CancellationToken)

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

Permanently deletes all selected [Document][google.cloud.discoveryengine.v1beta.Document]s in a branch.

This process is asynchronous. Depending on the number of [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, this operation can take hours to complete. Before the delete operation completes, some [Document][google.cloud.discoveryengine.v1beta.Document]s might still be returned by [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] or [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].

To get a list of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, set [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] to false.

Parameters
NameDescription
requestPurgeDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallOperation

The call object.

UpdateDocument(UpdateDocumentRequest, CallOptions)

public virtual Document UpdateDocument(UpdateDocumentRequest request, CallOptions options)

Updates a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Document

The response received from the server.

UpdateDocument(UpdateDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual Document UpdateDocument(UpdateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Document

The response received from the server.

UpdateDocumentAsync(UpdateDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Document> UpdateDocumentAsync(UpdateDocumentRequest request, CallOptions options)

Updates a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallDocument

The call object.

UpdateDocumentAsync(UpdateDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Document> UpdateDocumentAsync(UpdateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a [Document][google.cloud.discoveryengine.v1beta.Document].

Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallDocument

The call object.