Skip to content

Commit

Permalink
feat: [dialogflow-cx] add agent answer feedback capability (#10066)
Browse files Browse the repository at this point in the history
* feat: add agent answer feedback capability
feat: add fields for supporting barge-in in StreamingDetectIntent API
feat: add end_user_metadata to QueryParameters
feat: add boost & bury and filter ES controls

PiperOrigin-RevId: 583522403

Source-Link: googleapis/googleapis@86c7ca6

Source-Link: googleapis/googleapis-gen@42f2c6e
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiI0MmYyYzZlOTc5YTFkMmE2ZmFlZGQ3NzJlMjNkNDllNmVmMDE5NDcwIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add agent answer feedback capability
feat: add fields for supporting barge-in in StreamingDetectIntent API
feat: add end_user_metadata to QueryParameters
feat: add boost & bury and filter ES controls

PiperOrigin-RevId: 583523426

Source-Link: googleapis/googleapis@c73d0da

Source-Link: googleapis/googleapis-gen@1b5ed29
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiIxYjVlZDI5NDk4YjM0ZTEwMTZlMWY2OWVjYjI4MDgxNjhiZDM0ZDE1In0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Nov 27, 2023
1 parent 8a2c241 commit 8cca9aa
Show file tree
Hide file tree
Showing 113 changed files with 32,186 additions and 2,301 deletions.
4 changes: 2 additions & 2 deletions java-dialogflow-cx/README.md
Expand Up @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.23.0</version>
<version>26.27.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow-cx.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.35.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.41.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Expand Up @@ -177,175 +177,6 @@ public EntityTypesStub getStub() {
return stub;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
* for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param parent Required. The agent to list all entity types for. Format: `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) {
ListEntityTypesRequest request =
ListEntityTypesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listEntityTypes(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
* for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param parent Required. The agent to list all entity types for. Format: `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListEntityTypesPagedResponse listEntityTypes(String parent) {
ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder().setParent(parent).build();
return listEntityTypes(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* ListEntityTypesRequest request =
* ListEntityTypesRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setLanguageCode("languageCode-2092349083")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* for (EntityType element : entityTypesClient.listEntityTypes(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest request) {
return listEntityTypesPagedCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* ListEntityTypesRequest request =
* ListEntityTypesRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setLanguageCode("languageCode-2092349083")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* ApiFuture<EntityType> future =
* entityTypesClient.listEntityTypesPagedCallable().futureCall(request);
* // Do something.
* for (EntityType element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*/
public final UnaryCallable<ListEntityTypesRequest, ListEntityTypesPagedResponse>
listEntityTypesPagedCallable() {
return stub.listEntityTypesPagedCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* ListEntityTypesRequest request =
* ListEntityTypesRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setLanguageCode("languageCode-2092349083")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* while (true) {
* ListEntityTypesResponse response =
* entityTypesClient.listEntityTypesCallable().call(request);
* for (EntityType element : response.getEntityTypesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }</pre>
*/
public final UnaryCallable<ListEntityTypesRequest, ListEntityTypesResponse>
listEntityTypesCallable() {
return stub.listEntityTypesCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves the specified entity type.
Expand Down Expand Up @@ -834,6 +665,175 @@ public final UnaryCallable<DeleteEntityTypeRequest, Empty> deleteEntityTypeCalla
return stub.deleteEntityTypeCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
* for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param parent Required. The agent to list all entity types for. Format: `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) {
ListEntityTypesRequest request =
ListEntityTypesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listEntityTypes(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
* for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param parent Required. The agent to list all entity types for. Format: `projects/&lt;Project
* ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListEntityTypesPagedResponse listEntityTypes(String parent) {
ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder().setParent(parent).build();
return listEntityTypes(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* ListEntityTypesRequest request =
* ListEntityTypesRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setLanguageCode("languageCode-2092349083")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* for (EntityType element : entityTypesClient.listEntityTypes(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest request) {
return listEntityTypesPagedCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* ListEntityTypesRequest request =
* ListEntityTypesRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setLanguageCode("languageCode-2092349083")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* ApiFuture<EntityType> future =
* entityTypesClient.listEntityTypesPagedCallable().futureCall(request);
* // Do something.
* for (EntityType element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*/
public final UnaryCallable<ListEntityTypesRequest, ListEntityTypesPagedResponse>
listEntityTypesPagedCallable() {
return stub.listEntityTypesPagedCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the list of all entity types in the specified agent.
*
* <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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
* ListEntityTypesRequest request =
* ListEntityTypesRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setLanguageCode("languageCode-2092349083")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* while (true) {
* ListEntityTypesResponse response =
* entityTypesClient.listEntityTypesCallable().call(request);
* for (EntityType element : response.getEntityTypesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }</pre>
*/
public final UnaryCallable<ListEntityTypesRequest, ListEntityTypesResponse>
listEntityTypesCallable() {
return stub.listEntityTypesCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
Expand Down

0 comments on commit 8cca9aa

Please sign in to comment.