Skip to content

Commit

Permalink
feat: [dialogflow-cx] added generative AI, safety/security and speech…
Browse files Browse the repository at this point in the history
… endpointing settings (#9751)

* feat: added agent level route group
feat: added flow import strategy

PiperOrigin-RevId: 555319706

Source-Link: googleapis/googleapis@2eec4fc

Source-Link: googleapis/googleapis-gen@ef19273
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiJlZjE5MjczM2UyYjc0MzRhNWU0NDJmOWE1ZTgyY2UwODgwMzc3ZmJmIn0=

* 🦉 Updates from OwlBot post-processor

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

* feat: added agent level route group
feat: added flow import strategy

PiperOrigin-RevId: 555341760

Source-Link: googleapis/googleapis@713b3e7

Source-Link: googleapis/googleapis-gen@7d3c46c
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiI3ZDNjNDZjYjdkODIzOTNiNGE1ODNlYTg1YTQ1YjliNDgzNjI5NTk2In0=

* 🦉 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: added generative AI, safety/security and speech endpointing settings

PiperOrigin-RevId: 561081536

Source-Link: googleapis/googleapis@a56c359

Source-Link: googleapis/googleapis-gen@97d4712
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiI5N2Q0NzEyMWEyZWJlMDYzMDliOGI5YWZjOTU3NzkyOWE1OWM4N2Q5In0=

* 🦉 Updates from OwlBot post-processor

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

* feat: added generative AI, safety/security and speech endpointing settings

PiperOrigin-RevId: 561467853

Source-Link: googleapis/googleapis@01f6828

Source-Link: googleapis/googleapis-gen@3ccca03
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiIzY2NjYTAzMjllNjc5OWZlOGYyNDJlNmZjZGQ0YTRmMzA3OTU0NmI4In0=

* 🦉 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 Aug 31, 2023
1 parent b6c0df2 commit c1e969e
Show file tree
Hide file tree
Showing 235 changed files with 46,308 additions and 2,272 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.19.0</version>
<version>26.22.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.32.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.34.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 @@ -1255,6 +1255,230 @@ public final AgentValidationResult getAgentValidationResult(
return stub.getAgentValidationResultCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
* AgentGenerativeSettingsName name =
* AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
* String languageCode = "languageCode-2092349083";
* GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode);
* }
* }</pre>
*
* @param name Required. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agents/&lt;Agent ID&gt;/generativeSettings`.
* @param languageCode Required. Language code of the generative settings.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final GenerativeSettings getGenerativeSettings(
AgentGenerativeSettingsName name, String languageCode) {
GetGenerativeSettingsRequest request =
GetGenerativeSettingsRequest.newBuilder()
.setName(name == null ? null : name.toString())
.setLanguageCode(languageCode)
.build();
return getGenerativeSettings(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
* String name = AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
* String languageCode = "languageCode-2092349083";
* GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode);
* }
* }</pre>
*
* @param name Required. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
* ID&gt;/agents/&lt;Agent ID&gt;/generativeSettings`.
* @param languageCode Required. Language code of the generative settings.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final GenerativeSettings getGenerativeSettings(String name, String languageCode) {
GetGenerativeSettingsRequest request =
GetGenerativeSettingsRequest.newBuilder()
.setName(name)
.setLanguageCode(languageCode)
.build();
return getGenerativeSettings(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
* GetGenerativeSettingsRequest request =
* GetGenerativeSettingsRequest.newBuilder()
* .setName(
* AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setLanguageCode("languageCode-2092349083")
* .build();
* GenerativeSettings response = agentsClient.getGenerativeSettings(request);
* }
* }</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 GenerativeSettings getGenerativeSettings(GetGenerativeSettingsRequest request) {
return getGenerativeSettingsCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
* GetGenerativeSettingsRequest request =
* GetGenerativeSettingsRequest.newBuilder()
* .setName(
* AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setLanguageCode("languageCode-2092349083")
* .build();
* ApiFuture<GenerativeSettings> future =
* agentsClient.getGenerativeSettingsCallable().futureCall(request);
* // Do something.
* GenerativeSettings response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<GetGenerativeSettingsRequest, GenerativeSettings>
getGenerativeSettingsCallable() {
return stub.getGenerativeSettingsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
* GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* GenerativeSettings response =
* agentsClient.updateGenerativeSettings(generativeSettings, updateMask);
* }
* }</pre>
*
* @param generativeSettings Required. Generative settings to update.
* @param updateMask Optional. The mask to control which fields get updated. If the mask is not
* present, all fields will be updated.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final GenerativeSettings updateGenerativeSettings(
GenerativeSettings generativeSettings, FieldMask updateMask) {
UpdateGenerativeSettingsRequest request =
UpdateGenerativeSettingsRequest.newBuilder()
.setGenerativeSettings(generativeSettings)
.setUpdateMask(updateMask)
.build();
return updateGenerativeSettings(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
* UpdateGenerativeSettingsRequest request =
* UpdateGenerativeSettingsRequest.newBuilder()
* .setGenerativeSettings(GenerativeSettings.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* GenerativeSettings response = agentsClient.updateGenerativeSettings(request);
* }
* }</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 GenerativeSettings updateGenerativeSettings(
UpdateGenerativeSettingsRequest request) {
return updateGenerativeSettingsCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the generative settings for the 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 (AgentsClient agentsClient = AgentsClient.create()) {
* UpdateGenerativeSettingsRequest request =
* UpdateGenerativeSettingsRequest.newBuilder()
* .setGenerativeSettings(GenerativeSettings.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<GenerativeSettings> future =
* agentsClient.updateGenerativeSettingsCallable().futureCall(request);
* // Do something.
* GenerativeSettings response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<UpdateGenerativeSettingsRequest, GenerativeSettings>
updateGenerativeSettingsCallable() {
return stub.updateGenerativeSettingsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
Expand Down
Expand Up @@ -141,6 +141,18 @@ public UnaryCallSettings<ValidateAgentRequest, AgentValidationResult> validateAg
return ((AgentsStubSettings) getStubSettings()).getAgentValidationResultSettings();
}

/** Returns the object with the settings used for calls to getGenerativeSettings. */
public UnaryCallSettings<GetGenerativeSettingsRequest, GenerativeSettings>
getGenerativeSettingsSettings() {
return ((AgentsStubSettings) getStubSettings()).getGenerativeSettingsSettings();
}

/** Returns the object with the settings used for calls to updateGenerativeSettings. */
public UnaryCallSettings<UpdateGenerativeSettingsRequest, GenerativeSettings>
updateGenerativeSettingsSettings() {
return ((AgentsStubSettings) getStubSettings()).updateGenerativeSettingsSettings();
}

/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
Expand Down Expand Up @@ -326,6 +338,18 @@ public UnaryCallSettings.Builder<RestoreAgentRequest, Operation> restoreAgentSet
return getStubSettingsBuilder().getAgentValidationResultSettings();
}

/** Returns the builder for the settings used for calls to getGenerativeSettings. */
public UnaryCallSettings.Builder<GetGenerativeSettingsRequest, GenerativeSettings>
getGenerativeSettingsSettings() {
return getStubSettingsBuilder().getGenerativeSettingsSettings();
}

/** Returns the builder for the settings used for calls to updateGenerativeSettings. */
public UnaryCallSettings.Builder<UpdateGenerativeSettingsRequest, GenerativeSettings>
updateGenerativeSettingsSettings() {
return getStubSettingsBuilder().updateGenerativeSettingsSettings();
}

/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
Expand Down
Expand Up @@ -1239,6 +1239,7 @@ public final FlowValidationResult getFlowValidationResult(
* ImportFlowRequest request =
* ImportFlowRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setFlowImportStrategy(FlowImportStrategy.newBuilder().build())
* .build();
* ImportFlowResponse response = flowsClient.importFlowAsync(request).get();
* }
Expand Down Expand Up @@ -1279,6 +1280,7 @@ public final OperationFuture<ImportFlowResponse, Struct> importFlowAsync(
* ImportFlowRequest request =
* ImportFlowRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setFlowImportStrategy(FlowImportStrategy.newBuilder().build())
* .build();
* OperationFuture<ImportFlowResponse, Struct> future =
* flowsClient.importFlowOperationCallable().futureCall(request);
Expand Down Expand Up @@ -1319,6 +1321,7 @@ public final OperationFuture<ImportFlowResponse, Struct> importFlowAsync(
* ImportFlowRequest request =
* ImportFlowRequest.newBuilder()
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
* .setFlowImportStrategy(FlowImportStrategy.newBuilder().build())
* .build();
* ApiFuture<Operation> future = flowsClient.importFlowCallable().futureCall(request);
* // Do something.
Expand Down

0 comments on commit c1e969e

Please sign in to comment.