Package com.google.cloud.contentwarehouse.v1 (0.19.0)

A client to Document AI Warehouse API

The interfaces provided are listed below, along with usage samples.

DocumentLinkServiceClient

Service Description: This service lets you manage document-links. Document-Links are treated as sub-resources under source documents.

Sample for DocumentLinkServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DocumentLinkServiceClient documentLinkServiceClient = DocumentLinkServiceClient.create()) {
   DocumentName parent =
       DocumentName.ofProjectLocationDocumentName("[PROJECT]", "[LOCATION]", "[DOCUMENT]");
   ListLinkedTargetsResponse response = documentLinkServiceClient.listLinkedTargets(parent);
 }
 

DocumentSchemaServiceClient

Service Description: This service lets you manage document schema.

Sample for DocumentSchemaServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DocumentSchemaServiceClient documentSchemaServiceClient =
     DocumentSchemaServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   DocumentSchema documentSchema = DocumentSchema.newBuilder().build();
   DocumentSchema response =
       documentSchemaServiceClient.createDocumentSchema(parent, documentSchema);
 }
 

DocumentServiceClient

Service Description: This service lets you manage document.

Sample for DocumentServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Document document = Document.newBuilder().build();
   CreateDocumentResponse response = documentServiceClient.createDocument(parent, document);
 }
 

RuleSetServiceClient

Service Description: Service to manage customer specific RuleSets.

Sample for RuleSetServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RuleSetServiceClient ruleSetServiceClient = RuleSetServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   RuleSet ruleSet = RuleSet.newBuilder().build();
   RuleSet response = ruleSetServiceClient.createRuleSet(parent, ruleSet);
 }
 

SynonymSetServiceClient

Service Description: A Service that manage/custom customer specified SynonymSets.

Sample for SynonymSetServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SynonymSetServiceClient synonymSetServiceClient = SynonymSetServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   SynonymSet synonymSet = SynonymSet.newBuilder().build();
   SynonymSet response = synonymSetServiceClient.createSynonymSet(parent, synonymSet);
 }
 

Classes

AccessControlAction

Represents the action responsible for access control list management operations.

Protobuf type google.cloud.contentwarehouse.v1.AccessControlAction

AccessControlAction.Builder

Represents the action responsible for access control list management operations.

Protobuf type google.cloud.contentwarehouse.v1.AccessControlAction

Action

Represents the action triggered by Rule Engine when the rule is true.

Protobuf type google.cloud.contentwarehouse.v1.Action

Action.Builder

Represents the action triggered by Rule Engine when the rule is true.

Protobuf type google.cloud.contentwarehouse.v1.Action

ActionExecutorOutput

Represents the output of the Action Executor.

Protobuf type google.cloud.contentwarehouse.v1.ActionExecutorOutput

ActionExecutorOutput.Builder

Represents the output of the Action Executor.

Protobuf type google.cloud.contentwarehouse.v1.ActionExecutorOutput

ActionOutput

Represents the result of executing an action.

Protobuf type google.cloud.contentwarehouse.v1.ActionOutput

ActionOutput.Builder

Represents the result of executing an action.

Protobuf type google.cloud.contentwarehouse.v1.ActionOutput

AddToFolderAction

Represents the action responsible for adding document under a folder.

Protobuf type google.cloud.contentwarehouse.v1.AddToFolderAction

AddToFolderAction.Builder

Represents the action responsible for adding document under a folder.

Protobuf type google.cloud.contentwarehouse.v1.AddToFolderAction

AsyncDocumentServiceRequestProto

CloudAIDocumentOption

Request Option for processing Cloud AI Document in CW Document.

Protobuf type google.cloud.contentwarehouse.v1.CloudAIDocumentOption

CloudAIDocumentOption.Builder

Request Option for processing Cloud AI Document in CW Document.

Protobuf type google.cloud.contentwarehouse.v1.CloudAIDocumentOption

CommonProto

CreateDocumentLinkRequest

Request message for DocumentLinkService.CreateDocumentLink.

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentLinkRequest

CreateDocumentLinkRequest.Builder

Request message for DocumentLinkService.CreateDocumentLink.

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentLinkRequest

CreateDocumentMetadata

Metadata object for CreateDocument request (currently empty).

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentMetadata

CreateDocumentMetadata.Builder

Metadata object for CreateDocument request (currently empty).

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentMetadata

CreateDocumentRequest

Request message for DocumentService.CreateDocument.

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentRequest

CreateDocumentRequest.Builder

Request message for DocumentService.CreateDocument.

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentRequest

CreateDocumentResponse

Response message for DocumentService.CreateDocument.

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentResponse

CreateDocumentResponse.Builder

Response message for DocumentService.CreateDocument.

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentResponse

CreateDocumentSchemaRequest

Request message for DocumentSchemaService.CreateDocumentSchema.

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentSchemaRequest

CreateDocumentSchemaRequest.Builder

Request message for DocumentSchemaService.CreateDocumentSchema.

Protobuf type google.cloud.contentwarehouse.v1.CreateDocumentSchemaRequest

CreateRuleSetRequest

Request message for RuleSetService.CreateRuleSet.

Protobuf type google.cloud.contentwarehouse.v1.CreateRuleSetRequest

CreateRuleSetRequest.Builder

Request message for RuleSetService.CreateRuleSet.

Protobuf type google.cloud.contentwarehouse.v1.CreateRuleSetRequest

CreateSynonymSetRequest

Request message for SynonymSetService.CreateSynonymSet.

Protobuf type google.cloud.contentwarehouse.v1.CreateSynonymSetRequest

CreateSynonymSetRequest.Builder

Request message for SynonymSetService.CreateSynonymSet.

Protobuf type google.cloud.contentwarehouse.v1.CreateSynonymSetRequest

CustomWeightsMetadata

To support the custom weighting across document schemas.

Protobuf type google.cloud.contentwarehouse.v1.CustomWeightsMetadata

CustomWeightsMetadata.Builder

To support the custom weighting across document schemas.

Protobuf type google.cloud.contentwarehouse.v1.CustomWeightsMetadata

DataUpdateAction

Represents the action responsible for properties update operations.

Protobuf type google.cloud.contentwarehouse.v1.DataUpdateAction

DataUpdateAction.Builder

Represents the action responsible for properties update operations.

Protobuf type google.cloud.contentwarehouse.v1.DataUpdateAction

DataValidationAction

Represents the action responsible for data validation operations.

Protobuf type google.cloud.contentwarehouse.v1.DataValidationAction

DataValidationAction.Builder

Represents the action responsible for data validation operations.

Protobuf type google.cloud.contentwarehouse.v1.DataValidationAction

DateTimeArray

DateTime values.

Protobuf type google.cloud.contentwarehouse.v1.DateTimeArray

DateTimeArray.Builder

