- 0.51.0 (latest)
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
A client to Discovery Engine API
The interfaces provided are listed below, along with usage samples.
DocumentServiceClient
Service Description: Service for ingesting Document information of the customer's website.
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()) {
DocumentName name =
DocumentName.of("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
Document response = documentServiceClient.getDocument(name);
}
RecommendationServiceClient
Service Description: Service for making recommendations.
Sample for RecommendationServiceClient:
// 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 (RecommendationServiceClient recommendationServiceClient =
RecommendationServiceClient.create()) {
RecommendRequest request =
RecommendRequest.newBuilder()
.setServingConfig(
ServingConfigName.of(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
.toString())
.setUserEvent(UserEvent.newBuilder().build())
.setPageSize(883849137)
.setFilter("filter-1274492040")
.setValidateOnly(true)
.putAllParams(new HashMap<String, Value>())
.putAllUserLabels(new HashMap<String, String>())
.build();
RecommendResponse response = recommendationServiceClient.recommend(request);
}
UserEventServiceClient
Service Description: Service for ingesting end user actions on a website to Discovery Engine API.
Sample for UserEventServiceClient:
// 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 (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
WriteUserEventRequest request =
WriteUserEventRequest.newBuilder()
.setParent(DataStoreName.of("[PROJECT]", "[LOCATION]", "[DATA_STORE]").toString())
.setUserEvent(UserEvent.newBuilder().build())
.build();
UserEvent response = userEventServiceClient.writeUserEvent(request);
}
Classes
BigQuerySource
BigQuery source import data from.
Protobuf type google.cloud.discoveryengine.v1beta.BigQuerySource
BigQuerySource.Builder
BigQuery source import data from.
Protobuf type google.cloud.discoveryengine.v1beta.BigQuerySource
BranchName
BranchName.Builder
Builder for projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}.
CollectUserEventRequest
Request message for CollectUserEvent method.
Protobuf type google.cloud.discoveryengine.v1beta.CollectUserEventRequest
CollectUserEventRequest.Builder
Request message for CollectUserEvent method.
Protobuf type google.cloud.discoveryengine.v1beta.CollectUserEventRequest
CommonProto
CompletionInfo
Detailed completion information including completion attribution token and clicked completion info.
Protobuf type google.cloud.discoveryengine.v1beta.CompletionInfo
CompletionInfo.Builder
Detailed completion information including completion attribution token and clicked completion info.
Protobuf type google.cloud.discoveryengine.v1beta.CompletionInfo
CreateDocumentRequest
Request message for DocumentService.CreateDocument method.
Protobuf type google.cloud.discoveryengine.v1beta.CreateDocumentRequest
CreateDocumentRequest.Builder
Request message for DocumentService.CreateDocument method.
Protobuf type google.cloud.discoveryengine.v1beta.CreateDocumentRequest
CustomAttribute
A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.
Protobuf type google.cloud.discoveryengine.v1beta.CustomAttribute
CustomAttribute.Builder
A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.
Protobuf type google.cloud.discoveryengine.v1beta.CustomAttribute
DataStoreName
DataStoreName.Builder
Builder for projects/{project}/locations/{location}/dataStores/{data_store}.
DeleteDocumentRequest
Request message for DocumentService.DeleteDocument method.
Protobuf type google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
DeleteDocumentRequest.Builder
Request message for DocumentService.DeleteDocument method.
Protobuf type google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
Document
Document captures all raw metadata information of items to be recommended or searched.
Protobuf type google.cloud.discoveryengine.v1beta.Document
Document.Builder
Document captures all raw metadata information of items to be recommended or searched.
Protobuf type google.cloud.discoveryengine.v1beta.Document
DocumentInfo
Detailed document information associated with a user event.
Protobuf type google.cloud.discoveryengine.v1beta.DocumentInfo
DocumentInfo.Builder
Detailed document information associated with a user event.
Protobuf type google.cloud.discoveryengine.v1beta.DocumentInfo
DocumentName
DocumentName.Builder
Builder for projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}.
DocumentProto
DocumentServiceClient
Service Description: Service for ingesting Document information of the customer's website.
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()) {
DocumentName name =
DocumentName.of("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
Document response = documentServiceClient.getDocument(name);
}
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:
- 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.
- 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.
- 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.ListDocumentsFixedSizeCollection
DocumentServiceClient.ListDocumentsPage
DocumentServiceClient.ListDocumentsPagedResponse
DocumentServiceGrpc
Service for ingesting Document information of the customer's website.
DocumentServiceGrpc.DocumentServiceBlockingStub
Service for ingesting Document information of the customer's website.
DocumentServiceGrpc.DocumentServiceFutureStub
Service for ingesting Document information of the customer's website.
DocumentServiceGrpc.DocumentServiceImplBase
Service for ingesting Document information of the customer's website.
DocumentServiceGrpc.DocumentServiceStub
Service for ingesting Document information of the customer's website.
DocumentServiceProto
DocumentServiceSettings
Settings class to configure an instance of DocumentServiceClient.
The default instance has everything set to sensible defaults:
- The default service address (discoveryengine.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 getDocument 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
.getDocumentSettings()
.setRetrySettings(
documentServiceSettingsBuilder
.getDocumentSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
DocumentServiceSettings documentServiceSettings = documentServiceSettingsBuilder.build();
DocumentServiceSettings.Builder
Builder for DocumentServiceSettings.
GcsSource
Google Cloud Storage location for input content. format.
Protobuf type google.cloud.discoveryengine.v1beta.GcsSource
GcsSource.Builder
Google Cloud Storage location for input content. format.
Protobuf type google.cloud.discoveryengine.v1beta.GcsSource
GetDocumentRequest
Request message for DocumentService.GetDocument method.
Protobuf type google.cloud.discoveryengine.v1beta.GetDocumentRequest
GetDocumentRequest.Builder
Request message for DocumentService.GetDocument method.
Protobuf type google.cloud.discoveryengine.v1beta.GetDocumentRequest
ImportConfigProto
ImportDocumentsMetadata
Metadata related to the progress of the ImportDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.
Protobuf type google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
ImportDocumentsMetadata.Builder
Metadata related to the progress of the ImportDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.
Protobuf type google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
ImportDocumentsRequest
Request message for Import methods.
Protobuf type google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
ImportDocumentsRequest.Builder
Request message for Import methods.
Protobuf type google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
ImportDocumentsRequest.InlineSource
The inline source for the input config for ImportDocuments method.
Protobuf type google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
ImportDocumentsRequest.InlineSource.Builder
The inline source for the input config for ImportDocuments method.
Protobuf type google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
ImportDocumentsResponse
Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.
Protobuf type google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
ImportDocumentsResponse.Builder
Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.
Protobuf type google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
ImportErrorConfig
Configuration of destination for Import related errors.
Protobuf type google.cloud.discoveryengine.v1beta.ImportErrorConfig
ImportErrorConfig.Builder
Configuration of destination for Import related errors.
Protobuf type google.cloud.discoveryengine.v1beta.ImportErrorConfig
ImportUserEventsMetadata
Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.
Protobuf type google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
ImportUserEventsMetadata.Builder
Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.
Protobuf type google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
ImportUserEventsRequest
Request message for the ImportUserEvents request.
Protobuf type google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
ImportUserEventsRequest.Builder
Request message for the ImportUserEvents request.
Protobuf type google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
ImportUserEventsRequest.InlineSource
The inline source for the input config for ImportUserEvents method.
Protobuf type google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
ImportUserEventsRequest.InlineSource.Builder
The inline source for the input config for ImportUserEvents method.
Protobuf type
google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
ImportUserEventsResponse
Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.
Protobuf type google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
ImportUserEventsResponse.Builder
Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.
Protobuf type google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
ListDocumentsRequest
Request message for DocumentService.ListDocuments method.
Protobuf type google.cloud.discoveryengine.v1beta.ListDocumentsRequest
ListDocumentsRequest.Builder
Request message for DocumentService.ListDocuments method.
Protobuf type google.cloud.discoveryengine.v1beta.ListDocumentsRequest
ListDocumentsResponse
Response message for DocumentService.ListDocuments method.
Protobuf type google.cloud.discoveryengine.v1beta.ListDocumentsResponse
ListDocumentsResponse.Builder
Response message for DocumentService.ListDocuments method.
Protobuf type google.cloud.discoveryengine.v1beta.ListDocumentsResponse
MediaInfo
Media-specific user event information.
Protobuf type google.cloud.discoveryengine.v1beta.MediaInfo
MediaInfo.Builder
Media-specific user event information.
Protobuf type google.cloud.discoveryengine.v1beta.MediaInfo
PageInfo
Detailed page information.
Protobuf type google.cloud.discoveryengine.v1beta.PageInfo
PageInfo.Builder
Detailed page information.
Protobuf type google.cloud.discoveryengine.v1beta.PageInfo
PanelInfo
Detailed panel information associated with a user event.
Protobuf type google.cloud.discoveryengine.v1beta.PanelInfo
PanelInfo.Builder
Detailed panel information associated with a user event.
Protobuf type google.cloud.discoveryengine.v1beta.PanelInfo
RecommendRequest
Request message for Recommend method.
Protobuf type google.cloud.discoveryengine.v1beta.RecommendRequest
RecommendRequest.Builder
Request message for Recommend method.
Protobuf type google.cloud.discoveryengine.v1beta.RecommendRequest
RecommendResponse
Response message for Recommend method.
Protobuf type google.cloud.discoveryengine.v1beta.RecommendResponse
RecommendResponse.Builder
Response message for Recommend method.
Protobuf type google.cloud.discoveryengine.v1beta.RecommendResponse
RecommendResponse.RecommendationResult
RecommendationResult represents a generic recommendation result with associated metadata.
Protobuf type
google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
RecommendResponse.RecommendationResult.Builder
RecommendationResult represents a generic recommendation result with associated metadata.
Protobuf type
google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
RecommendationServiceClient
Service Description: Service for making recommendations.
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 (RecommendationServiceClient recommendationServiceClient =
RecommendationServiceClient.create()) {
RecommendRequest request =
RecommendRequest.newBuilder()
.setServingConfig(
ServingConfigName.of(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
.toString())
.setUserEvent(UserEvent.newBuilder().build())
.setPageSize(883849137)
.setFilter("filter-1274492040")
.setValidateOnly(true)
.putAllParams(new HashMap<String, Value>())
.putAllUserLabels(new HashMap<String, String>())
.build();
RecommendResponse response = recommendationServiceClient.recommend(request);
}
Note: close() needs to be called on the RecommendationServiceClient 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:
- 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.
- 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.
- 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 RecommendationServiceSettings 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
RecommendationServiceSettings recommendationServiceSettings =
RecommendationServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RecommendationServiceClient recommendationServiceClient =
RecommendationServiceClient.create(recommendationServiceSettings);
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
RecommendationServiceSettings recommendationServiceSettings =
RecommendationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
RecommendationServiceClient recommendationServiceClient =
RecommendationServiceClient.create(recommendationServiceSettings);
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
RecommendationServiceSettings recommendationServiceSettings =
RecommendationServiceSettings.newHttpJsonBuilder().build();
RecommendationServiceClient recommendationServiceClient =
RecommendationServiceClient.create(recommendationServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
RecommendationServiceGrpc
Service for making recommendations.
RecommendationServiceGrpc.RecommendationServiceBlockingStub
Service for making recommendations.
RecommendationServiceGrpc.RecommendationServiceFutureStub
Service for making recommendations.
RecommendationServiceGrpc.RecommendationServiceImplBase
Service for making recommendations.
RecommendationServiceGrpc.RecommendationServiceStub
Service for making recommendations.
RecommendationServiceProto
RecommendationServiceSettings
Settings class to configure an instance of RecommendationServiceClient.
The default instance has everything set to sensible defaults:
- The default service address (discoveryengine.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 recommend 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
RecommendationServiceSettings.Builder recommendationServiceSettingsBuilder =
RecommendationServiceSettings.newBuilder();
recommendationServiceSettingsBuilder
.recommendSettings()
.setRetrySettings(
recommendationServiceSettingsBuilder
.recommendSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
RecommendationServiceSettings recommendationServiceSettings =
recommendationServiceSettingsBuilder.build();
RecommendationServiceSettings.Builder
Builder for RecommendationServiceSettings.
SearchInfo
Detailed search information.
Protobuf type google.cloud.discoveryengine.v1beta.SearchInfo
SearchInfo.Builder
Detailed search information.
Protobuf type google.cloud.discoveryengine.v1beta.SearchInfo
ServingConfigName
ServingConfigName.Builder
Builder for projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}.
TransactionInfo
A transaction represents the entire purchase transaction.
Protobuf type google.cloud.discoveryengine.v1beta.TransactionInfo
TransactionInfo.Builder
A transaction represents the entire purchase transaction.
Protobuf type google.cloud.discoveryengine.v1beta.TransactionInfo
UpdateDocumentRequest
Request message for DocumentService.UpdateDocument method.
Protobuf type google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
UpdateDocumentRequest.Builder
Request message for DocumentService.UpdateDocument method.
Protobuf type google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
UserEvent
UserEvent captures all metadata information DiscoveryEngine API needs to know about how end users interact with customers' website.
Protobuf type google.cloud.discoveryengine.v1beta.UserEvent
UserEvent.Builder
UserEvent captures all metadata information DiscoveryEngine API needs to know about how end users interact with customers' website.
Protobuf type google.cloud.discoveryengine.v1beta.UserEvent
UserEventProto
UserEventServiceClient
Service Description: Service for ingesting end user actions on a website to Discovery Engine API.
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 (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
WriteUserEventRequest request =
WriteUserEventRequest.newBuilder()
.setParent(DataStoreName.of("[PROJECT]", "[LOCATION]", "[DATA_STORE]").toString())
.setUserEvent(UserEvent.newBuilder().build())
.build();
UserEvent response = userEventServiceClient.writeUserEvent(request);
}
Note: close() needs to be called on the UserEventServiceClient 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:
- 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.
- 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.
- 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 UserEventServiceSettings 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
UserEventServiceSettings userEventServiceSettings =
UserEventServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
UserEventServiceClient userEventServiceClient =
UserEventServiceClient.create(userEventServiceSettings);
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
UserEventServiceSettings userEventServiceSettings =
UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
UserEventServiceClient userEventServiceClient =
UserEventServiceClient.create(userEventServiceSettings);
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
UserEventServiceSettings userEventServiceSettings =
UserEventServiceSettings.newHttpJsonBuilder().build();
UserEventServiceClient userEventServiceClient =
UserEventServiceClient.create(userEventServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
UserEventServiceGrpc
Service for ingesting end user actions on a website to Discovery Engine API.
UserEventServiceGrpc.UserEventServiceBlockingStub
Service for ingesting end user actions on a website to Discovery Engine API.
UserEventServiceGrpc.UserEventServiceFutureStub
Service for ingesting end user actions on a website to Discovery Engine API.
UserEventServiceGrpc.UserEventServiceImplBase
Service for ingesting end user actions on a website to Discovery Engine API.
UserEventServiceGrpc.UserEventServiceStub
Service for ingesting end user actions on a website to Discovery Engine API.
UserEventServiceProto
UserEventServiceSettings
Settings class to configure an instance of UserEventServiceClient.
The default instance has everything set to sensible defaults:
- The default service address (discoveryengine.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 writeUserEvent 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
UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
UserEventServiceSettings.newBuilder();
userEventServiceSettingsBuilder
.writeUserEventSettings()
.setRetrySettings(
userEventServiceSettingsBuilder
.writeUserEventSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
UserEventServiceSettings.Builder
Builder for UserEventServiceSettings.
UserInfo
Information of an end user.
Protobuf type google.cloud.discoveryengine.v1beta.UserInfo
UserInfo.Builder
Information of an end user.
Protobuf type google.cloud.discoveryengine.v1beta.UserInfo
WriteUserEventRequest
Request message for WriteUserEvent method.
Protobuf type google.cloud.discoveryengine.v1beta.WriteUserEventRequest
WriteUserEventRequest.Builder
Request message for WriteUserEvent method.
Protobuf type google.cloud.discoveryengine.v1beta.WriteUserEventRequest
Interfaces
BigQuerySourceOrBuilder
CollectUserEventRequestOrBuilder
CompletionInfoOrBuilder
CreateDocumentRequestOrBuilder
CustomAttributeOrBuilder
DeleteDocumentRequestOrBuilder
DocumentInfoOrBuilder
DocumentOrBuilder
GcsSourceOrBuilder
GetDocumentRequestOrBuilder
ImportDocumentsMetadataOrBuilder
ImportDocumentsRequest.InlineSourceOrBuilder
ImportDocumentsRequestOrBuilder
ImportDocumentsResponseOrBuilder
ImportErrorConfigOrBuilder
ImportUserEventsMetadataOrBuilder
ImportUserEventsRequest.InlineSourceOrBuilder
ImportUserEventsRequestOrBuilder
ImportUserEventsResponseOrBuilder
ListDocumentsRequestOrBuilder
ListDocumentsResponseOrBuilder
MediaInfoOrBuilder
PageInfoOrBuilder
PanelInfoOrBuilder
RecommendRequestOrBuilder
RecommendResponse.RecommendationResultOrBuilder
RecommendResponseOrBuilder
SearchInfoOrBuilder
TransactionInfoOrBuilder
UpdateDocumentRequestOrBuilder
UserEventOrBuilder
UserInfoOrBuilder
WriteUserEventRequestOrBuilder
Enums
BigQuerySource.PartitionCase
Document.DataCase
DocumentInfo.DocumentDescriptorCase
ImportDocumentsRequest.ReconciliationMode
Indicates how imported documents are reconciled with the existing documents created or imported before.
Protobuf enum
google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode