@Generated(value="by gapic-generator-java")
See: Description
| Class | Description |
|---|---|
| DocumentServiceClient |
Service Description: Service for ingesting
[Document][google.cloud.discoveryengine.v1beta.Document] information of the customer's website.
|
| DocumentServiceClient.ListDocumentsFixedSizeCollection | |
| DocumentServiceClient.ListDocumentsPage | |
| DocumentServiceClient.ListDocumentsPagedResponse | |
| DocumentServiceSettings |
Settings class to configure an instance of
DocumentServiceClient. |
| DocumentServiceSettings.Builder |
Builder for DocumentServiceSettings.
|
| RecommendationServiceClient |
Service Description: Service for making recommendations.
|
| RecommendationServiceSettings |
Settings class to configure an instance of
RecommendationServiceClient. |
| RecommendationServiceSettings.Builder |
Builder for RecommendationServiceSettings.
|
| UserEventServiceClient |
Service Description: Service for ingesting end user actions on a website to Discovery Engine API.
|
| UserEventServiceSettings |
Settings class to configure an instance of
UserEventServiceClient. |
| UserEventServiceSettings.Builder |
Builder for UserEventServiceSettings.
|
The interfaces provided are listed below, along with usage samples.
======================= DocumentServiceClient =======================
Service Description: Service for ingesting [Document][google.cloud.discoveryengine.v1beta.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);
}
Copyright © 2022 Google LLC. All rights reserved.