Skip to content

Commit c1e969e

Browse files
feat: [dialogflow-cx] added generative AI, safety/security and speech endpointing settings (#9751)
* feat: added agent level route group feat: added flow import strategy PiperOrigin-RevId: 555319706 Source-Link: googleapis/googleapis@2eec4fc Source-Link: https://github.com/googleapis/googleapis-gen/commit/ef192733e2b7434a5e442f9a5e82ce0880377fbf 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: https://github.com/googleapis/googleapis-gen/commit/7d3c46cb7d82393b4a583ea85a45b9b483629596 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: https://github.com/googleapis/googleapis-gen/commit/97d47121a2ebe06309b8b9afc9577929a59c87d9 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: https://github.com/googleapis/googleapis-gen/commit/3ccca0329e6799fe8f242e6fcdd4a4f3079546b8 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>
1 parent b6c0df2 commit c1e969e

File tree

235 files changed

+46308
-2272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+46308
-2272
lines changed

java-dialogflow-cx/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2323
<dependency>
2424
<groupId>com.google.cloud</groupId>
2525
<artifactId>libraries-bom</artifactId>
26-
<version>26.19.0</version>
26+
<version>26.22.0</version>
2727
<type>pom</type>
2828
<scope>import</scope>
2929
</dependency>
@@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
201201
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
202202
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
203203
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow-cx.svg
204-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.32.0
204+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.34.0
205205
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
206206
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
207207
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,230 @@ public final AgentValidationResult getAgentValidationResult(
12551255
return stub.getAgentValidationResultCallable();
12561256
}
12571257

1258+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1259+
/**
1260+
* Gets the generative settings for the agent.
1261+
*
1262+
* <p>Sample code:
1263+
*
1264+
* <pre>{@code
1265+
* // This snippet has been automatically generated and should be regarded as a code template only.
1266+
* // It will require modifications to work:
1267+
* // - It may require correct/in-range values for request initialization.
1268+
* // - It may require specifying regional endpoints when creating the service client as shown in
1269+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1270+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1271+
* AgentGenerativeSettingsName name =
1272+
* AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
1273+
* String languageCode = "languageCode-2092349083";
1274+
* GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode);
1275+
* }
1276+
* }</pre>
1277+
*
1278+
* @param name Required. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
1279+
* ID&gt;/agents/&lt;Agent ID&gt;/generativeSettings`.
1280+
* @param languageCode Required. Language code of the generative settings.
1281+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1282+
*/
1283+
public final GenerativeSettings getGenerativeSettings(
1284+
AgentGenerativeSettingsName name, String languageCode) {
1285+
GetGenerativeSettingsRequest request =
1286+
GetGenerativeSettingsRequest.newBuilder()
1287+
.setName(name == null ? null : name.toString())
1288+
.setLanguageCode(languageCode)
1289+
.build();
1290+
return getGenerativeSettings(request);
1291+
}
1292+
1293+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1294+
/**
1295+
* Gets the generative settings for the agent.
1296+
*
1297+
* <p>Sample code:
1298+
*
1299+
* <pre>{@code
1300+
* // This snippet has been automatically generated and should be regarded as a code template only.
1301+
* // It will require modifications to work:
1302+
* // - It may require correct/in-range values for request initialization.
1303+
* // - It may require specifying regional endpoints when creating the service client as shown in
1304+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1305+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1306+
* String name = AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
1307+
* String languageCode = "languageCode-2092349083";
1308+
* GenerativeSettings response = agentsClient.getGenerativeSettings(name, languageCode);
1309+
* }
1310+
* }</pre>
1311+
*
1312+
* @param name Required. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
1313+
* ID&gt;/agents/&lt;Agent ID&gt;/generativeSettings`.
1314+
* @param languageCode Required. Language code of the generative settings.
1315+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1316+
*/
1317+
public final GenerativeSettings getGenerativeSettings(String name, String languageCode) {
1318+
GetGenerativeSettingsRequest request =
1319+
GetGenerativeSettingsRequest.newBuilder()
1320+
.setName(name)
1321+
.setLanguageCode(languageCode)
1322+
.build();
1323+
return getGenerativeSettings(request);
1324+
}
1325+
1326+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1327+
/**
1328+
* Gets the generative settings for the agent.
1329+
*
1330+
* <p>Sample code:
1331+
*
1332+
* <pre>{@code
1333+
* // This snippet has been automatically generated and should be regarded as a code template only.
1334+
* // It will require modifications to work:
1335+
* // - It may require correct/in-range values for request initialization.
1336+
* // - It may require specifying regional endpoints when creating the service client as shown in
1337+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1338+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1339+
* GetGenerativeSettingsRequest request =
1340+
* GetGenerativeSettingsRequest.newBuilder()
1341+
* .setName(
1342+
* AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
1343+
* .setLanguageCode("languageCode-2092349083")
1344+
* .build();
1345+
* GenerativeSettings response = agentsClient.getGenerativeSettings(request);
1346+
* }
1347+
* }</pre>
1348+
*
1349+
* @param request The request object containing all of the parameters for the API call.
1350+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1351+
*/
1352+
public final GenerativeSettings getGenerativeSettings(GetGenerativeSettingsRequest request) {
1353+
return getGenerativeSettingsCallable().call(request);
1354+
}
1355+
1356+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1357+
/**
1358+
* Gets the generative settings for the agent.
1359+
*
1360+
* <p>Sample code:
1361+
*
1362+
* <pre>{@code
1363+
* // This snippet has been automatically generated and should be regarded as a code template only.
1364+
* // It will require modifications to work:
1365+
* // - It may require correct/in-range values for request initialization.
1366+
* // - It may require specifying regional endpoints when creating the service client as shown in
1367+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1368+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1369+
* GetGenerativeSettingsRequest request =
1370+
* GetGenerativeSettingsRequest.newBuilder()
1371+
* .setName(
1372+
* AgentGenerativeSettingsName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
1373+
* .setLanguageCode("languageCode-2092349083")
1374+
* .build();
1375+
* ApiFuture<GenerativeSettings> future =
1376+
* agentsClient.getGenerativeSettingsCallable().futureCall(request);
1377+
* // Do something.
1378+
* GenerativeSettings response = future.get();
1379+
* }
1380+
* }</pre>
1381+
*/
1382+
public final UnaryCallable<GetGenerativeSettingsRequest, GenerativeSettings>
1383+
getGenerativeSettingsCallable() {
1384+
return stub.getGenerativeSettingsCallable();
1385+
}
1386+
1387+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1388+
/**
1389+
* Updates the generative settings for the agent.
1390+
*
1391+
* <p>Sample code:
1392+
*
1393+
* <pre>{@code
1394+
* // This snippet has been automatically generated and should be regarded as a code template only.
1395+
* // It will require modifications to work:
1396+
* // - It may require correct/in-range values for request initialization.
1397+
* // - It may require specifying regional endpoints when creating the service client as shown in
1398+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1399+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1400+
* GenerativeSettings generativeSettings = GenerativeSettings.newBuilder().build();
1401+
* FieldMask updateMask = FieldMask.newBuilder().build();
1402+
* GenerativeSettings response =
1403+
* agentsClient.updateGenerativeSettings(generativeSettings, updateMask);
1404+
* }
1405+
* }</pre>
1406+
*
1407+
* @param generativeSettings Required. Generative settings to update.
1408+
* @param updateMask Optional. The mask to control which fields get updated. If the mask is not
1409+
* present, all fields will be updated.
1410+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1411+
*/
1412+
public final GenerativeSettings updateGenerativeSettings(
1413+
GenerativeSettings generativeSettings, FieldMask updateMask) {
1414+
UpdateGenerativeSettingsRequest request =
1415+
UpdateGenerativeSettingsRequest.newBuilder()
1416+
.setGenerativeSettings(generativeSettings)
1417+
.setUpdateMask(updateMask)
1418+
.build();
1419+
return updateGenerativeSettings(request);
1420+
}
1421+
1422+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1423+
/**
1424+
* Updates the generative settings for the agent.
1425+
*
1426+
* <p>Sample code:
1427+
*
1428+
* <pre>{@code
1429+
* // This snippet has been automatically generated and should be regarded as a code template only.
1430+
* // It will require modifications to work:
1431+
* // - It may require correct/in-range values for request initialization.
1432+
* // - It may require specifying regional endpoints when creating the service client as shown in
1433+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1434+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1435+
* UpdateGenerativeSettingsRequest request =
1436+
* UpdateGenerativeSettingsRequest.newBuilder()
1437+
* .setGenerativeSettings(GenerativeSettings.newBuilder().build())
1438+
* .setUpdateMask(FieldMask.newBuilder().build())
1439+
* .build();
1440+
* GenerativeSettings response = agentsClient.updateGenerativeSettings(request);
1441+
* }
1442+
* }</pre>
1443+
*
1444+
* @param request The request object containing all of the parameters for the API call.
1445+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1446+
*/
1447+
public final GenerativeSettings updateGenerativeSettings(
1448+
UpdateGenerativeSettingsRequest request) {
1449+
return updateGenerativeSettingsCallable().call(request);
1450+
}
1451+
1452+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1453+
/**
1454+
* Updates the generative settings for the agent.
1455+
*
1456+
* <p>Sample code:
1457+
*
1458+
* <pre>{@code
1459+
* // This snippet has been automatically generated and should be regarded as a code template only.
1460+
* // It will require modifications to work:
1461+
* // - It may require correct/in-range values for request initialization.
1462+
* // - It may require specifying regional endpoints when creating the service client as shown in
1463+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1464+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1465+
* UpdateGenerativeSettingsRequest request =
1466+
* UpdateGenerativeSettingsRequest.newBuilder()
1467+
* .setGenerativeSettings(GenerativeSettings.newBuilder().build())
1468+
* .setUpdateMask(FieldMask.newBuilder().build())
1469+
* .build();
1470+
* ApiFuture<GenerativeSettings> future =
1471+
* agentsClient.updateGenerativeSettingsCallable().futureCall(request);
1472+
* // Do something.
1473+
* GenerativeSettings response = future.get();
1474+
* }
1475+
* }</pre>
1476+
*/
1477+
public final UnaryCallable<UpdateGenerativeSettingsRequest, GenerativeSettings>
1478+
updateGenerativeSettingsCallable() {
1479+
return stub.updateGenerativeSettingsCallable();
1480+
}
1481+
12581482
// AUTO-GENERATED DOCUMENTATION AND METHOD.
12591483
/**
12601484
* Lists information about the supported locations for this service.

java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,18 @@ public UnaryCallSettings<ValidateAgentRequest, AgentValidationResult> validateAg
141141
return ((AgentsStubSettings) getStubSettings()).getAgentValidationResultSettings();
142142
}
143143

144+
/** Returns the object with the settings used for calls to getGenerativeSettings. */
145+
public UnaryCallSettings<GetGenerativeSettingsRequest, GenerativeSettings>
146+
getGenerativeSettingsSettings() {
147+
return ((AgentsStubSettings) getStubSettings()).getGenerativeSettingsSettings();
148+
}
149+
150+
/** Returns the object with the settings used for calls to updateGenerativeSettings. */
151+
public UnaryCallSettings<UpdateGenerativeSettingsRequest, GenerativeSettings>
152+
updateGenerativeSettingsSettings() {
153+
return ((AgentsStubSettings) getStubSettings()).updateGenerativeSettingsSettings();
154+
}
155+
144156
/** Returns the object with the settings used for calls to listLocations. */
145157
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
146158
listLocationsSettings() {
@@ -326,6 +338,18 @@ public UnaryCallSettings.Builder<RestoreAgentRequest, Operation> restoreAgentSet
326338
return getStubSettingsBuilder().getAgentValidationResultSettings();
327339
}
328340

341+
/** Returns the builder for the settings used for calls to getGenerativeSettings. */
342+
public UnaryCallSettings.Builder<GetGenerativeSettingsRequest, GenerativeSettings>
343+
getGenerativeSettingsSettings() {
344+
return getStubSettingsBuilder().getGenerativeSettingsSettings();
345+
}
346+
347+
/** Returns the builder for the settings used for calls to updateGenerativeSettings. */
348+
public UnaryCallSettings.Builder<UpdateGenerativeSettingsRequest, GenerativeSettings>
349+
updateGenerativeSettingsSettings() {
350+
return getStubSettingsBuilder().updateGenerativeSettingsSettings();
351+
}
352+
329353
/** Returns the builder for the settings used for calls to listLocations. */
330354
public PagedCallSettings.Builder<
331355
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>

java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,7 @@ public final FlowValidationResult getFlowValidationResult(
12391239
* ImportFlowRequest request =
12401240
* ImportFlowRequest.newBuilder()
12411241
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
1242+
* .setFlowImportStrategy(FlowImportStrategy.newBuilder().build())
12421243
* .build();
12431244
* ImportFlowResponse response = flowsClient.importFlowAsync(request).get();
12441245
* }
@@ -1279,6 +1280,7 @@ public final OperationFuture<ImportFlowResponse, Struct> importFlowAsync(
12791280
* ImportFlowRequest request =
12801281
* ImportFlowRequest.newBuilder()
12811282
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
1283+
* .setFlowImportStrategy(FlowImportStrategy.newBuilder().build())
12821284
* .build();
12831285
* OperationFuture<ImportFlowResponse, Struct> future =
12841286
* flowsClient.importFlowOperationCallable().futureCall(request);
@@ -1319,6 +1321,7 @@ public final OperationFuture<ImportFlowResponse, Struct> importFlowAsync(
13191321
* ImportFlowRequest request =
13201322
* ImportFlowRequest.newBuilder()
13211323
* .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
1324+
* .setFlowImportStrategy(FlowImportStrategy.newBuilder().build())
13221325
* .build();
13231326
* ApiFuture<Operation> future = flowsClient.importFlowCallable().futureCall(request);
13241327
* // Do something.

0 commit comments

Comments
 (0)