Discovery Engine v1 API - Class DocumentServiceClientImpl (1.3.0)

public sealed class DocumentServiceClientImpl : DocumentServiceClient

Reference documentation and code samples for the Discovery Engine v1 API class DocumentServiceClientImpl.

DocumentService client wrapper implementation, for convenient use.

Inheritance

object > DocumentServiceClient > DocumentServiceClientImpl

Namespace

Google.Cloud.DiscoveryEngine.V1

Assembly

Google.Cloud.DiscoveryEngine.V1.dll

Remarks

Service for ingesting [Document][google.cloud.discoveryengine.v1.Document] information of the customer's website.

Constructors

DocumentServiceClientImpl(DocumentServiceClient, DocumentServiceSettings, ILogger)

public DocumentServiceClientImpl(DocumentService.DocumentServiceClient grpcClient, DocumentServiceSettings settings, ILogger logger)

Constructs a client wrapper for the DocumentService service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient DocumentServiceDocumentServiceClient

The underlying gRPC client.

settings DocumentServiceSettings

The base DocumentServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override DocumentService.DocumentServiceClient GrpcClient { get; }

The underlying gRPC DocumentService client

Property Value
Type Description
DocumentServiceDocumentServiceClient
Overrides

ImportDocumentsOperationsClient

public override OperationsClient ImportDocumentsOperationsClient { get; }

The long-running operations client for ImportDocuments.

Property Value
Type Description
OperationsClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient
Overrides

PurgeDocumentsOperationsClient

public override OperationsClient PurgeDocumentsOperationsClient { get; }

The long-running operations client for PurgeDocuments.

Property Value
Type Description
OperationsClient
Overrides

Methods

CreateDocument(CreateDocumentRequest, CallSettings)

public override Document CreateDocument(CreateDocumentRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request CreateDocumentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Document

The RPC response.

Overrides

CreateDocumentAsync(CreateDocumentRequest, CallSettings)

public override Task<Document> CreateDocumentAsync(CreateDocumentRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request CreateDocumentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDocument

A Task containing the RPC response.

Overrides

DeleteDocument(DeleteDocumentRequest, CallSettings)

public override void DeleteDocument(DeleteDocumentRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request DeleteDocumentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteDocumentAsync(DeleteDocumentRequest, CallSettings)

public override Task DeleteDocumentAsync(DeleteDocumentRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request DeleteDocumentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

GetDocument(GetDocumentRequest, CallSettings)

public override Document GetDocument(GetDocumentRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request GetDocumentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Document

The RPC response.

Overrides

GetDocumentAsync(GetDocumentRequest, CallSettings)

public override Task<Document> GetDocumentAsync(GetDocumentRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request GetDocumentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDocument

A Task containing the RPC response.

Overrides

ImportDocuments(ImportDocumentsRequest, CallSettings)

public override Operation<ImportDocumentsResponse, ImportDocumentsMetadata> ImportDocuments(ImportDocumentsRequest request, CallSettings callSettings = null)

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

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

Parameters
Name Description
request ImportDocumentsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationImportDocumentsResponseImportDocumentsMetadata

The RPC response.

Overrides

ImportDocumentsAsync(ImportDocumentsRequest, CallSettings)

public override Task<Operation<ImportDocumentsResponse, ImportDocumentsMetadata>> ImportDocumentsAsync(ImportDocumentsRequest request, CallSettings callSettings = null)

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

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

Parameters
Name Description
request ImportDocumentsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationImportDocumentsResponseImportDocumentsMetadata

A Task containing the RPC response.

Overrides

ListDocuments(ListDocumentsRequest, CallSettings)

public override PagedEnumerable<ListDocumentsResponse, Document> ListDocuments(ListDocumentsRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request ListDocumentsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDocumentsResponseDocument

A pageable sequence of Document resources.

Overrides

ListDocumentsAsync(ListDocumentsRequest, CallSettings)

public override PagedAsyncEnumerable<ListDocumentsResponse, Document> ListDocumentsAsync(ListDocumentsRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request ListDocumentsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDocumentsResponseDocument

A pageable asynchronous sequence of Document resources.

Overrides

PurgeDocuments(PurgeDocumentsRequest, CallSettings)

public override Operation<PurgeDocumentsResponse, PurgeDocumentsMetadata> PurgeDocuments(PurgeDocumentsRequest request, CallSettings callSettings = null)

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

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

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

Parameters
Name Description
request PurgeDocumentsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationPurgeDocumentsResponsePurgeDocumentsMetadata

The RPC response.

Overrides

PurgeDocumentsAsync(PurgeDocumentsRequest, CallSettings)

public override Task<Operation<PurgeDocumentsResponse, PurgeDocumentsMetadata>> PurgeDocumentsAsync(PurgeDocumentsRequest request, CallSettings callSettings = null)

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

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

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

Parameters
Name Description
request PurgeDocumentsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationPurgeDocumentsResponsePurgeDocumentsMetadata

A Task containing the RPC response.

Overrides

UpdateDocument(UpdateDocumentRequest, CallSettings)

public override Document UpdateDocument(UpdateDocumentRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request UpdateDocumentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Document

The RPC response.

Overrides

UpdateDocumentAsync(UpdateDocumentRequest, CallSettings)

public override Task<Document> UpdateDocumentAsync(UpdateDocumentRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request UpdateDocumentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDocument

A Task containing the RPC response.

Overrides