DateTime values.

Protobuf type google.cloud.contentwarehouse.v1.DateTimeArray

DateTimeTypeOptions

Configurations for a date time property.

Protobuf type google.cloud.contentwarehouse.v1.DateTimeTypeOptions

DateTimeTypeOptions.Builder

Configurations for a date time property.

Protobuf type google.cloud.contentwarehouse.v1.DateTimeTypeOptions

DeleteDocumentAction

Represents the action responsible for deleting the document.

Protobuf type google.cloud.contentwarehouse.v1.DeleteDocumentAction

DeleteDocumentAction.Builder

Represents the action responsible for deleting the document.

Protobuf type google.cloud.contentwarehouse.v1.DeleteDocumentAction

DeleteDocumentLinkRequest

Request message for DocumentLinkService.DeleteDocumentLink.

Protobuf type google.cloud.contentwarehouse.v1.DeleteDocumentLinkRequest

DeleteDocumentLinkRequest.Builder

Request message for DocumentLinkService.DeleteDocumentLink.

Protobuf type google.cloud.contentwarehouse.v1.DeleteDocumentLinkRequest

DeleteDocumentRequest

Request message for DocumentService.DeleteDocument.

Protobuf type google.cloud.contentwarehouse.v1.DeleteDocumentRequest

DeleteDocumentRequest.Builder

Request message for DocumentService.DeleteDocument.

Protobuf type google.cloud.contentwarehouse.v1.DeleteDocumentRequest

DeleteDocumentSchemaRequest

Request message for DocumentSchemaService.DeleteDocumentSchema.

Protobuf type google.cloud.contentwarehouse.v1.DeleteDocumentSchemaRequest

DeleteDocumentSchemaRequest.Builder

Request message for DocumentSchemaService.DeleteDocumentSchema.

Protobuf type google.cloud.contentwarehouse.v1.DeleteDocumentSchemaRequest

DeleteRuleSetRequest

Request message for RuleSetService.DeleteRuleSet.

Protobuf type google.cloud.contentwarehouse.v1.DeleteRuleSetRequest

DeleteRuleSetRequest.Builder

Request message for RuleSetService.DeleteRuleSet.

Protobuf type google.cloud.contentwarehouse.v1.DeleteRuleSetRequest

DeleteSynonymSetRequest

Request message for SynonymSetService.DeleteSynonymSet.

Protobuf type google.cloud.contentwarehouse.v1.DeleteSynonymSetRequest

DeleteSynonymSetRequest.Builder

Request message for SynonymSetService.DeleteSynonymSet.

Protobuf type google.cloud.contentwarehouse.v1.DeleteSynonymSetRequest

Document

Defines the structure for content warehouse document proto.

Protobuf type google.cloud.contentwarehouse.v1.Document

Document.Builder

Defines the structure for content warehouse document proto.

Protobuf type google.cloud.contentwarehouse.v1.Document

A document-link between source and target document.

Protobuf type google.cloud.contentwarehouse.v1.DocumentLink

DocumentLink.Builder

A document-link between source and target document.

Protobuf type google.cloud.contentwarehouse.v1.DocumentLink

DocumentLinkName

DocumentLinkName.Builder

Builder for projects/{project}/locations/{location}/documents/{document}/documentLinks/{document_link}.

DocumentLinkServiceClient

Service Description: This service lets you manage document-links. Document-Links are treated as sub-resources under source documents.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DocumentLinkServiceClient documentLinkServiceClient = DocumentLinkServiceClient.create()) {
   DocumentName parent =
       DocumentName.ofProjectLocationDocumentName("[PROJECT]", "[LOCATION]", "[DOCUMENT]");
   ListLinkedTargetsResponse response = documentLinkServiceClient.listLinkedTargets(parent);
 }
 

