Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions java-dialogflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Java idiomatic client for [Dialogflow API][product-docs].

If you are using Maven, add this to your pom.xml file:

<!--- {x-version-update-start:google-cloud-dialogflow:released} -->

```xml
<dependency>
Expand All @@ -35,7 +34,6 @@ If you are using SBT, add this to your dependencies:
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "4.18.0"
```
<!--- {x-version-update-end} -->

## Authentication

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,69 @@ public final void deleteConversationProfile(DeleteConversationProfileRequest req
return setSuggestionFeatureConfigAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds or updates a suggestion feature in a conversation profile. If the conversation profile
* contains the type of suggestion feature for the participant role, it will update it. Otherwise
* it will insert the suggestion feature.
*
* <p>This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). The
* returned `Operation` type has the following method-specific fields:
*
* <p>- `metadata`:
* [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata]
* - `response`: [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]
*
* <p>If a long running operation to add or update suggestion feature config for the same
* conversation profile, participant role and suggestion feature type exists, please cancel the
* existing long running operation before sending such request, otherwise the request will be
* rejected.
*
* <p>Sample code:
*
* <pre>{@code
* // 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 (ConversationProfilesClient conversationProfilesClient =
* ConversationProfilesClient.create()) {
* String conversationProfile = "conversationProfile1691597734";
* Participant.Role participantRole = Participant.Role.forNumber(0);
* HumanAgentAssistantConfig.SuggestionFeatureConfig suggestionFeatureConfig =
* HumanAgentAssistantConfig.SuggestionFeatureConfig.newBuilder().build();
* ConversationProfile response =
* conversationProfilesClient
* .setSuggestionFeatureConfigAsync(
* conversationProfile, participantRole, suggestionFeatureConfig)
* .get();
* }
* }</pre>
*
* @param conversationProfile Required. The Conversation Profile to add or update the suggestion
* feature config. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/conversationProfiles/&lt;Conversation Profile ID&gt;`.
* @param participantRole Required. The participant role to add or update the suggestion feature
* config. Only HUMAN_AGENT or END_USER can be used.
* @param suggestionFeatureConfig Required. The suggestion feature config to add or update.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<ConversationProfile, SetSuggestionFeatureConfigOperationMetadata>
setSuggestionFeatureConfigAsync(
String conversationProfile,
Participant.Role participantRole,
HumanAgentAssistantConfig.SuggestionFeatureConfig suggestionFeatureConfig) {
SetSuggestionFeatureConfigRequest request =
SetSuggestionFeatureConfigRequest.newBuilder()
.setConversationProfile(conversationProfile)
.setParticipantRole(participantRole)
.setSuggestionFeatureConfig(suggestionFeatureConfig)
.build();
return setSuggestionFeatureConfigAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds or updates a suggestion feature in a conversation profile. If the conversation profile
Expand Down Expand Up @@ -1234,6 +1297,61 @@ public final void deleteConversationProfile(DeleteConversationProfileRequest req
return clearSuggestionFeatureConfigAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Clears a suggestion feature from a conversation profile for the given participant role.
*
* <p>This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). The
* returned `Operation` type has the following method-specific fields:
*
* <p>- `metadata`:
* [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata]
* - `response`: [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]
*
* <p>Sample code:
*
* <pre>{@code
* // 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 (ConversationProfilesClient conversationProfilesClient =
* ConversationProfilesClient.create()) {
* String conversationProfile = "conversationProfile1691597734";
* Participant.Role participantRole = Participant.Role.forNumber(0);
* SuggestionFeature.Type suggestionFeatureType = SuggestionFeature.Type.forNumber(0);
* ConversationProfile response =
* conversationProfilesClient
* .clearSuggestionFeatureConfigAsync(
* conversationProfile, participantRole, suggestionFeatureType)
* .get();
* }
* }</pre>
*
* @param conversationProfile Required. The Conversation Profile to add or update the suggestion
* feature config. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/conversationProfiles/&lt;Conversation Profile ID&gt;`.
* @param participantRole Required. The participant role to remove the suggestion feature config.
* Only HUMAN_AGENT or END_USER can be used.
* @param suggestionFeatureType Required. The type of the suggestion feature to remove.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata>
clearSuggestionFeatureConfigAsync(
String conversationProfile,
Participant.Role participantRole,
SuggestionFeature.Type suggestionFeatureType) {
ClearSuggestionFeatureConfigRequest request =
ClearSuggestionFeatureConfigRequest.newBuilder()
.setConversationProfile(conversationProfile)
.setParticipantRole(participantRole)
.setSuggestionFeatureType(suggestionFeatureType)
.build();
return clearSuggestionFeatureConfigAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Clears a suggestion feature from a conversation profile for the given participant role.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
"libraryClient": "ConversationProfilesClient",
"rpcs": {
"ClearSuggestionFeatureConfig": {
"methods": ["clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigOperationCallable", "clearSuggestionFeatureConfigCallable"]
"methods": ["clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigOperationCallable", "clearSuggestionFeatureConfigCallable"]
},
"CreateConversationProfile": {
"methods": ["createConversationProfile", "createConversationProfile", "createConversationProfile", "createConversationProfile", "createConversationProfileCallable"]
Expand All @@ -233,7 +233,7 @@
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
},
"SetSuggestionFeatureConfig": {
"methods": ["setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigOperationCallable", "setSuggestionFeatureConfigCallable"]
"methods": ["setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigOperationCallable", "setSuggestionFeatureConfigCallable"]
},
"UpdateConversationProfile": {
"methods": ["updateConversationProfile", "updateConversationProfile", "updateConversationProfileCallable"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,69 @@ public final void deleteConversationProfile(DeleteConversationProfileRequest req
return setSuggestionFeatureConfigAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds or updates a suggestion feature in a conversation profile. If the conversation profile
* contains the type of suggestion feature for the participant role, it will update it. Otherwise
* it will insert the suggestion feature.
*
* <p>This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). The
* returned `Operation` type has the following method-specific fields:
*
* <p>- `metadata`:
* [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata]
* - `response`: [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile]
*
* <p>If a long running operation to add or update suggestion feature config for the same
* conversation profile, participant role and suggestion feature type exists, please cancel the
* existing long running operation before sending such request, otherwise the request will be
* rejected.
*
* <p>Sample code:
*
* <pre>{@code
* // 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 (ConversationProfilesClient conversationProfilesClient =
* ConversationProfilesClient.create()) {
* String conversationProfile = "conversationProfile1691597734";
* Participant.Role participantRole = Participant.Role.forNumber(0);
* HumanAgentAssistantConfig.SuggestionFeatureConfig suggestionFeatureConfig =
* HumanAgentAssistantConfig.SuggestionFeatureConfig.newBuilder().build();
* ConversationProfile response =
* conversationProfilesClient
* .setSuggestionFeatureConfigAsync(
* conversationProfile, participantRole, suggestionFeatureConfig)
* .get();
* }
* }</pre>
*
* @param conversationProfile Required. The Conversation Profile to add or update the suggestion
* feature config. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/conversationProfiles/&lt;Conversation Profile ID&gt;`.
* @param participantRole Required. The participant role to add or update the suggestion feature
* config. Only HUMAN_AGENT or END_USER can be used.
* @param suggestionFeatureConfig Required. The suggestion feature config to add or update.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<ConversationProfile, SetSuggestionFeatureConfigOperationMetadata>
setSuggestionFeatureConfigAsync(
String conversationProfile,
Participant.Role participantRole,
HumanAgentAssistantConfig.SuggestionFeatureConfig suggestionFeatureConfig) {
SetSuggestionFeatureConfigRequest request =
SetSuggestionFeatureConfigRequest.newBuilder()
.setConversationProfile(conversationProfile)
.setParticipantRole(participantRole)
.setSuggestionFeatureConfig(suggestionFeatureConfig)
.build();
return setSuggestionFeatureConfigAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds or updates a suggestion feature in a conversation profile. If the conversation profile
Expand Down Expand Up @@ -1235,6 +1298,61 @@ public final void deleteConversationProfile(DeleteConversationProfileRequest req
return clearSuggestionFeatureConfigAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Clears a suggestion feature from a conversation profile for the given participant role.
*
* <p>This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). The
* returned `Operation` type has the following method-specific fields:
*
* <p>- `metadata`:
* [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata]
* - `response`: [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile]
*
* <p>Sample code:
*
* <pre>{@code
* // 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 (ConversationProfilesClient conversationProfilesClient =
* ConversationProfilesClient.create()) {
* String conversationProfile = "conversationProfile1691597734";
* Participant.Role participantRole = Participant.Role.forNumber(0);
* SuggestionFeature.Type suggestionFeatureType = SuggestionFeature.Type.forNumber(0);
* ConversationProfile response =
* conversationProfilesClient
* .clearSuggestionFeatureConfigAsync(
* conversationProfile, participantRole, suggestionFeatureType)
* .get();
* }
* }</pre>
*
* @param conversationProfile Required. The Conversation Profile to add or update the suggestion
* feature config. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/conversationProfiles/&lt;Conversation Profile ID&gt;`.
* @param participantRole Required. The participant role to remove the suggestion feature config.
* Only HUMAN_AGENT or END_USER can be used.
* @param suggestionFeatureType Required. The type of the suggestion feature to remove.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata>
clearSuggestionFeatureConfigAsync(
String conversationProfile,
Participant.Role participantRole,
SuggestionFeature.Type suggestionFeatureType) {
ClearSuggestionFeatureConfigRequest request =
ClearSuggestionFeatureConfigRequest.newBuilder()
.setConversationProfile(conversationProfile)
.setParticipantRole(participantRole)
.setSuggestionFeatureType(suggestionFeatureType)
.build();
return clearSuggestionFeatureConfigAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Clears a suggestion feature from a conversation profile for the given participant role.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,7 @@ public final SuggestConversationSummaryResponse suggestConversationSummary(Strin
* "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
* .toString())
* .setContextSize(1116903569)
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .build();
* SuggestConversationSummaryResponse response =
* conversationsClient.suggestConversationSummary(request);
Expand Down Expand Up @@ -1314,6 +1315,7 @@ public final SuggestConversationSummaryResponse suggestConversationSummary(
* "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
* .toString())
* .setContextSize(1116903569)
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .build();
* ApiFuture<SuggestConversationSummaryResponse> future =
* conversationsClient.suggestConversationSummaryCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"libraryClient": "ConversationProfilesClient",
"rpcs": {
"ClearSuggestionFeatureConfig": {
"methods": ["clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigOperationCallable", "clearSuggestionFeatureConfigCallable"]
"methods": ["clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigAsync", "clearSuggestionFeatureConfigOperationCallable", "clearSuggestionFeatureConfigCallable"]
},
"CreateConversationProfile": {
"methods": ["createConversationProfile", "createConversationProfile", "createConversationProfile", "createConversationProfile", "createConversationProfileCallable"]
Expand All @@ -167,7 +167,7 @@
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
},
"SetSuggestionFeatureConfig": {
"methods": ["setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigOperationCallable", "setSuggestionFeatureConfigCallable"]
"methods": ["setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigAsync", "setSuggestionFeatureConfigOperationCallable", "setSuggestionFeatureConfigCallable"]
},
"UpdateConversationProfile": {
"methods": ["updateConversationProfile", "updateConversationProfile", "updateConversationProfileCallable"]
Expand Down
Loading