Note: close() needs to be called on the DocumentLinkServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of DocumentLinkServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentLinkServiceSettings documentLinkServiceSettings =
     DocumentLinkServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DocumentLinkServiceClient documentLinkServiceClient =
     DocumentLinkServiceClient.create(documentLinkServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentLinkServiceSettings documentLinkServiceSettings =
     DocumentLinkServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 DocumentLinkServiceClient documentLinkServiceClient =
     DocumentLinkServiceClient.create(documentLinkServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentLinkServiceSettings documentLinkServiceSettings =
     DocumentLinkServiceSettings.newHttpJsonBuilder().build();
 DocumentLinkServiceClient documentLinkServiceClient =
     DocumentLinkServiceClient.create(documentLinkServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

DocumentLinkServiceClient.ListLinkedSourcesFixedSizeCollection

DocumentLinkServiceClient.ListLinkedSourcesPage

DocumentLinkServiceClient.ListLinkedSourcesPagedResponse

DocumentLinkServiceGrpc

This service lets you manage document-links. Document-Links are treated as sub-resources under source documents.

DocumentLinkServiceGrpc.DocumentLinkServiceBlockingStub

A stub to allow clients to do synchronous rpc calls to service DocumentLinkService.

This service lets you manage document-links. Document-Links are treated as sub-resources under source documents.

DocumentLinkServiceGrpc.DocumentLinkServiceFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service DocumentLinkService.

This service lets you manage document-links. Document-Links are treated as sub-resources under source documents.

DocumentLinkServiceGrpc.DocumentLinkServiceImplBase

Base class for the server implementation of the service DocumentLinkService.

This service lets you manage document-links. Document-Links are treated as sub-resources under source documents.

DocumentLinkServiceGrpc.DocumentLinkServiceStub

A stub to allow clients to do asynchronous rpc calls to service DocumentLinkService.

This service lets you manage document-links. Document-Links are treated as sub-resources under source documents.

DocumentLinkServiceProto

DocumentLinkServiceSettings

Settings class to configure an instance of DocumentLinkServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (contentwarehouse.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of listLinkedTargets to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentLinkServiceSettings.Builder documentLinkServiceSettingsBuilder =
     DocumentLinkServiceSettings.newBuilder();
 documentLinkServiceSettingsBuilder
     .listLinkedTargetsSettings()
     .setRetrySettings(
         documentLinkServiceSettingsBuilder
             .listLinkedTargetsSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 DocumentLinkServiceSettings documentLinkServiceSettings =
     documentLinkServiceSettingsBuilder.build();
 

DocumentLinkServiceSettings.Builder

Builder for DocumentLinkServiceSettings.

DocumentName

DocumentName.Builder

Builder for projects/{project}/locations/{location}/documents/{document}.

DocumentName.ProjectLocationReferenceIdBuilder

Builder for projects/{project}/locations/{location}/documents/referenceId/{reference_id}.

DocumentProto

DocumentQuery

Protobuf type google.cloud.contentwarehouse.v1.DocumentQuery

DocumentQuery.Builder

Protobuf type google.cloud.contentwarehouse.v1.DocumentQuery

DocumentReference

References to the documents.

Protobuf type google.cloud.contentwarehouse.v1.DocumentReference

DocumentReference.Builder

References to the documents.

Protobuf type google.cloud.contentwarehouse.v1.DocumentReference

DocumentSchema

A document schema used to define document structure.

Protobuf type google.cloud.contentwarehouse.v1.DocumentSchema

DocumentSchema.Builder

A document schema used to define document structure.

Protobuf type google.cloud.contentwarehouse.v1.DocumentSchema

DocumentSchemaName

DocumentSchemaName.Builder

Builder for projects/{project}/locations/{location}/documentSchemas/{document_schema}.

DocumentSchemaProto

DocumentSchemaServiceClient

Service Description: This service lets you manage document schema.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DocumentSchemaServiceClient documentSchemaServiceClient =
     DocumentSchemaServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   DocumentSchema documentSchema = DocumentSchema.newBuilder().build();
   DocumentSchema response =
       documentSchemaServiceClient.createDocumentSchema(parent, documentSchema);
 }
 

Note: close() needs to be called on the DocumentSchemaServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of DocumentSchemaServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentSchemaServiceSettings documentSchemaServiceSettings =
     DocumentSchemaServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DocumentSchemaServiceClient documentSchemaServiceClient =
     DocumentSchemaServiceClient.create(documentSchemaServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentSchemaServiceSettings documentSchemaServiceSettings =
     DocumentSchemaServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 DocumentSchemaServiceClient documentSchemaServiceClient =
     DocumentSchemaServiceClient.create(documentSchemaServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentSchemaServiceSettings documentSchemaServiceSettings =
     DocumentSchemaServiceSettings.newHttpJsonBuilder().build();
 DocumentSchemaServiceClient documentSchemaServiceClient =
     DocumentSchemaServiceClient.create(documentSchemaServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

DocumentSchemaServiceClient.ListDocumentSchemasFixedSizeCollection

DocumentSchemaServiceClient.ListDocumentSchemasPage

DocumentSchemaServiceClient.ListDocumentSchemasPagedResponse

DocumentSchemaServiceGrpc

This service lets you manage document schema.

DocumentSchemaServiceGrpc.DocumentSchemaServiceBlockingStub

A stub to allow clients to do synchronous rpc calls to service DocumentSchemaService.

This service lets you manage document schema.

DocumentSchemaServiceGrpc.DocumentSchemaServiceFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service DocumentSchemaService.

This service lets you manage document schema.

DocumentSchemaServiceGrpc.DocumentSchemaServiceImplBase

Base class for the server implementation of the service DocumentSchemaService.

This service lets you manage document schema.

DocumentSchemaServiceGrpc.DocumentSchemaServiceStub

A stub to allow clients to do asynchronous rpc calls to service DocumentSchemaService.

This service lets you manage document schema.

DocumentSchemaServiceProto

DocumentSchemaServiceSettings

Settings class to configure an instance of DocumentSchemaServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (contentwarehouse.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of createDocumentSchema to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentSchemaServiceSettings.Builder documentSchemaServiceSettingsBuilder =
     DocumentSchemaServiceSettings.newBuilder();
 documentSchemaServiceSettingsBuilder
     .createDocumentSchemaSettings()
     .setRetrySettings(
         documentSchemaServiceSettingsBuilder
             .createDocumentSchemaSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 DocumentSchemaServiceSettings documentSchemaServiceSettings =
     documentSchemaServiceSettingsBuilder.build();
 

DocumentSchemaServiceSettings.Builder

Builder for DocumentSchemaServiceSettings.

DocumentServiceClient

Service Description: This service lets you manage document.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Document document = Document.newBuilder().build();
   CreateDocumentResponse response = documentServiceClient.createDocument(parent, document);
 }
 

Note: close() needs to be called on the DocumentServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of DocumentServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentServiceSettings documentServiceSettings =
     DocumentServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DocumentServiceClient documentServiceClient =
     DocumentServiceClient.create(documentServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentServiceSettings documentServiceSettings =
     DocumentServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 DocumentServiceClient documentServiceClient =
     DocumentServiceClient.create(documentServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentServiceSettings documentServiceSettings =
     DocumentServiceSettings.newHttpJsonBuilder().build();
 DocumentServiceClient documentServiceClient =
     DocumentServiceClient.create(documentServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

DocumentServiceClient.SearchDocumentsFixedSizeCollection

DocumentServiceClient.SearchDocumentsPage

DocumentServiceClient.SearchDocumentsPagedResponse

DocumentServiceGrpc

This service lets you manage document.

DocumentServiceGrpc.DocumentServiceBlockingStub

A stub to allow clients to do synchronous rpc calls to service DocumentService.

This service lets you manage document.

DocumentServiceGrpc.DocumentServiceFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service DocumentService.

This service lets you manage document.

DocumentServiceGrpc.DocumentServiceImplBase

Base class for the server implementation of the service DocumentService.

This service lets you manage document.

DocumentServiceGrpc.DocumentServiceStub

A stub to allow clients to do asynchronous rpc calls to service DocumentService.

This service lets you manage document.

DocumentServiceProto

DocumentServiceRequestProto

DocumentServiceSettings

Settings class to configure an instance of DocumentServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (contentwarehouse.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of createDocument to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DocumentServiceSettings.Builder documentServiceSettingsBuilder =
     DocumentServiceSettings.newBuilder();
 documentServiceSettingsBuilder
     .createDocumentSettings()
     .setRetrySettings(
         documentServiceSettingsBuilder
             .createDocumentSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 DocumentServiceSettings documentServiceSettings = documentServiceSettingsBuilder.build();
 

DocumentServiceSettings.Builder

Builder for DocumentServiceSettings.

EnumArray

Enum values.

Protobuf type google.cloud.contentwarehouse.v1.EnumArray

EnumArray.Builder

Enum values.

Protobuf type google.cloud.contentwarehouse.v1.EnumArray

EnumTypeOptions

Configurations for an enum/categorical property.

Protobuf type google.cloud.contentwarehouse.v1.EnumTypeOptions

EnumTypeOptions.Builder

Configurations for an enum/categorical property.

Protobuf type google.cloud.contentwarehouse.v1.EnumTypeOptions

EnumValue

Represents the string value of the enum field.

Protobuf type google.cloud.contentwarehouse.v1.EnumValue

EnumValue.Builder

Represents the string value of the enum field.

Protobuf type google.cloud.contentwarehouse.v1.EnumValue

FetchAclRequest

Request message for DocumentService.FetchAcl

Protobuf type google.cloud.contentwarehouse.v1.FetchAclRequest

FetchAclRequest.Builder

Request message for DocumentService.FetchAcl

Protobuf type google.cloud.contentwarehouse.v1.FetchAclRequest

FetchAclResponse

Response message for DocumentService.FetchAcl.

Protobuf type google.cloud.contentwarehouse.v1.FetchAclResponse

FetchAclResponse.Builder

Response message for DocumentService.FetchAcl.

Protobuf type google.cloud.contentwarehouse.v1.FetchAclResponse

FileTypeFilter

Filter for the specific types of documents returned.

Protobuf type google.cloud.contentwarehouse.v1.FileTypeFilter

FileTypeFilter.Builder

Filter for the specific types of documents returned.

Protobuf type google.cloud.contentwarehouse.v1.FileTypeFilter

FiltersProto

FloatArray

Float values.

Protobuf type google.cloud.contentwarehouse.v1.FloatArray

FloatArray.Builder

Float values.

Protobuf type google.cloud.contentwarehouse.v1.FloatArray

FloatTypeOptions

Configurations for a float property.

Protobuf type google.cloud.contentwarehouse.v1.FloatTypeOptions

FloatTypeOptions.Builder

Configurations for a float property.

Protobuf type google.cloud.contentwarehouse.v1.FloatTypeOptions

GetDocumentRequest

Request message for DocumentService.GetDocument.

Protobuf type google.cloud.contentwarehouse.v1.GetDocumentRequest

GetDocumentRequest.Builder

Request message for DocumentService.GetDocument.

Protobuf type google.cloud.contentwarehouse.v1.GetDocumentRequest

GetDocumentSchemaRequest

Request message for DocumentSchemaService.GetDocumentSchema.

Protobuf type google.cloud.contentwarehouse.v1.GetDocumentSchemaRequest

GetDocumentSchemaRequest.Builder

Request message for DocumentSchemaService.GetDocumentSchema.

Protobuf type google.cloud.contentwarehouse.v1.GetDocumentSchemaRequest

GetRuleSetRequest

Request message for RuleSetService.GetRuleSet.

Protobuf type google.cloud.contentwarehouse.v1.GetRuleSetRequest

GetRuleSetRequest.Builder

Request message for RuleSetService.GetRuleSet.

Protobuf type google.cloud.contentwarehouse.v1.GetRuleSetRequest

GetSynonymSetRequest

Request message for SynonymSetService.GetSynonymSet. Will return synonymSet for a certain context.

Protobuf type google.cloud.contentwarehouse.v1.GetSynonymSetRequest

GetSynonymSetRequest.Builder

Request message for SynonymSetService.GetSynonymSet. Will return synonymSet for a certain context.

Protobuf type google.cloud.contentwarehouse.v1.GetSynonymSetRequest

HistogramProto

HistogramQuery

The histogram request.

Protobuf type google.cloud.contentwarehouse.v1.HistogramQuery

HistogramQuery.Builder

The histogram request.

Protobuf type google.cloud.contentwarehouse.v1.HistogramQuery

HistogramQueryPropertyNameFilter

Protobuf type google.cloud.contentwarehouse.v1.HistogramQueryPropertyNameFilter

HistogramQueryPropertyNameFilter.Builder

Protobuf type google.cloud.contentwarehouse.v1.HistogramQueryPropertyNameFilter

HistogramQueryResult

Histogram result that matches HistogramQuery specified in searches.

Protobuf type google.cloud.contentwarehouse.v1.HistogramQueryResult

HistogramQueryResult.Builder

Histogram result that matches HistogramQuery specified in searches.

Protobuf type google.cloud.contentwarehouse.v1.HistogramQueryResult

IntegerArray

Integer values.

Protobuf type google.cloud.contentwarehouse.v1.IntegerArray

IntegerArray.Builder

Integer values.

Protobuf type google.cloud.contentwarehouse.v1.IntegerArray

IntegerTypeOptions

Configurations for an integer property.

Protobuf type google.cloud.contentwarehouse.v1.IntegerTypeOptions

IntegerTypeOptions.Builder

Configurations for an integer property.

Protobuf type google.cloud.contentwarehouse.v1.IntegerTypeOptions

InvalidRule

A triggered rule that failed the validation check(s) after parsing.

Protobuf type google.cloud.contentwarehouse.v1.InvalidRule

InvalidRule.Builder

A triggered rule that failed the validation check(s) after parsing.

Protobuf type google.cloud.contentwarehouse.v1.InvalidRule

ListDocumentSchemasRequest

Request message for DocumentSchemaService.ListDocumentSchemas.

Protobuf type google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest

ListDocumentSchemasRequest.Builder

Request message for DocumentSchemaService.ListDocumentSchemas.

Protobuf type google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest

ListDocumentSchemasResponse

Response message for DocumentSchemaService.ListDocumentSchemas.

Protobuf type google.cloud.contentwarehouse.v1.ListDocumentSchemasResponse

ListDocumentSchemasResponse.Builder

Response message for DocumentSchemaService.ListDocumentSchemas.

Protobuf type google.cloud.contentwarehouse.v1.ListDocumentSchemasResponse

ListLinkedSourcesRequest

Response message for DocumentLinkService.ListLinkedSources.

Protobuf type google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest

ListLinkedSourcesRequest.Builder

Response message for DocumentLinkService.ListLinkedSources.

Protobuf type google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest

ListLinkedSourcesResponse

Response message for DocumentLinkService.ListLinkedSources.

Protobuf type google.cloud.contentwarehouse.v1.ListLinkedSourcesResponse

ListLinkedSourcesResponse.Builder

Response message for DocumentLinkService.ListLinkedSources.

Protobuf type google.cloud.contentwarehouse.v1.ListLinkedSourcesResponse

ListLinkedTargetsRequest

Request message for DocumentLinkService.ListLinkedTargets.

Protobuf type google.cloud.contentwarehouse.v1.ListLinkedTargetsRequest

ListLinkedTargetsRequest.Builder

Request message for DocumentLinkService.ListLinkedTargets.

Protobuf type google.cloud.contentwarehouse.v1.ListLinkedTargetsRequest

ListLinkedTargetsResponse

Response message for DocumentLinkService.ListLinkedTargets.

Protobuf type google.cloud.contentwarehouse.v1.ListLinkedTargetsResponse

ListLinkedTargetsResponse.Builder

Response message for DocumentLinkService.ListLinkedTargets.

Protobuf type google.cloud.contentwarehouse.v1.ListLinkedTargetsResponse

ListRuleSetsRequest

Request message for RuleSetService.ListRuleSets.

Protobuf type google.cloud.contentwarehouse.v1.ListRuleSetsRequest

ListRuleSetsRequest.Builder

Request message for RuleSetService.ListRuleSets.

Protobuf type google.cloud.contentwarehouse.v1.ListRuleSetsRequest

ListRuleSetsResponse

Response message for RuleSetService.ListRuleSets.

Protobuf type google.cloud.contentwarehouse.v1.ListRuleSetsResponse

ListRuleSetsResponse.Builder

Response message for RuleSetService.ListRuleSets.

Protobuf type google.cloud.contentwarehouse.v1.ListRuleSetsResponse

ListSynonymSetsRequest

Request message for SynonymSetService.ListSynonymSets. Will return all synonymSets belonging to the customer project.

Protobuf type google.cloud.contentwarehouse.v1.ListSynonymSetsRequest

ListSynonymSetsRequest.Builder

Request message for SynonymSetService.ListSynonymSets. Will return all synonymSets belonging to the customer project.

Protobuf type google.cloud.contentwarehouse.v1.ListSynonymSetsRequest

ListSynonymSetsResponse

Response message for SynonymSetService.ListSynonymSets.

Protobuf type google.cloud.contentwarehouse.v1.ListSynonymSetsResponse

ListSynonymSetsResponse.Builder

Response message for SynonymSetService.ListSynonymSets.

Protobuf type google.cloud.contentwarehouse.v1.ListSynonymSetsResponse

LocationName

LocationName.Builder

Builder for projects/{project}/locations/{location}.

LockDocumentRequest

Request message for DocumentService.LockDocument.

Protobuf type google.cloud.contentwarehouse.v1.LockDocumentRequest

LockDocumentRequest.Builder

Request message for DocumentService.LockDocument.

Protobuf type google.cloud.contentwarehouse.v1.LockDocumentRequest

MapProperty

Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values.

Protobuf type google.cloud.contentwarehouse.v1.MapProperty

MapProperty.Builder

Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values.

Protobuf type google.cloud.contentwarehouse.v1.MapProperty

MapTypeOptions

Configurations for a Map property.

Protobuf type google.cloud.contentwarehouse.v1.MapTypeOptions

MapTypeOptions.Builder

Configurations for a Map property.

Protobuf type google.cloud.contentwarehouse.v1.MapTypeOptions

MergeFieldsOptions

Options for merging updated fields.

Protobuf type google.cloud.contentwarehouse.v1.MergeFieldsOptions

MergeFieldsOptions.Builder

Options for merging updated fields.

Protobuf type google.cloud.contentwarehouse.v1.MergeFieldsOptions

Property

Property of a document.

Protobuf type google.cloud.contentwarehouse.v1.Property

Property.Builder

Property of a document.

Protobuf type google.cloud.contentwarehouse.v1.Property

PropertyArray

Property values.

Protobuf type google.cloud.contentwarehouse.v1.PropertyArray

PropertyArray.Builder

Property values.

Protobuf type google.cloud.contentwarehouse.v1.PropertyArray

PropertyDefinition

Defines the metadata for a schema property.

Protobuf type google.cloud.contentwarehouse.v1.PropertyDefinition

PropertyDefinition.Builder

Defines the metadata for a schema property.

Protobuf type google.cloud.contentwarehouse.v1.PropertyDefinition

PropertyDefinition.SchemaSource

The schema source information.

Protobuf type google.cloud.contentwarehouse.v1.PropertyDefinition.SchemaSource

PropertyDefinition.SchemaSource.Builder

The schema source information.

Protobuf type google.cloud.contentwarehouse.v1.PropertyDefinition.SchemaSource

PropertyFilter

Protobuf type google.cloud.contentwarehouse.v1.PropertyFilter

PropertyFilter.Builder

Protobuf type google.cloud.contentwarehouse.v1.PropertyFilter

PropertyTypeOptions

Configurations for a nested structured data property.

Protobuf type google.cloud.contentwarehouse.v1.PropertyTypeOptions

PropertyTypeOptions.Builder

Configurations for a nested structured data property.

Protobuf type google.cloud.contentwarehouse.v1.PropertyTypeOptions

PublishAction

Represents the action responsible for publishing messages to a Pub/Sub topic.

Protobuf type google.cloud.contentwarehouse.v1.PublishAction

PublishAction.Builder

Represents the action responsible for publishing messages to a Pub/Sub topic.

Protobuf type google.cloud.contentwarehouse.v1.PublishAction

QAResult

Additional result info for the question-answering feature.

Protobuf type google.cloud.contentwarehouse.v1.QAResult

QAResult.Builder

Additional result info for the question-answering feature.

Protobuf type google.cloud.contentwarehouse.v1.QAResult

QAResult.Highlight

A text span in the search text snippet that represents a highlighted section (answer context, highly relevant sentence, etc.).

Protobuf type google.cloud.contentwarehouse.v1.QAResult.Highlight

QAResult.Highlight.Builder

A text span in the search text snippet that represents a highlighted section (answer context, highly relevant sentence, etc.).

Protobuf type google.cloud.contentwarehouse.v1.QAResult.Highlight

RemoveFromFolderAction

Represents the action responsible for remove a document from a specific folder.

Protobuf type google.cloud.contentwarehouse.v1.RemoveFromFolderAction

RemoveFromFolderAction.Builder

Represents the action responsible for remove a document from a specific folder.

Protobuf type google.cloud.contentwarehouse.v1.RemoveFromFolderAction

RequestMetadata

Meta information is used to improve the performance of the service.

Protobuf type google.cloud.contentwarehouse.v1.RequestMetadata

RequestMetadata.Builder

Meta information is used to improve the performance of the service.

Protobuf type google.cloud.contentwarehouse.v1.RequestMetadata

ResponseMetadata

Additional information returned to client, such as debugging information.

Protobuf type google.cloud.contentwarehouse.v1.ResponseMetadata

ResponseMetadata.Builder

Additional information returned to client, such as debugging information.

Protobuf type google.cloud.contentwarehouse.v1.ResponseMetadata

Rule

Represents the rule for a content warehouse trigger.

Protobuf type google.cloud.contentwarehouse.v1.Rule

Rule.Builder

Represents the rule for a content warehouse trigger.

Protobuf type google.cloud.contentwarehouse.v1.Rule

RuleActionsPair

Represents a rule and outputs of associated actions.

Protobuf type google.cloud.contentwarehouse.v1.RuleActionsPair

RuleActionsPair.Builder

Represents a rule and outputs of associated actions.

Protobuf type google.cloud.contentwarehouse.v1.RuleActionsPair

RuleEngineOutput

Records the output of Rule Engine including rule evaluation and actions result.

Protobuf type google.cloud.contentwarehouse.v1.RuleEngineOutput

RuleEngineOutput.Builder

Records the output of Rule Engine including rule evaluation and actions result.

Protobuf type google.cloud.contentwarehouse.v1.RuleEngineOutput

RuleEngineProto

RuleEvaluatorOutput

Represents the output of the Rule Evaluator.

Protobuf type google.cloud.contentwarehouse.v1.RuleEvaluatorOutput

RuleEvaluatorOutput.Builder

Represents the output of the Rule Evaluator.

Protobuf type google.cloud.contentwarehouse.v1.RuleEvaluatorOutput

RuleSet

Represents a set of rules from a single customer.

Protobuf type google.cloud.contentwarehouse.v1.RuleSet

RuleSet.Builder

Represents a set of rules from a single customer.

Protobuf type google.cloud.contentwarehouse.v1.RuleSet

RuleSetName

RuleSetName.Builder

Builder for projects/{project}/locations/{location}/ruleSets/{rule_set}.

RuleSetServiceClient

Service Description: Service to manage customer specific RuleSets.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RuleSetServiceClient ruleSetServiceClient = RuleSetServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   RuleSet ruleSet = RuleSet.newBuilder().build();
   RuleSet response = ruleSetServiceClient.createRuleSet(parent, ruleSet);
 }
 

Note: close() needs to be called on the RuleSetServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of RuleSetServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 RuleSetServiceSettings ruleSetServiceSettings =
     RuleSetServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RuleSetServiceClient ruleSetServiceClient = RuleSetServiceClient.create(ruleSetServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 RuleSetServiceSettings ruleSetServiceSettings =
     RuleSetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 RuleSetServiceClient ruleSetServiceClient = RuleSetServiceClient.create(ruleSetServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 RuleSetServiceSettings ruleSetServiceSettings =
     RuleSetServiceSettings.newHttpJsonBuilder().build();
 RuleSetServiceClient ruleSetServiceClient = RuleSetServiceClient.create(ruleSetServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

RuleSetServiceClient.ListRuleSetsFixedSizeCollection

RuleSetServiceClient.ListRuleSetsPage

RuleSetServiceClient.ListRuleSetsPagedResponse

RuleSetServiceGrpc

Service to manage customer specific RuleSets.

RuleSetServiceGrpc.RuleSetServiceBlockingStub

A stub to allow clients to do synchronous rpc calls to service RuleSetService.

Service to manage customer specific RuleSets.

RuleSetServiceGrpc.RuleSetServiceFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service RuleSetService.

Service to manage customer specific RuleSets.

RuleSetServiceGrpc.RuleSetServiceImplBase

Base class for the server implementation of the service RuleSetService.

Service to manage customer specific RuleSets.

RuleSetServiceGrpc.RuleSetServiceStub

A stub to allow clients to do asynchronous rpc calls to service RuleSetService.

Service to manage customer specific RuleSets.

RuleSetServiceProto

RuleSetServiceRequestProto

RuleSetServiceSettings

Settings class to configure an instance of RuleSetServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (contentwarehouse.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of createRuleSet to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 RuleSetServiceSettings.Builder ruleSetServiceSettingsBuilder =
     RuleSetServiceSettings.newBuilder();
 ruleSetServiceSettingsBuilder
     .createRuleSetSettings()
     .setRetrySettings(
         ruleSetServiceSettingsBuilder
             .createRuleSetSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 RuleSetServiceSettings ruleSetServiceSettings = ruleSetServiceSettingsBuilder.build();
 

RuleSetServiceSettings.Builder

Builder for RuleSetServiceSettings.

SearchDocumentsRequest

Request message for DocumentService.SearchDocuments.

Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsRequest

SearchDocumentsRequest.Builder

Request message for DocumentService.SearchDocuments.

Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsRequest

SearchDocumentsResponse

Response message for DocumentService.SearchDocuments.

Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsResponse

SearchDocumentsResponse.Builder

Response message for DocumentService.SearchDocuments.

Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsResponse

SearchDocumentsResponse.MatchingDocument

Document entry with metadata inside SearchDocumentsResponse

Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsResponse.MatchingDocument

SearchDocumentsResponse.MatchingDocument.Builder

Document entry with metadata inside SearchDocumentsResponse

Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsResponse.MatchingDocument

SetAclRequest

Request message for DocumentService.SetAcl.

Protobuf type google.cloud.contentwarehouse.v1.SetAclRequest

SetAclRequest.Builder

Request message for DocumentService.SetAcl.

Protobuf type google.cloud.contentwarehouse.v1.SetAclRequest

SetAclResponse

Response message for DocumentService.SetAcl.

Protobuf type google.cloud.contentwarehouse.v1.SetAclResponse

SetAclResponse.Builder

Response message for DocumentService.SetAcl.

Protobuf type google.cloud.contentwarehouse.v1.SetAclResponse

SynonymSet

Represents a list of synonyms for a given context. For example a context "sales" could contain: Synonym 1: sale, invoice, bill, order Synonym 2: money, credit, finance, payment Synonym 3: shipping, freight, transport Each SynonymSets should be disjoint

Protobuf type google.cloud.contentwarehouse.v1.SynonymSet

SynonymSet.Builder

Represents a list of synonyms for a given context. For example a context "sales" could contain: Synonym 1: sale, invoice, bill, order Synonym 2: money, credit, finance, payment Synonym 3: shipping, freight, transport Each SynonymSets should be disjoint

Protobuf type google.cloud.contentwarehouse.v1.SynonymSet

SynonymSet.Synonym

Represents a list of words given by the customer All these words are synonyms of each other.

Protobuf type google.cloud.contentwarehouse.v1.SynonymSet.Synonym

SynonymSet.Synonym.Builder

Represents a list of words given by the customer All these words are synonyms of each other.

Protobuf type google.cloud.contentwarehouse.v1.SynonymSet.Synonym

SynonymSetName

SynonymSetName.Builder

Builder for projects/{project}/locations/{location}/synonymSets/{context}.

SynonymSetProto

SynonymSetServiceClient

Service Description: A Service that manage/custom customer specified SynonymSets.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SynonymSetServiceClient synonymSetServiceClient = SynonymSetServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   SynonymSet synonymSet = SynonymSet.newBuilder().build();
   SynonymSet response = synonymSetServiceClient.createSynonymSet(parent, synonymSet);
 }
 

Note: close() needs to be called on the SynonymSetServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of SynonymSetServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SynonymSetServiceSettings synonymSetServiceSettings =
     SynonymSetServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 SynonymSetServiceClient synonymSetServiceClient =
     SynonymSetServiceClient.create(synonymSetServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SynonymSetServiceSettings synonymSetServiceSettings =
     SynonymSetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 SynonymSetServiceClient synonymSetServiceClient =
     SynonymSetServiceClient.create(synonymSetServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SynonymSetServiceSettings synonymSetServiceSettings =
     SynonymSetServiceSettings.newHttpJsonBuilder().build();
 SynonymSetServiceClient synonymSetServiceClient =
     SynonymSetServiceClient.create(synonymSetServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

SynonymSetServiceClient.ListSynonymSetsFixedSizeCollection

SynonymSetServiceClient.ListSynonymSetsPage

SynonymSetServiceClient.ListSynonymSetsPagedResponse

SynonymSetServiceGrpc

A Service that manage/custom customer specified SynonymSets.

SynonymSetServiceGrpc.SynonymSetServiceBlockingStub

A stub to allow clients to do synchronous rpc calls to service SynonymSetService.

A Service that manage/custom customer specified SynonymSets.

SynonymSetServiceGrpc.SynonymSetServiceFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service SynonymSetService.

A Service that manage/custom customer specified SynonymSets.

SynonymSetServiceGrpc.SynonymSetServiceImplBase

Base class for the server implementation of the service SynonymSetService.

A Service that manage/custom customer specified SynonymSets.

SynonymSetServiceGrpc.SynonymSetServiceStub

A stub to allow clients to do asynchronous rpc calls to service SynonymSetService.

A Service that manage/custom customer specified SynonymSets.

SynonymSetServiceProto

SynonymSetServiceRequestProto

SynonymSetServiceSettings

Settings class to configure an instance of SynonymSetServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (contentwarehouse.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of createSynonymSet to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SynonymSetServiceSettings.Builder synonymSetServiceSettingsBuilder =
     SynonymSetServiceSettings.newBuilder();
 synonymSetServiceSettingsBuilder
     .createSynonymSetSettings()
     .setRetrySettings(
         synonymSetServiceSettingsBuilder
             .createSynonymSetSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 SynonymSetServiceSettings synonymSetServiceSettings = synonymSetServiceSettingsBuilder.build();
 

SynonymSetServiceSettings.Builder

Builder for SynonymSetServiceSettings.

TextArray

String/text values.

Protobuf type google.cloud.contentwarehouse.v1.TextArray

TextArray.Builder

String/text values.

Protobuf type google.cloud.contentwarehouse.v1.TextArray

TextTypeOptions

Configurations for a text property.

Protobuf type google.cloud.contentwarehouse.v1.TextTypeOptions

TextTypeOptions.Builder

Configurations for a text property.

Protobuf type google.cloud.contentwarehouse.v1.TextTypeOptions

TimeFilter

Filter on create timestamp or update timestamp of documents.

Protobuf type google.cloud.contentwarehouse.v1.TimeFilter

TimeFilter.Builder

Filter on create timestamp or update timestamp of documents.

Protobuf type google.cloud.contentwarehouse.v1.TimeFilter

TimestampArray

Timestamp values.

Protobuf type google.cloud.contentwarehouse.v1.TimestampArray

TimestampArray.Builder

Timestamp values.

Protobuf type google.cloud.contentwarehouse.v1.TimestampArray

TimestampTypeOptions

Configurations for a timestamp property.

Protobuf type google.cloud.contentwarehouse.v1.TimestampTypeOptions

TimestampTypeOptions.Builder

Configurations for a timestamp property.

Protobuf type google.cloud.contentwarehouse.v1.TimestampTypeOptions

TimestampValue

Timestamp value type.

Protobuf type google.cloud.contentwarehouse.v1.TimestampValue

TimestampValue.Builder

Timestamp value type.

Protobuf type google.cloud.contentwarehouse.v1.TimestampValue

UpdateDocumentMetadata

Metadata object for UpdateDocument request (currently empty).

Protobuf type google.cloud.contentwarehouse.v1.UpdateDocumentMetadata

UpdateDocumentMetadata.Builder

Metadata object for UpdateDocument request (currently empty).

Protobuf type google.cloud.contentwarehouse.v1.UpdateDocumentMetadata

UpdateDocumentRequest

Request message for DocumentService.UpdateDocument.

Protobuf type google.cloud.contentwarehouse.v1.UpdateDocumentRequest

UpdateDocumentRequest.Builder

Request message for DocumentService.UpdateDocument.

Protobuf type google.cloud.contentwarehouse.v1.UpdateDocumentRequest

UpdateDocumentResponse

Response message for DocumentService.UpdateDocument.

Protobuf type google.cloud.contentwarehouse.v1.UpdateDocumentResponse

UpdateDocumentResponse.Builder

Response message for DocumentService.UpdateDocument.

Protobuf type google.cloud.contentwarehouse.v1.UpdateDocumentResponse

UpdateDocumentSchemaRequest

Request message for DocumentSchemaService.UpdateDocumentSchema.

Protobuf type google.cloud.contentwarehouse.v1.UpdateDocumentSchemaRequest

UpdateDocumentSchemaRequest.Builder

Request message for DocumentSchemaService.UpdateDocumentSchema.

Protobuf type google.cloud.contentwarehouse.v1.UpdateDocumentSchemaRequest

UpdateOptions

Options for Update operations.

Protobuf type google.cloud.contentwarehouse.v1.UpdateOptions

UpdateOptions.Builder

Options for Update operations.

Protobuf type google.cloud.contentwarehouse.v1.UpdateOptions

UpdateRuleSetRequest

Request message for RuleSetService.UpdateRuleSet.

Protobuf type google.cloud.contentwarehouse.v1.UpdateRuleSetRequest

UpdateRuleSetRequest.Builder

Request message for RuleSetService.UpdateRuleSet.

Protobuf type google.cloud.contentwarehouse.v1.UpdateRuleSetRequest

UpdateSynonymSetRequest

Request message for SynonymSetService.UpdateSynonymSet. Removes the SynonymSet for the specified context and replaces it with the SynonymSet in this request.

Protobuf type google.cloud.contentwarehouse.v1.UpdateSynonymSetRequest

UpdateSynonymSetRequest.Builder

Request message for SynonymSetService.UpdateSynonymSet. Removes the SynonymSet for the specified context and replaces it with the SynonymSet in this request.

Protobuf type google.cloud.contentwarehouse.v1.UpdateSynonymSetRequest

UserInfo

The user information.

Protobuf type google.cloud.contentwarehouse.v1.UserInfo

UserInfo.Builder

The user information.

Protobuf type google.cloud.contentwarehouse.v1.UserInfo

Value

Value represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.

Protobuf type google.cloud.contentwarehouse.v1.Value

Value.Builder

Value represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.

Protobuf type google.cloud.contentwarehouse.v1.Value

WeightedSchemaProperty

Specifies the schema property name.

Protobuf type google.cloud.contentwarehouse.v1.WeightedSchemaProperty

WeightedSchemaProperty.Builder

Specifies the schema property name.

Protobuf type google.cloud.contentwarehouse.v1.WeightedSchemaProperty

Interfaces

AccessControlActionOrBuilder

ActionExecutorOutputOrBuilder

ActionOrBuilder

ActionOutputOrBuilder

AddToFolderActionOrBuilder

CloudAIDocumentOptionOrBuilder

CreateDocumentLinkRequestOrBuilder

CreateDocumentMetadataOrBuilder

CreateDocumentRequestOrBuilder

CreateDocumentResponseOrBuilder

CreateDocumentSchemaRequestOrBuilder

CreateRuleSetRequestOrBuilder

CreateSynonymSetRequestOrBuilder

CustomWeightsMetadataOrBuilder

DataUpdateActionOrBuilder

DataValidationActionOrBuilder

DateTimeArrayOrBuilder

DateTimeTypeOptionsOrBuilder

DeleteDocumentActionOrBuilder

DeleteDocumentLinkRequestOrBuilder

DeleteDocumentRequestOrBuilder

DeleteDocumentSchemaRequestOrBuilder

DeleteRuleSetRequestOrBuilder

DeleteSynonymSetRequestOrBuilder

DocumentLinkOrBuilder

DocumentLinkServiceGrpc.AsyncService

This service lets you manage document-links. Document-Links are treated as sub-resources under source documents.

DocumentOrBuilder

DocumentQueryOrBuilder

DocumentReferenceOrBuilder

DocumentSchemaOrBuilder

DocumentSchemaServiceGrpc.AsyncService

This service lets you manage document schema.

DocumentServiceGrpc.AsyncService

This service lets you manage document.

EnumArrayOrBuilder

EnumTypeOptionsOrBuilder

EnumValueOrBuilder

FetchAclRequestOrBuilder

FetchAclResponseOrBuilder

FileTypeFilterOrBuilder

FloatArrayOrBuilder

FloatTypeOptionsOrBuilder

GetDocumentRequestOrBuilder

GetDocumentSchemaRequestOrBuilder

GetRuleSetRequestOrBuilder

GetSynonymSetRequestOrBuilder

HistogramQueryOrBuilder

HistogramQueryPropertyNameFilterOrBuilder

HistogramQueryResultOrBuilder

IntegerArrayOrBuilder

IntegerTypeOptionsOrBuilder

InvalidRuleOrBuilder

ListDocumentSchemasRequestOrBuilder

ListDocumentSchemasResponseOrBuilder

ListLinkedSourcesRequestOrBuilder

ListLinkedSourcesResponseOrBuilder

ListLinkedTargetsRequestOrBuilder

ListLinkedTargetsResponseOrBuilder

ListRuleSetsRequestOrBuilder

ListRuleSetsResponseOrBuilder

ListSynonymSetsRequestOrBuilder

ListSynonymSetsResponseOrBuilder

LockDocumentRequestOrBuilder

MapPropertyOrBuilder

MapTypeOptionsOrBuilder

MergeFieldsOptionsOrBuilder

PropertyArrayOrBuilder

PropertyDefinition.SchemaSourceOrBuilder

PropertyDefinitionOrBuilder

PropertyFilterOrBuilder

PropertyOrBuilder

PropertyTypeOptionsOrBuilder

PublishActionOrBuilder

QAResult.HighlightOrBuilder

QAResultOrBuilder

RemoveFromFolderActionOrBuilder

RequestMetadataOrBuilder

ResponseMetadataOrBuilder

RuleActionsPairOrBuilder

RuleEngineOutputOrBuilder

RuleEvaluatorOutputOrBuilder

RuleOrBuilder

RuleSetOrBuilder

RuleSetServiceGrpc.AsyncService

Service to manage customer specific RuleSets.

SearchDocumentsRequestOrBuilder

SearchDocumentsResponse.MatchingDocumentOrBuilder

SearchDocumentsResponseOrBuilder

SetAclRequestOrBuilder

SetAclResponseOrBuilder

SynonymSet.SynonymOrBuilder

SynonymSetOrBuilder

SynonymSetServiceGrpc.AsyncService

A Service that manage/custom customer specified SynonymSets.

TextArrayOrBuilder

TextTypeOptionsOrBuilder

TimeFilterOrBuilder

TimestampArrayOrBuilder

TimestampTypeOptionsOrBuilder

TimestampValueOrBuilder

UpdateDocumentMetadataOrBuilder

UpdateDocumentRequestOrBuilder

UpdateDocumentResponseOrBuilder

UpdateDocumentSchemaRequestOrBuilder

UpdateOptionsOrBuilder

UpdateRuleSetRequestOrBuilder

UpdateSynonymSetRequestOrBuilder

UserInfoOrBuilder

ValueOrBuilder

WeightedSchemaPropertyOrBuilder

Enums

AccessControlAction.OperationType

Type of ACL modification operation.

Protobuf enum google.cloud.contentwarehouse.v1.AccessControlAction.OperationType

AccessControlMode

Access Control Mode.

Protobuf enum google.cloud.contentwarehouse.v1.AccessControlMode

Action.ActionCase

ActionOutput.State

Represents execution state of the action.

Protobuf enum google.cloud.contentwarehouse.v1.ActionOutput.State

ContentCategory

When a raw document or structured content is supplied, this stores the content category.

Protobuf enum google.cloud.contentwarehouse.v1.ContentCategory

DatabaseType

Type of database used by the customer

Protobuf enum google.cloud.contentwarehouse.v1.DatabaseType

Document.RawDocumentCase

Document.StructuredContentCase

DocumentCreatorDefaultRole

The default role of the document creator.

Protobuf enum google.cloud.contentwarehouse.v1.DocumentCreatorDefaultRole

DocumentLink.State

The state of a document-link.

Protobuf enum google.cloud.contentwarehouse.v1.DocumentLink.State

FileTypeFilter.FileType

Representation of the types of files.

Protobuf enum google.cloud.contentwarehouse.v1.FileTypeFilter.FileType

HistogramQueryPropertyNameFilter.HistogramYAxis

The result of the histogram query count('FilterableProperties') using HISTOGRAM_YAXIS_DOCUMENT will be: invoice_id: 2 address: 1 payment_method: 2 line_item_description: 1

Protobuf enum google.cloud.contentwarehouse.v1.HistogramQueryPropertyNameFilter.HistogramYAxis

Property.ValuesCase

PropertyDefinition.RetrievalImportance

Stores the retrieval importance.

Protobuf enum google.cloud.contentwarehouse.v1.PropertyDefinition.RetrievalImportance

PropertyDefinition.ValueTypeOptionsCase

RawDocumentFileType

When a raw document is supplied, this indicates the file format

Protobuf enum google.cloud.contentwarehouse.v1.RawDocumentFileType

Rule.TriggerType

The trigger types for actions.

Protobuf enum google.cloud.contentwarehouse.v1.Rule.TriggerType

SearchDocumentsRequest.TotalResultSize

The total number of matching documents.

Protobuf enum google.cloud.contentwarehouse.v1.SearchDocumentsRequest.TotalResultSize

TimeFilter.TimeField

Time field used in TimeFilter.

Protobuf enum google.cloud.contentwarehouse.v1.TimeFilter.TimeField

TimestampValue.ValueCase

UpdateType

Update type of the requests.

Protobuf enum google.cloud.contentwarehouse.v1.UpdateType

Value.KindCase