From 59f9d8c7ad8fc498f13873fc2b348ea23984f87c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 15:33:33 -0400 Subject: [PATCH] feat: [dialogflow-cx] add support for AdvancedSettings (#9918) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add support for AdvancedSettings feat: add Intent import/export APIs feat: add Inline destination chore: remove the extraneous backend config PiperOrigin-RevId: 569217741 Source-Link: https://github.com/googleapis/googleapis/commit/f91419ca5a2be207eb79a91f00f700c7e088059f Source-Link: https://github.com/googleapis/googleapis-gen/commit/0f779fa21b349c00882615f5072b635833f8a6e5 Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiIwZjc3OWZhMjFiMzQ5YzAwODgyNjE1ZjUwNzJiNjM1ODMzZjhhNmU1In0= * 🦉 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 --- java-dialogflow-cx/README.md | 6 +- .../dialogflow/cx/v3beta1/IntentsClient.java | 250 ++ .../cx/v3beta1/IntentsSettings.java | 48 + .../dialogflow/cx/v3beta1/gapic_metadata.json | 6 + .../cx/v3beta1/stub/GrpcIntentsStub.java | 96 + .../cx/v3beta1/stub/HttpJsonIntentsStub.java | 212 +- .../cx/v3beta1/stub/IntentsStub.java | 35 + .../cx/v3beta1/stub/IntentsStubSettings.java | 151 ++ .../reflect-config.json | 198 ++ .../cx/v3beta1/FlowsClientHttpJsonTest.java | 7 + .../cx/v3beta1/FlowsClientTest.java | 5 + .../cx/v3beta1/IntentsClientHttpJsonTest.java | 113 + .../cx/v3beta1/IntentsClientTest.java | 115 + .../cx/v3beta1/MockIntentsImpl.java | 43 + .../cx/v3beta1/PagesClientHttpJsonTest.java | 7 + .../cx/v3beta1/PagesClientTest.java | 5 + .../dialogflow/cx/v3beta1/IntentsGrpc.java | 284 +++ .../cx/v3beta1/AdvancedSettings.java | 1255 +++++++++- .../cx/v3beta1/AdvancedSettingsOrBuilder.java | 54 + .../cx/v3beta1/AdvancedSettingsProto.java | 46 +- .../cx/v3beta1/ExportIntentsMetadata.java | 439 ++++ .../ExportIntentsMetadataOrBuilder.java | 24 + .../cx/v3beta1/ExportIntentsRequest.java | 1851 ++++++++++++++ .../ExportIntentsRequestOrBuilder.java | 239 ++ .../cx/v3beta1/ExportIntentsResponse.java | 1106 ++++++++ .../ExportIntentsResponseOrBuilder.java | 111 + .../cloud/dialogflow/cx/v3beta1/Flow.java | 301 ++- .../dialogflow/cx/v3beta1/FlowOrBuilder.java | 38 + .../dialogflow/cx/v3beta1/FlowProto.java | 306 +-- .../cloud/dialogflow/cx/v3beta1/Form.java | 325 +++ .../dialogflow/cx/v3beta1/Fulfillment.java | 394 +++ .../cx/v3beta1/FulfillmentOrBuilder.java | 55 + .../cx/v3beta1/FulfillmentProto.java | 70 +- .../cx/v3beta1/ImportIntentsMetadata.java | 439 ++++ .../ImportIntentsMetadataOrBuilder.java | 24 + .../cx/v3beta1/ImportIntentsRequest.java | 1765 +++++++++++++ .../ImportIntentsRequestOrBuilder.java | 181 ++ .../cx/v3beta1/ImportIntentsResponse.java | 2225 +++++++++++++++++ .../ImportIntentsResponseOrBuilder.java | 133 + .../cx/v3beta1/InlineDestination.java | 547 ++++ .../v3beta1/InlineDestinationOrBuilder.java | 39 + .../dialogflow/cx/v3beta1/InlineProto.java | 90 + .../dialogflow/cx/v3beta1/InlineSource.java | 540 ++++ .../cx/v3beta1/InlineSourceOrBuilder.java | 38 + .../dialogflow/cx/v3beta1/IntentProto.java | 293 ++- .../cloud/dialogflow/cx/v3beta1/Page.java | 301 ++- .../dialogflow/cx/v3beta1/PageOrBuilder.java | 38 + .../dialogflow/cx/v3beta1/PageProto.java | 236 +- .../dialogflow/cx/v3beta1/QueryResult.java | 337 ++- .../cx/v3beta1/QueryResultOrBuilder.java | 53 +- .../dialogflow/cx/v3beta1/SessionProto.java | 419 ++-- .../cx/v3beta1/advanced_settings.proto | 25 + .../cloud/dialogflow/cx/v3beta1/flow.proto | 5 + .../dialogflow/cx/v3beta1/fulfillment.proto | 12 + .../cloud/dialogflow/cx/v3beta1/inline.proto | 44 + .../cloud/dialogflow/cx/v3beta1/intent.proto | 221 ++ .../cloud/dialogflow/cx/v3beta1/page.proto | 9 + .../cloud/dialogflow/cx/v3beta1/session.proto | 8 + .../exportintents/AsyncExportIntents.java | 51 + .../exportintents/AsyncExportIntentsLRO.java | 53 + .../exportintents/SyncExportIntents.java | 48 + .../importintents/AsyncImportIntents.java | 49 + .../importintents/AsyncImportIntentsLRO.java | 51 + .../importintents/SyncImportIntents.java | 46 + 64 files changed, 15884 insertions(+), 631 deletions(-) create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsMetadata.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsMetadataOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsRequest.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsRequestOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsResponse.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsResponseOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsMetadata.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsMetadataOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsRequest.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsRequestOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsResponse.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsResponseOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineDestination.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineDestinationOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineProto.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineSource.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineSourceOrBuilder.java create mode 100644 java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/inline.proto create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/AsyncExportIntents.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/AsyncExportIntentsLRO.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/SyncExportIntents.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/AsyncImportIntents.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/AsyncImportIntentsLRO.java create mode 100644 java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/SyncImportIntents.java diff --git a/java-dialogflow-cx/README.md b/java-dialogflow-cx/README.md index dec95f81a48d..625cc11f616f 100644 --- a/java-dialogflow-cx/README.md +++ b/java-dialogflow-cx/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dialogflow-cx - 0.37.0 + 0.35.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dialogflow-cx:0.37.0' +implementation 'com.google.cloud:google-cloud-dialogflow-cx:0.35.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow-cx" % "0.37.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow-cx" % "0.35.0" ``` diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java index eb0b76e7e61f..8377502957b4 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java @@ -20,9 +20,12 @@ import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.stub.IntentsStub; @@ -32,6 +35,7 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import java.io.IOException; @@ -131,6 +135,8 @@ public class IntentsClient implements BackgroundResource { private final IntentsSettings settings; private final IntentsStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of IntentsClient with default settings. */ public static final IntentsClient create() throws IOException { @@ -160,11 +166,17 @@ public static final IntentsClient create(IntentsStub stub) { protected IntentsClient(IntentsSettings settings) throws IOException { this.settings = settings; this.stub = ((IntentsStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected IntentsClient(IntentsStub stub) { this.settings = null; this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final IntentsSettings getSettings() { @@ -175,6 +187,23 @@ public IntentsStub getStub() { return stub; } + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns the list of all intents in the specified agent. @@ -810,6 +839,227 @@ public final UnaryCallable deleteIntentCallable() { return stub.deleteIntentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified intents into the agent. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata] - `response`: + * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse] + * + *

Sample code: + * + *

{@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 (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ImportIntentsRequest request =
+   *       ImportIntentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ImportIntentsResponse response = intentsClient.importIntentsAsync(request).get();
+   * }
+   * }
+ * + * @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 OperationFuture importIntentsAsync( + ImportIntentsRequest request) { + return importIntentsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified intents into the agent. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata] - `response`: + * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse] + * + *

Sample code: + * + *

{@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 (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ImportIntentsRequest request =
+   *       ImportIntentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       intentsClient.importIntentsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportIntentsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + importIntentsOperationCallable() { + return stub.importIntentsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified intents into the agent. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata] - `response`: + * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse] + * + *

Sample code: + * + *

{@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 (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ImportIntentsRequest request =
+   *       ImportIntentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future = intentsClient.importIntentsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importIntentsCallable() { + return stub.importIntentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected intents. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata] - `response`: + * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse] + * + *

Sample code: + * + *

{@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 (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ExportIntentsRequest request =
+   *       ExportIntentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllIntents(new ArrayList())
+   *           .build();
+   *   ExportIntentsResponse response = intentsClient.exportIntentsAsync(request).get();
+   * }
+   * }
+ * + * @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 OperationFuture exportIntentsAsync( + ExportIntentsRequest request) { + return exportIntentsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected intents. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata] - `response`: + * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse] + * + *

Sample code: + * + *

{@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 (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ExportIntentsRequest request =
+   *       ExportIntentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllIntents(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       intentsClient.exportIntentsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportIntentsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportIntentsOperationCallable() { + return stub.exportIntentsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected intents. + * + *

This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The + * returned `Operation` type has the following method-specific fields: + * + *

- `metadata`: + * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata] - `response`: + * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse] + * + *

Sample code: + * + *

{@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 (IntentsClient intentsClient = IntentsClient.create()) {
+   *   ExportIntentsRequest request =
+   *       ExportIntentsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllIntents(new ArrayList())
+   *           .build();
+   *   ApiFuture future = intentsClient.exportIntentsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportIntentsCallable() { + return stub.exportIntentsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsSettings.java index b972d162c666..1317d602b371 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsSettings.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; @@ -36,6 +37,7 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -107,6 +109,28 @@ public UnaryCallSettings deleteIntentSettings() { return ((IntentsStubSettings) getStubSettings()).deleteIntentSettings(); } + /** Returns the object with the settings used for calls to importIntents. */ + public UnaryCallSettings importIntentsSettings() { + return ((IntentsStubSettings) getStubSettings()).importIntentsSettings(); + } + + /** Returns the object with the settings used for calls to importIntents. */ + public OperationCallSettings + importIntentsOperationSettings() { + return ((IntentsStubSettings) getStubSettings()).importIntentsOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportIntents. */ + public UnaryCallSettings exportIntentsSettings() { + return ((IntentsStubSettings) getStubSettings()).exportIntentsSettings(); + } + + /** Returns the object with the settings used for calls to exportIntents. */ + public OperationCallSettings + exportIntentsOperationSettings() { + return ((IntentsStubSettings) getStubSettings()).exportIntentsOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -259,6 +283,30 @@ public UnaryCallSettings.Builder deleteIntentSetting return getStubSettingsBuilder().deleteIntentSettings(); } + /** Returns the builder for the settings used for calls to importIntents. */ + public UnaryCallSettings.Builder importIntentsSettings() { + return getStubSettingsBuilder().importIntentsSettings(); + } + + /** Returns the builder for the settings used for calls to importIntents. */ + public OperationCallSettings.Builder< + ImportIntentsRequest, ImportIntentsResponse, ImportIntentsMetadata> + importIntentsOperationSettings() { + return getStubSettingsBuilder().importIntentsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportIntents. */ + public UnaryCallSettings.Builder exportIntentsSettings() { + return getStubSettingsBuilder().exportIntentsSettings(); + } + + /** Returns the builder for the settings used for calls to exportIntents. */ + public OperationCallSettings.Builder< + ExportIntentsRequest, ExportIntentsResponse, ExportIntentsMetadata> + exportIntentsOperationSettings() { + return getStubSettingsBuilder().exportIntentsOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json index 1fd61ab833b7..a91c6cee44a9 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json @@ -259,12 +259,18 @@ "DeleteIntent": { "methods": ["deleteIntent", "deleteIntent", "deleteIntent", "deleteIntentCallable"] }, + "ExportIntents": { + "methods": ["exportIntentsAsync", "exportIntentsOperationCallable", "exportIntentsCallable"] + }, "GetIntent": { "methods": ["getIntent", "getIntent", "getIntent", "getIntentCallable"] }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, + "ImportIntents": { + "methods": ["importIntentsAsync", "importIntentsOperationCallable", "importIntentsCallable"] + }, "ListIntents": { "methods": ["listIntents", "listIntents", "listIntents", "listIntentsPagedCallable", "listIntentsCallable"] }, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java index cc8ea17becd5..f1049fcc231d 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java @@ -25,11 +25,18 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.Intent; import com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse; @@ -38,6 +45,7 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; @@ -97,6 +105,26 @@ public class GrpcIntentsStub extends IntentsStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + importIntentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Intents/ImportIntents") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportIntentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportIntentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Intents/ExportIntents") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportIntentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -123,6 +151,14 @@ public class GrpcIntentsStub extends IntentsStub { private final UnaryCallable createIntentCallable; private final UnaryCallable updateIntentCallable; private final UnaryCallable deleteIntentCallable; + private final UnaryCallable importIntentsCallable; + private final OperationCallable< + ImportIntentsRequest, ImportIntentsResponse, ImportIntentsMetadata> + importIntentsOperationCallable; + private final UnaryCallable exportIntentsCallable; + private final OperationCallable< + ExportIntentsRequest, ExportIntentsResponse, ExportIntentsMetadata> + exportIntentsOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -217,6 +253,26 @@ protected GrpcIntentsStub( return builder.build(); }) .build(); + GrpcCallSettings importIntentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importIntentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings exportIntentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportIntentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -256,6 +312,24 @@ protected GrpcIntentsStub( this.deleteIntentCallable = callableFactory.createUnaryCallable( deleteIntentTransportSettings, settings.deleteIntentSettings(), clientContext); + this.importIntentsCallable = + callableFactory.createUnaryCallable( + importIntentsTransportSettings, settings.importIntentsSettings(), clientContext); + this.importIntentsOperationCallable = + callableFactory.createOperationCallable( + importIntentsTransportSettings, + settings.importIntentsOperationSettings(), + clientContext, + operationsStub); + this.exportIntentsCallable = + callableFactory.createUnaryCallable( + exportIntentsTransportSettings, settings.exportIntentsSettings(), clientContext); + this.exportIntentsOperationCallable = + callableFactory.createOperationCallable( + exportIntentsTransportSettings, + settings.exportIntentsOperationSettings(), + clientContext, + operationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -304,6 +378,28 @@ public UnaryCallable deleteIntentCallable() { return deleteIntentCallable; } + @Override + public UnaryCallable importIntentsCallable() { + return importIntentsCallable; + } + + @Override + public OperationCallable + importIntentsOperationCallable() { + return importIntentsOperationCallable; + } + + @Override + public UnaryCallable exportIntentsCallable() { + return exportIntentsCallable; + } + + @Override + public OperationCallable + exportIntentsOperationCallable() { + return exportIntentsOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonIntentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonIntentsStub.java index 0fa6a2079876..9b736dbbc4eb 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonIntentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonIntentsStub.java @@ -19,22 +19,32 @@ import static com.google.cloud.dialogflow.cx.v3beta1.IntentsClient.ListIntentsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.IntentsClient.ListLocationsPagedResponse; +import com.google.api.HttpRule; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.httpjson.ApiMethodDescriptor; import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; import com.google.api.gax.httpjson.ProtoMessageResponseParser; import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.Intent; import com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse; @@ -43,6 +53,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; import java.io.IOException; @@ -62,7 +74,13 @@ @BetaApi @Generated("by gapic-generator-java") public class HttpJsonIntentsStub extends IntentsStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ImportIntentsResponse.getDescriptor()) + .add(ExportIntentsResponse.getDescriptor()) + .add(ExportIntentsMetadata.getDescriptor()) + .add(ImportIntentsMetadata.getDescriptor()) + .build(); private static final ApiMethodDescriptor listIntentsMethodDescriptor = @@ -252,6 +270,86 @@ public class HttpJsonIntentsStub extends IntentsStub { .build()) .build(); + private static final ApiMethodDescriptor + importIntentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Intents/ImportIntents") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/intents:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportIntentsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + exportIntentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Intents/ExportIntents") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/intents:export", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportIntentsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -327,12 +425,21 @@ public class HttpJsonIntentsStub extends IntentsStub { private final UnaryCallable createIntentCallable; private final UnaryCallable updateIntentCallable; private final UnaryCallable deleteIntentCallable; + private final UnaryCallable importIntentsCallable; + private final OperationCallable< + ImportIntentsRequest, ImportIntentsResponse, ImportIntentsMetadata> + importIntentsOperationCallable; + private final UnaryCallable exportIntentsCallable; + private final OperationCallable< + ExportIntentsRequest, ExportIntentsResponse, ExportIntentsMetadata> + exportIntentsOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; private final HttpJsonStubCallableFactory callableFactory; public static final HttpJsonIntentsStub create(IntentsStubSettings settings) throws IOException { @@ -370,6 +477,41 @@ protected HttpJsonIntentsStub( HttpJsonStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v3beta1/{name=projects/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v3beta1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/locations/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/locations/*}/operations") + .build()) + .build()) + .build()); HttpJsonCallSettings listIntentsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -426,6 +568,28 @@ protected HttpJsonIntentsStub( return builder.build(); }) .build(); + HttpJsonCallSettings importIntentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importIntentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings exportIntentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportIntentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -468,6 +632,24 @@ protected HttpJsonIntentsStub( this.deleteIntentCallable = callableFactory.createUnaryCallable( deleteIntentTransportSettings, settings.deleteIntentSettings(), clientContext); + this.importIntentsCallable = + callableFactory.createUnaryCallable( + importIntentsTransportSettings, settings.importIntentsSettings(), clientContext); + this.importIntentsOperationCallable = + callableFactory.createOperationCallable( + importIntentsTransportSettings, + settings.importIntentsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.exportIntentsCallable = + callableFactory.createUnaryCallable( + exportIntentsTransportSettings, settings.exportIntentsSettings(), clientContext); + this.exportIntentsOperationCallable = + callableFactory.createOperationCallable( + exportIntentsTransportSettings, + settings.exportIntentsOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -490,11 +672,17 @@ public static List getMethodDescriptors() { methodDescriptors.add(createIntentMethodDescriptor); methodDescriptors.add(updateIntentMethodDescriptor); methodDescriptors.add(deleteIntentMethodDescriptor); + methodDescriptors.add(importIntentsMethodDescriptor); + methodDescriptors.add(exportIntentsMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + @Override public UnaryCallable listIntentsCallable() { return listIntentsCallable; @@ -525,6 +713,28 @@ public UnaryCallable deleteIntentCallable() { return deleteIntentCallable; } + @Override + public UnaryCallable importIntentsCallable() { + return importIntentsCallable; + } + + @Override + public OperationCallable + importIntentsOperationCallable() { + return importIntentsOperationCallable; + } + + @Override + public UnaryCallable exportIntentsCallable() { + return exportIntentsCallable; + } + + @Override + public OperationCallable + exportIntentsOperationCallable() { + return exportIntentsOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStub.java index de47697ba1aa..f4fe4e82e501 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStub.java @@ -21,10 +21,17 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.Intent; import com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse; @@ -33,6 +40,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; import javax.annotation.Generated; @@ -46,6 +55,14 @@ @Generated("by gapic-generator-java") public abstract class IntentsStub implements BackgroundResource { + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + public UnaryCallable listIntentsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listIntentsPagedCallable()"); } @@ -70,6 +87,24 @@ public UnaryCallable deleteIntentCallable() { throw new UnsupportedOperationException("Not implemented: deleteIntentCallable()"); } + public OperationCallable + importIntentsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importIntentsOperationCallable()"); + } + + public UnaryCallable importIntentsCallable() { + throw new UnsupportedOperationException("Not implemented: importIntentsCallable()"); + } + + public OperationCallable + exportIntentsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportIntentsOperationCallable()"); + } + + public UnaryCallable exportIntentsCallable() { + throw new UnsupportedOperationException("Not implemented: exportIntentsCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java index 2e09dce7e1d9..2aa19fa47ff9 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java @@ -28,13 +28,17 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; import com.google.api.gax.httpjson.GaxHttpJsonProperties; import com.google.api.gax.httpjson.HttpJsonTransportChannel; import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; @@ -46,7 +50,13 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.Intent; import com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse; @@ -59,6 +69,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -117,6 +128,14 @@ public class IntentsStubSettings extends StubSettings { private final UnaryCallSettings createIntentSettings; private final UnaryCallSettings updateIntentSettings; private final UnaryCallSettings deleteIntentSettings; + private final UnaryCallSettings importIntentsSettings; + private final OperationCallSettings< + ImportIntentsRequest, ImportIntentsResponse, ImportIntentsMetadata> + importIntentsOperationSettings; + private final UnaryCallSettings exportIntentsSettings; + private final OperationCallSettings< + ExportIntentsRequest, ExportIntentsResponse, ExportIntentsMetadata> + exportIntentsOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -254,6 +273,28 @@ public UnaryCallSettings deleteIntentSettings() { return deleteIntentSettings; } + /** Returns the object with the settings used for calls to importIntents. */ + public UnaryCallSettings importIntentsSettings() { + return importIntentsSettings; + } + + /** Returns the object with the settings used for calls to importIntents. */ + public OperationCallSettings + importIntentsOperationSettings() { + return importIntentsOperationSettings; + } + + /** Returns the object with the settings used for calls to exportIntents. */ + public UnaryCallSettings exportIntentsSettings() { + return exportIntentsSettings; + } + + /** Returns the object with the settings used for calls to exportIntents. */ + public OperationCallSettings + exportIntentsOperationSettings() { + return exportIntentsOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -374,6 +415,10 @@ protected IntentsStubSettings(Builder settingsBuilder) throws IOException { createIntentSettings = settingsBuilder.createIntentSettings().build(); updateIntentSettings = settingsBuilder.updateIntentSettings().build(); deleteIntentSettings = settingsBuilder.deleteIntentSettings().build(); + importIntentsSettings = settingsBuilder.importIntentsSettings().build(); + importIntentsOperationSettings = settingsBuilder.importIntentsOperationSettings().build(); + exportIntentsSettings = settingsBuilder.exportIntentsSettings().build(); + exportIntentsOperationSettings = settingsBuilder.exportIntentsOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -388,6 +433,14 @@ public static class Builder extends StubSettings.Builder createIntentSettings; private final UnaryCallSettings.Builder updateIntentSettings; private final UnaryCallSettings.Builder deleteIntentSettings; + private final UnaryCallSettings.Builder importIntentsSettings; + private final OperationCallSettings.Builder< + ImportIntentsRequest, ImportIntentsResponse, ImportIntentsMetadata> + importIntentsOperationSettings; + private final UnaryCallSettings.Builder exportIntentsSettings; + private final OperationCallSettings.Builder< + ExportIntentsRequest, ExportIntentsResponse, ExportIntentsMetadata> + exportIntentsOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -435,6 +488,10 @@ protected Builder(ClientContext clientContext) { createIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importIntentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importIntentsOperationSettings = OperationCallSettings.newBuilder(); + exportIntentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportIntentsOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -445,6 +502,8 @@ protected Builder(ClientContext clientContext) { createIntentSettings, updateIntentSettings, deleteIntentSettings, + importIntentsSettings, + exportIntentsSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -458,6 +517,10 @@ protected Builder(IntentsStubSettings settings) { createIntentSettings = settings.createIntentSettings.toBuilder(); updateIntentSettings = settings.updateIntentSettings.toBuilder(); deleteIntentSettings = settings.deleteIntentSettings.toBuilder(); + importIntentsSettings = settings.importIntentsSettings.toBuilder(); + importIntentsOperationSettings = settings.importIntentsOperationSettings.toBuilder(); + exportIntentsSettings = settings.exportIntentsSettings.toBuilder(); + exportIntentsOperationSettings = settings.exportIntentsOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -468,6 +531,8 @@ protected Builder(IntentsStubSettings settings) { createIntentSettings, updateIntentSettings, deleteIntentSettings, + importIntentsSettings, + exportIntentsSettings, listLocationsSettings, getLocationSettings); } @@ -524,6 +589,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .importIntentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportIntentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -534,6 +609,54 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .importIntentsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportIntentsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ImportIntentsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .exportIntentsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ExportIntentsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ExportIntentsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -579,6 +702,34 @@ public UnaryCallSettings.Builder deleteIntentSetting return deleteIntentSettings; } + /** Returns the builder for the settings used for calls to importIntents. */ + public UnaryCallSettings.Builder importIntentsSettings() { + return importIntentsSettings; + } + + /** Returns the builder for the settings used for calls to importIntents. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportIntentsRequest, ImportIntentsResponse, ImportIntentsMetadata> + importIntentsOperationSettings() { + return importIntentsOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportIntents. */ + public UnaryCallSettings.Builder exportIntentsSettings() { + return exportIntentsSettings; + } + + /** Returns the builder for the settings used for calls to exportIntents. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportIntentsRequest, ExportIntentsResponse, ExportIntentsMetadata> + exportIntentsOperationSettings() { + return exportIntentsOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json index 07772ec3cb11..51620c9f334c 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json @@ -395,6 +395,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings$DtmfSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings$DtmfSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings$LoggingSettings", "queryAllDeclaredConstructors": true, @@ -1871,6 +1889,69 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest$DataFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata", "queryAllDeclaredConstructors": true, @@ -2645,6 +2726,87 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest$MergeOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$ConflictingResources", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$ConflictingResources$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy", "queryAllDeclaredConstructors": true, @@ -2708,6 +2870,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineDestination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientHttpJsonTest.java index 5a14e590453a..68f24c962be7 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientHttpJsonTest.java @@ -98,6 +98,7 @@ public void createFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -151,6 +152,7 @@ public void createFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -385,6 +387,7 @@ public void getFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -436,6 +439,7 @@ public void getFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -488,6 +492,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -501,6 +506,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -540,6 +546,7 @@ public void updateFlowExceptionTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java index a10934f64433..1a6349a325cd 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java @@ -105,6 +105,7 @@ public void createFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -153,6 +154,7 @@ public void createFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -357,6 +359,7 @@ public void getFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -402,6 +405,7 @@ public void getFlowTest2() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); @@ -447,6 +451,7 @@ public void updateFlowTest() throws Exception { .addAllEventHandlers(new ArrayList()) .addAllTransitionRouteGroups(new ArrayList()) .setNluSettings(NluSettings.newBuilder().build()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockFlows.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientHttpJsonTest.java index 00906e0e8e67..2b0b50795597 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientHttpJsonTest.java @@ -34,6 +34,7 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; @@ -42,6 +43,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -549,6 +551,117 @@ public void deleteIntentExceptionTest2() throws Exception { } } + @Test + public void importIntentsTest() throws Exception { + ImportIntentsResponse expectedResponse = + ImportIntentsResponse.newBuilder() + .addAllIntents(new ArrayList()) + .setConflictingResources( + ImportIntentsResponse.ConflictingResources.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importIntentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportIntentsRequest request = + ImportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + + ImportIntentsResponse actualResponse = client.importIntentsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importIntentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportIntentsRequest request = + ImportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + client.importIntentsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void exportIntentsTest() throws Exception { + ExportIntentsResponse expectedResponse = ExportIntentsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportIntentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportIntentsRequest request = + ExportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllIntents(new ArrayList()) + .build(); + + ExportIntentsResponse actualResponse = client.exportIntentsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportIntentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportIntentsRequest request = + ExportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllIntents(new ArrayList()) + .build(); + client.exportIntentsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java index 4f909cddbcf4..3c8999d32614 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java @@ -26,11 +26,13 @@ import com.google.api.gax.grpc.testing.MockServiceHelper; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; import com.google.protobuf.Empty; @@ -42,6 +44,7 @@ import java.util.HashMap; import java.util.List; import java.util.UUID; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -481,6 +484,118 @@ public void deleteIntentExceptionTest2() throws Exception { } } + @Test + public void importIntentsTest() throws Exception { + ImportIntentsResponse expectedResponse = + ImportIntentsResponse.newBuilder() + .addAllIntents(new ArrayList()) + .setConflictingResources( + ImportIntentsResponse.ConflictingResources.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importIntentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockIntents.addResponse(resultOperation); + + ImportIntentsRequest request = + ImportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + + ImportIntentsResponse actualResponse = client.importIntentsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIntents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportIntentsRequest actualRequest = ((ImportIntentsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getIntentsUri(), actualRequest.getIntentsUri()); + Assert.assertEquals(request.getIntentsContent(), actualRequest.getIntentsContent()); + Assert.assertEquals(request.getMergeOption(), actualRequest.getMergeOption()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importIntentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIntents.addException(exception); + + try { + ImportIntentsRequest request = + ImportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + client.importIntentsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportIntentsTest() throws Exception { + ExportIntentsResponse expectedResponse = ExportIntentsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportIntentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockIntents.addResponse(resultOperation); + + ExportIntentsRequest request = + ExportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllIntents(new ArrayList()) + .build(); + + ExportIntentsResponse actualResponse = client.exportIntentsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIntents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportIntentsRequest actualRequest = ((ExportIntentsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getIntentsList(), actualRequest.getIntentsList()); + Assert.assertEquals(request.getIntentsUri(), actualRequest.getIntentsUri()); + Assert.assertEquals(request.getIntentsContentInline(), actualRequest.getIntentsContentInline()); + Assert.assertEquals(request.getDataFormat(), actualRequest.getDataFormat()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportIntentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIntents.addException(exception); + + try { + ExportIntentsRequest request = + ExportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllIntents(new ArrayList()) + .build(); + client.exportIntentsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntentsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntentsImpl.java index 00d0260cf5cb..afc9559c5921 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntentsImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockIntentsImpl.java @@ -18,6 +18,7 @@ import com.google.api.core.BetaApi; import com.google.cloud.dialogflow.cx.v3beta1.IntentsGrpc.IntentsImplBase; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; @@ -159,4 +160,46 @@ public void deleteIntent(DeleteIntentRequest request, StreamObserver resp Exception.class.getName()))); } } + + @Override + public void importIntents( + ImportIntentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportIntents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void exportIntents( + ExportIntentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportIntents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java index d2cb4e5aeb5a..e3e6c7f5fc20 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java @@ -198,6 +198,7 @@ public void getPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -250,6 +251,7 @@ public void getPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -304,6 +306,7 @@ public void createPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -358,6 +361,7 @@ public void createPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -414,6 +418,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -428,6 +433,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -468,6 +474,7 @@ public void updatePageExceptionTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java index b8ab3154d04f..a8c771281ae0 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java @@ -190,6 +190,7 @@ public void getPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -236,6 +237,7 @@ public void getPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -282,6 +284,7 @@ public void createPageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -331,6 +334,7 @@ public void createPageTest2() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); @@ -380,6 +384,7 @@ public void updatePageTest() throws Exception { .addAllTransitionRouteGroups(new ArrayList()) .addAllTransitionRoutes(new ArrayList()) .addAllEventHandlers(new ArrayList()) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) .build(); mockPages.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsGrpc.java index deaa7c8b120e..2b460c9636fb 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsGrpc.java @@ -258,6 +258,96 @@ private IntentsGrpc() {} return getDeleteIntentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest, + com.google.longrunning.Operation> + getImportIntentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportIntents", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest, + com.google.longrunning.Operation> + getImportIntentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest, + com.google.longrunning.Operation> + getImportIntentsMethod; + if ((getImportIntentsMethod = IntentsGrpc.getImportIntentsMethod) == null) { + synchronized (IntentsGrpc.class) { + if ((getImportIntentsMethod = IntentsGrpc.getImportIntentsMethod) == null) { + IntentsGrpc.getImportIntentsMethod = + getImportIntentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportIntents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("ImportIntents")) + .build(); + } + } + } + return getImportIntentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest, + com.google.longrunning.Operation> + getExportIntentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportIntents", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest, + com.google.longrunning.Operation> + getExportIntentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest, + com.google.longrunning.Operation> + getExportIntentsMethod; + if ((getExportIntentsMethod = IntentsGrpc.getExportIntentsMethod) == null) { + synchronized (IntentsGrpc.class) { + if ((getExportIntentsMethod = IntentsGrpc.getExportIntentsMethod) == null) { + IntentsGrpc.getExportIntentsMethod = + getExportIntentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportIntents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("ExportIntents")) + .build(); + } + } + } + return getExportIntentsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static IntentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -388,6 +478,48 @@ default void deleteIntent( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteIntentMethod(), responseObserver); } + + /** + * + * + *
+     * Imports the specified intents into the agent.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`:
+     * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
+     * - `response`:
+     * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
+     * 
+ */ + default void importIntents( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportIntentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports the selected intents.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`:
+     * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
+     * - `response`:
+     * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
+     * 
+ */ + default void exportIntents( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportIntentsMethod(), responseObserver); + } } /** @@ -512,6 +644,52 @@ public void deleteIntent( request, responseObserver); } + + /** + * + * + *
+     * Imports the specified intents into the agent.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`:
+     * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
+     * - `response`:
+     * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
+     * 
+ */ + public void importIntents( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportIntentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports the selected intents.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`:
+     * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
+     * - `response`:
+     * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
+     * 
+ */ + public void exportIntents( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportIntentsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -605,6 +783,46 @@ public com.google.protobuf.Empty deleteIntent( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteIntentMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Imports the specified intents into the agent.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`:
+     * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
+     * - `response`:
+     * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
+     * 
+ */ + public com.google.longrunning.Operation importIntents( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportIntentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports the selected intents.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`:
+     * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
+     * - `response`:
+     * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
+     * 
+ */ + public com.google.longrunning.Operation exportIntents( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportIntentsMethod(), getCallOptions(), request); + } } /** @@ -702,6 +920,46 @@ protected IntentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteIntentMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Imports the specified intents into the agent.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`:
+     * [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
+     * - `response`:
+     * [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importIntents(com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportIntentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports the selected intents.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`:
+     * [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
+     * - `response`:
+     * [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportIntents(com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportIntentsMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_INTENTS = 0; @@ -709,6 +967,8 @@ protected IntentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c private static final int METHODID_CREATE_INTENT = 2; private static final int METHODID_UPDATE_INTENT = 3; private static final int METHODID_DELETE_INTENT = 4; + private static final int METHODID_IMPORT_INTENTS = 5; + private static final int METHODID_EXPORT_INTENTS = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -757,6 +1017,16 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_IMPORT_INTENTS: + serviceImpl.importIntents( + (com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_INTENTS: + serviceImpl.exportIntents( + (com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -808,6 +1078,18 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest, com.google.protobuf.Empty>(service, METHODID_DELETE_INTENT))) + .addMethod( + getImportIntentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_INTENTS))) + .addMethod( + getExportIntentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest, + com.google.longrunning.Operation>(service, METHODID_EXPORT_INTENTS))) .build(); } @@ -862,6 +1144,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateIntentMethod()) .addMethod(getUpdateIntentMethod()) .addMethod(getDeleteIntentMethod()) + .addMethod(getImportIntentsMethod()) + .addMethod(getExportIntentsMethod()) .build(); } } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettings.java index 23c4c67f2e19..8f4aa10d4bfa 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettings.java @@ -70,6 +70,897 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder.class); } + public interface DtmfSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If true, incoming audio is processed for DTMF (dual tone multi frequency)
+     * events. For example, if the caller presses a button on their telephone
+     * keypad and DTMF processing is enabled, Dialogflow will detect the
+     * event (e.g. a "3" was pressed) in the incoming audio and pass the event
+     * to the bot to drive business logic (e.g. when 3 is pressed, return the
+     * account balance).
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + boolean getEnabled(); + + /** + * + * + *
+     * Max length of DTMF digits.
+     * 
+ * + * int32 max_digits = 2; + * + * @return The maxDigits. + */ + int getMaxDigits(); + + /** + * + * + *
+     * The digit that terminates a DTMF digit sequence.
+     * 
+ * + * string finish_digit = 3; + * + * @return The finishDigit. + */ + java.lang.String getFinishDigit(); + /** + * + * + *
+     * The digit that terminates a DTMF digit sequence.
+     * 
+ * + * string finish_digit = 3; + * + * @return The bytes for finishDigit. + */ + com.google.protobuf.ByteString getFinishDigitBytes(); + } + /** + * + * + *
+   * Define behaviors for DTMF (dual tone multi frequency).
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} + */ + public static final class DtmfSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) + DtmfSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DtmfSettings.newBuilder() to construct. + private DtmfSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DtmfSettings() { + finishDigit_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DtmfSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * + * + *
+     * If true, incoming audio is processed for DTMF (dual tone multi frequency)
+     * events. For example, if the caller presses a button on their telephone
+     * keypad and DTMF processing is enabled, Dialogflow will detect the
+     * event (e.g. a "3" was pressed) in the incoming audio and pass the event
+     * to the bot to drive business logic (e.g. when 3 is pressed, return the
+     * account balance).
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int MAX_DIGITS_FIELD_NUMBER = 2; + private int maxDigits_ = 0; + /** + * + * + *
+     * Max length of DTMF digits.
+     * 
+ * + * int32 max_digits = 2; + * + * @return The maxDigits. + */ + @java.lang.Override + public int getMaxDigits() { + return maxDigits_; + } + + public static final int FINISH_DIGIT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object finishDigit_ = ""; + /** + * + * + *
+     * The digit that terminates a DTMF digit sequence.
+     * 
+ * + * string finish_digit = 3; + * + * @return The finishDigit. + */ + @java.lang.Override + public java.lang.String getFinishDigit() { + java.lang.Object ref = finishDigit_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + finishDigit_ = s; + return s; + } + } + /** + * + * + *
+     * The digit that terminates a DTMF digit sequence.
+     * 
+ * + * string finish_digit = 3; + * + * @return The bytes for finishDigit. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFinishDigitBytes() { + java.lang.Object ref = finishDigit_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + finishDigit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + if (maxDigits_ != 0) { + output.writeInt32(2, maxDigits_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finishDigit_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, finishDigit_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + if (maxDigits_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxDigits_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finishDigit_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, finishDigit_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings other = + (com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (getMaxDigits() != other.getMaxDigits()) return false; + if (!getFinishDigit().equals(other.getFinishDigit())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + hash = (37 * hash) + MAX_DIGITS_FIELD_NUMBER; + hash = (53 * hash) + getMaxDigits(); + hash = (37 * hash) + FINISH_DIGIT_FIELD_NUMBER; + hash = (53 * hash) + getFinishDigit().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Define behaviors for DTMF (dual tone multi frequency).
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + maxDigits_ = 0; + finishDigit_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings build() { + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings result = + new com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxDigits_ = maxDigits_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.finishDigit_ = finishDigit_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + .getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (other.getMaxDigits() != 0) { + setMaxDigits(other.getMaxDigits()); + } + if (!other.getFinishDigit().isEmpty()) { + finishDigit_ = other.finishDigit_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + maxDigits_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + finishDigit_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enabled_; + /** + * + * + *
+       * If true, incoming audio is processed for DTMF (dual tone multi frequency)
+       * events. For example, if the caller presses a button on their telephone
+       * keypad and DTMF processing is enabled, Dialogflow will detect the
+       * event (e.g. a "3" was pressed) in the incoming audio and pass the event
+       * to the bot to drive business logic (e.g. when 3 is pressed, return the
+       * account balance).
+       * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+       * If true, incoming audio is processed for DTMF (dual tone multi frequency)
+       * events. For example, if the caller presses a button on their telephone
+       * keypad and DTMF processing is enabled, Dialogflow will detect the
+       * event (e.g. a "3" was pressed) in the incoming audio and pass the event
+       * to the bot to drive business logic (e.g. when 3 is pressed, return the
+       * account balance).
+       * 
+ * + * bool enabled = 1; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, incoming audio is processed for DTMF (dual tone multi frequency)
+       * events. For example, if the caller presses a button on their telephone
+       * keypad and DTMF processing is enabled, Dialogflow will detect the
+       * event (e.g. a "3" was pressed) in the incoming audio and pass the event
+       * to the bot to drive business logic (e.g. when 3 is pressed, return the
+       * account balance).
+       * 
+ * + * bool enabled = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + private int maxDigits_; + /** + * + * + *
+       * Max length of DTMF digits.
+       * 
+ * + * int32 max_digits = 2; + * + * @return The maxDigits. + */ + @java.lang.Override + public int getMaxDigits() { + return maxDigits_; + } + /** + * + * + *
+       * Max length of DTMF digits.
+       * 
+ * + * int32 max_digits = 2; + * + * @param value The maxDigits to set. + * @return This builder for chaining. + */ + public Builder setMaxDigits(int value) { + + maxDigits_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Max length of DTMF digits.
+       * 
+ * + * int32 max_digits = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxDigits() { + bitField0_ = (bitField0_ & ~0x00000002); + maxDigits_ = 0; + onChanged(); + return this; + } + + private java.lang.Object finishDigit_ = ""; + /** + * + * + *
+       * The digit that terminates a DTMF digit sequence.
+       * 
+ * + * string finish_digit = 3; + * + * @return The finishDigit. + */ + public java.lang.String getFinishDigit() { + java.lang.Object ref = finishDigit_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + finishDigit_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The digit that terminates a DTMF digit sequence.
+       * 
+ * + * string finish_digit = 3; + * + * @return The bytes for finishDigit. + */ + public com.google.protobuf.ByteString getFinishDigitBytes() { + java.lang.Object ref = finishDigit_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + finishDigit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The digit that terminates a DTMF digit sequence.
+       * 
+ * + * string finish_digit = 3; + * + * @param value The finishDigit to set. + * @return This builder for chaining. + */ + public Builder setFinishDigit(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + finishDigit_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The digit that terminates a DTMF digit sequence.
+       * 
+ * + * string finish_digit = 3; + * + * @return This builder for chaining. + */ + public Builder clearFinishDigit() { + finishDigit_ = getDefaultInstance().getFinishDigit(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The digit that terminates a DTMF digit sequence.
+       * 
+ * + * string finish_digit = 3; + * + * @param value The bytes for finishDigit to set. + * @return This builder for chaining. + */ + public Builder setFinishDigitBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + finishDigit_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DtmfSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public interface LoggingSettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings) @@ -800,6 +1691,75 @@ public com.google.cloud.dialogflow.cx.v3beta1.GcsDestination getAudioExportGcsDe : audioExportGcsDestination_; } + public static final int DTMF_SETTINGS_FIELD_NUMBER = 5; + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmfSettings_; + /** + * + * + *
+   * Settings for DTMF.
+   * Exposed at the following levels:
+   * - Agent level
+   * - Flow level
+   * - Page level
+   * - Parameter level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + * + * @return Whether the dtmfSettings field is set. + */ + @java.lang.Override + public boolean hasDtmfSettings() { + return dtmfSettings_ != null; + } + /** + * + * + *
+   * Settings for DTMF.
+   * Exposed at the following levels:
+   * - Agent level
+   * - Flow level
+   * - Page level
+   * - Parameter level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + * + * @return The dtmfSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings getDtmfSettings() { + return dtmfSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.getDefaultInstance() + : dtmfSettings_; + } + /** + * + * + *
+   * Settings for DTMF.
+   * Exposed at the following levels:
+   * - Agent level
+   * - Flow level
+   * - Page level
+   * - Parameter level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettingsOrBuilder + getDtmfSettingsOrBuilder() { + return dtmfSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.getDefaultInstance() + : dtmfSettings_; + } + public static final int LOGGING_SETTINGS_FIELD_NUMBER = 6; private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings loggingSettings_; /** @@ -889,6 +1849,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (audioExportGcsDestination_ != null) { output.writeMessage(2, getAudioExportGcsDestination()); } + if (dtmfSettings_ != null) { + output.writeMessage(5, getDtmfSettings()); + } if (loggingSettings_ != null) { output.writeMessage(6, getLoggingSettings()); } @@ -906,6 +1869,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, getAudioExportGcsDestination()); } + if (dtmfSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDtmfSettings()); + } if (loggingSettings_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLoggingSettings()); } @@ -930,6 +1896,10 @@ public boolean equals(final java.lang.Object obj) { if (!getAudioExportGcsDestination().equals(other.getAudioExportGcsDestination())) return false; } + if (hasDtmfSettings() != other.hasDtmfSettings()) return false; + if (hasDtmfSettings()) { + if (!getDtmfSettings().equals(other.getDtmfSettings())) return false; + } if (hasLoggingSettings() != other.hasLoggingSettings()) return false; if (hasLoggingSettings()) { if (!getLoggingSettings().equals(other.getLoggingSettings())) return false; @@ -949,6 +1919,10 @@ public int hashCode() { hash = (37 * hash) + AUDIO_EXPORT_GCS_DESTINATION_FIELD_NUMBER; hash = (53 * hash) + getAudioExportGcsDestination().hashCode(); } + if (hasDtmfSettings()) { + hash = (37 * hash) + DTMF_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getDtmfSettings().hashCode(); + } if (hasLoggingSettings()) { hash = (37 * hash) + LOGGING_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getLoggingSettings().hashCode(); @@ -1108,6 +2082,11 @@ public Builder clear() { audioExportGcsDestinationBuilder_.dispose(); audioExportGcsDestinationBuilder_ = null; } + dtmfSettings_ = null; + if (dtmfSettingsBuilder_ != null) { + dtmfSettingsBuilder_.dispose(); + dtmfSettingsBuilder_ = null; + } loggingSettings_ = null; if (loggingSettingsBuilder_ != null) { loggingSettingsBuilder_.dispose(); @@ -1156,6 +2135,10 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettin : audioExportGcsDestinationBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { + result.dtmfSettings_ = + dtmfSettingsBuilder_ == null ? dtmfSettings_ : dtmfSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { result.loggingSettings_ = loggingSettingsBuilder_ == null ? loggingSettings_ : loggingSettingsBuilder_.build(); } @@ -1210,6 +2193,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings if (other.hasAudioExportGcsDestination()) { mergeAudioExportGcsDestination(other.getAudioExportGcsDestination()); } + if (other.hasDtmfSettings()) { + mergeDtmfSettings(other.getDtmfSettings()); + } if (other.hasLoggingSettings()) { mergeLoggingSettings(other.getLoggingSettings()); } @@ -1246,10 +2232,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 18 + case 42: + { + input.readMessage(getDtmfSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 42 case 50: { input.readMessage(getLoggingSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 50 default: @@ -1505,6 +2497,253 @@ public Builder clearAudioExportGcsDestination() { return audioExportGcsDestinationBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmfSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettingsOrBuilder> + dtmfSettingsBuilder_; + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + * + * @return Whether the dtmfSettings field is set. + */ + public boolean hasDtmfSettings() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + * + * @return The dtmfSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings getDtmfSettings() { + if (dtmfSettingsBuilder_ == null) { + return dtmfSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + .getDefaultInstance() + : dtmfSettings_; + } else { + return dtmfSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + public Builder setDtmfSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings value) { + if (dtmfSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dtmfSettings_ = value; + } else { + dtmfSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + public Builder setDtmfSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.Builder + builderForValue) { + if (dtmfSettingsBuilder_ == null) { + dtmfSettings_ = builderForValue.build(); + } else { + dtmfSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + public Builder mergeDtmfSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings value) { + if (dtmfSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dtmfSettings_ != null + && dtmfSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + .getDefaultInstance()) { + getDtmfSettingsBuilder().mergeFrom(value); + } else { + dtmfSettings_ = value; + } + } else { + dtmfSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + public Builder clearDtmfSettings() { + bitField0_ = (bitField0_ & ~0x00000002); + dtmfSettings_ = null; + if (dtmfSettingsBuilder_ != null) { + dtmfSettingsBuilder_.dispose(); + dtmfSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.Builder + getDtmfSettingsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDtmfSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettingsOrBuilder + getDtmfSettingsOrBuilder() { + if (dtmfSettingsBuilder_ != null) { + return dtmfSettingsBuilder_.getMessageOrBuilder(); + } else { + return dtmfSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + .getDefaultInstance() + : dtmfSettings_; + } + } + /** + * + * + *
+     * Settings for DTMF.
+     * Exposed at the following levels:
+     * - Agent level
+     * - Flow level
+     * - Page level
+     * - Parameter level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettingsOrBuilder> + getDtmfSettingsFieldBuilder() { + if (dtmfSettingsBuilder_ == null) { + dtmfSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettingsOrBuilder>( + getDtmfSettings(), getParentForChildren(), isClean()); + dtmfSettings_ = null; + } + return dtmfSettingsBuilder_; + } + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings loggingSettings_; private com.google.protobuf.SingleFieldBuilderV3< @@ -1530,7 +2769,7 @@ public Builder clearAudioExportGcsDestination() { * @return Whether the loggingSettings field is set. */ public boolean hasLoggingSettings() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -1585,7 +2824,7 @@ public Builder setLoggingSettings( } else { loggingSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1612,7 +2851,7 @@ public Builder setLoggingSettings( } else { loggingSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1634,7 +2873,7 @@ public Builder setLoggingSettings( public Builder mergeLoggingSettings( com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings value) { if (loggingSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) + if (((bitField0_ & 0x00000004) != 0) && loggingSettings_ != null && loggingSettings_ != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings @@ -1646,7 +2885,7 @@ public Builder mergeLoggingSettings( } else { loggingSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1666,7 +2905,7 @@ public Builder mergeLoggingSettings( * */ public Builder clearLoggingSettings() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); loggingSettings_ = null; if (loggingSettingsBuilder_ != null) { loggingSettingsBuilder_.dispose(); @@ -1692,7 +2931,7 @@ public Builder clearLoggingSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.Builder getLoggingSettingsBuilder() { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return getLoggingSettingsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsOrBuilder.java index 070281c6a33b..07523d19f357 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsOrBuilder.java @@ -74,6 +74,60 @@ public interface AdvancedSettingsOrBuilder com.google.cloud.dialogflow.cx.v3beta1.GcsDestinationOrBuilder getAudioExportGcsDestinationOrBuilder(); + /** + * + * + *
+   * Settings for DTMF.
+   * Exposed at the following levels:
+   * - Agent level
+   * - Flow level
+   * - Page level
+   * - Parameter level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + * + * @return Whether the dtmfSettings field is set. + */ + boolean hasDtmfSettings(); + /** + * + * + *
+   * Settings for DTMF.
+   * Exposed at the following levels:
+   * - Agent level
+   * - Flow level
+   * - Page level
+   * - Parameter level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + * + * @return The dtmfSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings getDtmfSettings(); + /** + * + * + *
+   * Settings for DTMF.
+   * Exposed at the following levels:
+   * - Agent level
+   * - Flow level
+   * - Page level
+   * - Parameter level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings dtmf_settings = 5; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettingsOrBuilder + getDtmfSettingsOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsProto.java index 0086d5df3256..00e7dc7eba58 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsProto.java @@ -31,6 +31,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_LoggingSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -48,20 +52,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "anced_settings.proto\022\"google.cloud.dialo" + "gflow.cx.v3beta1\032\037google/api/field_behav" + "ior.proto\032,google/cloud/dialogflow/cx/v3" - + "beta1/gcs.proto\"\247\002\n\020AdvancedSettings\022X\n\034" + + "beta1/gcs.proto\"\314\003\n\020AdvancedSettings\022X\n\034" + "audio_export_gcs_destination\030\002 \001(\01322.goo" + "gle.cloud.dialogflow.cx.v3beta1.GcsDesti" - + "nation\022^\n\020logging_settings\030\006 \001(\0132D.googl" - + "e.cloud.dialogflow.cx.v3beta1.AdvancedSe" - + "ttings.LoggingSettings\032Y\n\017LoggingSetting" - + "s\022\"\n\032enable_stackdriver_logging\030\002 \001(\010\022\"\n" - + "\032enable_interaction_logging\030\003 \001(\010B\317\001\n&co" - + "m.google.cloud.dialogflow.cx.v3beta1B\025Ad" - + "vancedSettingsProtoP\001Z6cloud.google.com/" - + "go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001" - + "\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Bet" - + "a1\352\002&Google::Cloud::Dialogflow::CX::V3be" - + "ta1b\006proto3" + + "nation\022X\n\rdtmf_settings\030\005 \001(\0132A.google.c" + + "loud.dialogflow.cx.v3beta1.AdvancedSetti" + + "ngs.DtmfSettings\022^\n\020logging_settings\030\006 \001" + + "(\0132D.google.cloud.dialogflow.cx.v3beta1." + + "AdvancedSettings.LoggingSettings\032I\n\014Dtmf" + + "Settings\022\017\n\007enabled\030\001 \001(\010\022\022\n\nmax_digits\030" + + "\002 \001(\005\022\024\n\014finish_digit\030\003 \001(\t\032Y\n\017LoggingSe" + + "ttings\022\"\n\032enable_stackdriver_logging\030\002 \001" + + "(\010\022\"\n\032enable_interaction_logging\030\003 \001(\010B\317" + + "\001\n&com.google.cloud.dialogflow.cx.v3beta" + + "1B\025AdvancedSettingsProtoP\001Z6cloud.google" + + ".com/go/dialogflow/cx/apiv3beta1/cxpb;cx" + + "pb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx." + + "V3Beta1\352\002&Google::Cloud::Dialogflow::CX:" + + ":V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -76,12 +84,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_descriptor, new java.lang.String[] { - "AudioExportGcsDestination", "LoggingSettings", + "AudioExportGcsDestination", "DtmfSettings", "LoggingSettings", }); - internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_LoggingSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_descriptor .getNestedTypes() .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_descriptor, + new java.lang.String[] { + "Enabled", "MaxDigits", "FinishDigit", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_LoggingSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_descriptor + .getNestedTypes() + .get(1); internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_LoggingSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_LoggingSettings_descriptor, diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsMetadata.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsMetadata.java new file mode 100644 index 000000000000..c11e9813d3a5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsMetadata.java @@ -0,0 +1,439 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the
+ * [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents]
+ * long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata} + */ +public final class ExportIntentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata) + ExportIntentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportIntentsMetadata.newBuilder() to construct. + private ExportIntentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportIntentsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportIntentsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the
+   * [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents]
+   * long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata) + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportIntentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsMetadataOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsMetadataOrBuilder.java new file mode 100644 index 000000000000..01a0ad695b6c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportIntentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsRequest.java new file mode 100644 index 000000000000..43401b7c2c48 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsRequest.java @@ -0,0 +1,1851 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest} + */ +public final class ExportIntentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) + ExportIntentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportIntentsRequest.newBuilder() to construct. + private ExportIntentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportIntentsRequest() { + parent_ = ""; + intents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportIntentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.Builder.class); + } + + /** + * + * + *
+   * Data format of the exported intents.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat} + */ + public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified format. Treated as `BLOB`.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+     * Intents will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + BLOB(1), + /** + * + * + *
+     * Intents will be exported in JSON format.
+     * 
+ * + * JSON = 2; + */ + JSON(2), + /** + * + * + *
+     * Intents will be exported in CSV format.
+     * 
+ * + * CSV = 3; + */ + CSV(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified format. Treated as `BLOB`.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Intents will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + public static final int BLOB_VALUE = 1; + /** + * + * + *
+     * Intents will be exported in JSON format.
+     * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + /** + * + * + *
+     * Intents will be exported in CSV format.
+     * 
+ * + * CSV = 3; + */ + public static final int CSV_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataFormat forNumber(int value) { + switch (value) { + case 0: + return DATA_FORMAT_UNSPECIFIED; + case 1: + return BLOB; + case 2: + return JSON; + case 3: + return CSV; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataFormat findValueByNumber(int number) { + return DataFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataFormat[] VALUES = values(); + + public static DataFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat) + } + + private int destinationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTENTS_URI(3), + INTENTS_CONTENT_INLINE(4), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 3: + return INTENTS_URI; + case 4: + return INTENTS_CONTENT_INLINE; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the parent agent to export intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the parent agent to export intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList intents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. The name of the intents to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the intents. + */ + public com.google.protobuf.ProtocolStringList getIntentsList() { + return intents_; + } + /** + * + * + *
+   * Required. The name of the intents to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of intents. + */ + public int getIntentsCount() { + return intents_.size(); + } + /** + * + * + *
+   * Required. The name of the intents to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The intents at the given index. + */ + public java.lang.String getIntents(int index) { + return intents_.get(index); + } + /** + * + * + *
+   * Required. The name of the intents to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the intents at the given index. + */ + public com.google.protobuf.ByteString getIntentsBytes(int index) { + return intents_.getByteString(index); + } + + public static final int INTENTS_URI_FIELD_NUMBER = 3; + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the
+   * intents to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intentsUri field is set. + */ + public boolean hasIntentsUri() { + return destinationCase_ == 3; + } + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the
+   * intents to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intentsUri. + */ + public java.lang.String getIntentsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 3) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the
+   * intents to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for intentsUri. + */ + public com.google.protobuf.ByteString getIntentsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 3) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENTS_CONTENT_INLINE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. The option to return the serialized intents inline.
+   * 
+ * + * bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intentsContentInline field is set. + */ + @java.lang.Override + public boolean hasIntentsContentInline() { + return destinationCase_ == 4; + } + /** + * + * + *
+   * Optional. The option to return the serialized intents inline.
+   * 
+ * + * bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intentsContentInline. + */ + @java.lang.Override + public boolean getIntentsContentInline() { + if (destinationCase_ == 4) { + return (java.lang.Boolean) destination_; + } + return false; + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 5; + private int dataFormat_ = 0; + /** + * + * + *
+   * Optional. The data format of the exported intents. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+   * Optional. The data format of the exported intents. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat getDataFormat() { + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat.forNumber( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < intents_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, intents_.getRaw(i)); + } + if (destinationCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destination_); + } + if (destinationCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) destination_)); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, dataFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < intents_.size(); i++) { + dataSize += computeStringSizeNoTag(intents_.getRaw(i)); + } + size += dataSize; + size += 1 * getIntentsList().size(); + } + if (destinationCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destination_); + } + if (destinationCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) destination_)); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, dataFormat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getIntentsList().equals(other.getIntentsList())) return false; + if (dataFormat_ != other.dataFormat_) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 3: + if (!getIntentsUri().equals(other.getIntentsUri())) return false; + break; + case 4: + if (getIntentsContentInline() != other.getIntentsContentInline()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getIntentsCount() > 0) { + hash = (37 * hash) + INTENTS_FIELD_NUMBER; + hash = (53 * hash) + getIntentsList().hashCode(); + } + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; + switch (destinationCase_) { + case 3: + hash = (37 * hash) + INTENTS_URI_FIELD_NUMBER; + hash = (53 * hash) + getIntentsUri().hashCode(); + break; + case 4: + hash = (37 * hash) + INTENTS_CONTENT_INLINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIntentsContentInline()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + intents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataFormat_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + intents_.makeImmutable(); + result.intents_ = intents_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.dataFormat_ = dataFormat_; + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.intents_.isEmpty()) { + if (intents_.isEmpty()) { + intents_ = other.intents_; + bitField0_ |= 0x00000002; + } else { + ensureIntentsIsMutable(); + intents_.addAll(other.intents_); + } + onChanged(); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } + switch (other.getDestinationCase()) { + case INTENTS_URI: + { + destinationCase_ = 3; + destination_ = other.destination_; + onChanged(); + break; + } + case INTENTS_CONTENT_INLINE: + { + setIntentsContentInline(other.getIntentsContentInline()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIntentsIsMutable(); + intents_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 3; + destination_ = s; + break; + } // case 26 + case 32: + { + destination_ = input.readBool(); + destinationCase_ = 4; + break; + } // case 32 + case 40: + { + dataFormat_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent agent to export intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the parent agent to export intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the parent agent to export intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent agent to export intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent agent to export intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList intents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIntentsIsMutable() { + if (!intents_.isModifiable()) { + intents_ = new com.google.protobuf.LazyStringArrayList(intents_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the intents. + */ + public com.google.protobuf.ProtocolStringList getIntentsList() { + intents_.makeImmutable(); + return intents_; + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of intents. + */ + public int getIntentsCount() { + return intents_.size(); + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The intents at the given index. + */ + public java.lang.String getIntents(int index) { + return intents_.get(index); + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the intents at the given index. + */ + public com.google.protobuf.ByteString getIntentsBytes(int index) { + return intents_.getByteString(index); + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The intents to set. + * @return This builder for chaining. + */ + public Builder setIntents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The intents to add. + * @return This builder for chaining. + */ + public Builder addIntents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The intents to add. + * @return This builder for chaining. + */ + public Builder addAllIntents(java.lang.Iterable values) { + ensureIntentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intents_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIntents() { + intents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the intents to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the intents to add. + * @return This builder for chaining. + */ + public Builder addIntentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIntentsIsMutable(); + intents_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the
+     * intents to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intentsUri field is set. + */ + @java.lang.Override + public boolean hasIntentsUri() { + return destinationCase_ == 3; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the
+     * intents to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intentsUri. + */ + @java.lang.Override + public java.lang.String getIntentsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 3) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the
+     * intents to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for intentsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIntentsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 3) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the
+     * intents to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The intentsUri to set. + * @return This builder for chaining. + */ + public Builder setIntentsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the
+     * intents to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIntentsUri() { + if (destinationCase_ == 3) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the
+     * intents to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for intentsUri to set. + * @return This builder for chaining. + */ + public Builder setIntentsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The option to return the serialized intents inline.
+     * 
+ * + * bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intentsContentInline field is set. + */ + public boolean hasIntentsContentInline() { + return destinationCase_ == 4; + } + /** + * + * + *
+     * Optional. The option to return the serialized intents inline.
+     * 
+ * + * bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intentsContentInline. + */ + public boolean getIntentsContentInline() { + if (destinationCase_ == 4) { + return (java.lang.Boolean) destination_; + } + return false; + } + /** + * + * + *
+     * Optional. The option to return the serialized intents inline.
+     * 
+ * + * bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The intentsContentInline to set. + * @return This builder for chaining. + */ + public Builder setIntentsContentInline(boolean value) { + + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The option to return the serialized intents inline.
+     * 
+ * + * bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIntentsContentInline() { + if (destinationCase_ == 4) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + + private int dataFormat_ = 0; + /** + * + * + *
+     * Optional. The data format of the exported intents. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+     * Optional. The data format of the exported intents. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormatValue(int value) { + dataFormat_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The data format of the exported intents. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat getDataFormat() { + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat.forNumber( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The data format of the exported intents. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The data format of the exported intents. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + bitField0_ = (bitField0_ & ~0x00000010); + dataFormat_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportIntentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsRequestOrBuilder.java new file mode 100644 index 000000000000..7d56c4aa04d5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsRequestOrBuilder.java @@ -0,0 +1,239 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportIntentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent agent to export intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent agent to export intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The name of the intents to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the intents. + */ + java.util.List getIntentsList(); + /** + * + * + *
+   * Required. The name of the intents to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of intents. + */ + int getIntentsCount(); + /** + * + * + *
+   * Required. The name of the intents to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The intents at the given index. + */ + java.lang.String getIntents(int index); + /** + * + * + *
+   * Required. The name of the intents to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the intents at the given index. + */ + com.google.protobuf.ByteString getIntentsBytes(int index); + + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the
+   * intents to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intentsUri field is set. + */ + boolean hasIntentsUri(); + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the
+   * intents to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intentsUri. + */ + java.lang.String getIntentsUri(); + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the
+   * intents to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for intentsUri. + */ + com.google.protobuf.ByteString getIntentsUriBytes(); + + /** + * + * + *
+   * Optional. The option to return the serialized intents inline.
+   * 
+ * + * bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intentsContentInline field is set. + */ + boolean hasIntentsContentInline(); + /** + * + * + *
+   * Optional. The option to return the serialized intents inline.
+   * 
+ * + * bool intents_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intentsContentInline. + */ + boolean getIntentsContentInline(); + + /** + * + * + *
+   * Optional. The data format of the exported intents. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + /** + * + * + *
+   * Optional. The data format of the exported intents. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DataFormat getDataFormat(); + + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest.DestinationCase getDestinationCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsResponse.java new file mode 100644 index 000000000000..886b71d30f2d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsResponse.java @@ -0,0 +1,1106 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse} + */ +public final class ExportIntentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse) + ExportIntentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportIntentsResponse.newBuilder() to construct. + private ExportIntentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportIntentsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportIntentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse.Builder.class); + } + + private int intentsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object intents_; + + public enum IntentsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTENTS_URI(1), + INTENTS_CONTENT(2), + INTENTS_NOT_SET(0); + private final int value; + + private IntentsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IntentsCase valueOf(int value) { + return forNumber(value); + } + + public static IntentsCase forNumber(int value) { + switch (value) { + case 1: + return INTENTS_URI; + case 2: + return INTENTS_CONTENT; + case 0: + return INTENTS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IntentsCase getIntentsCase() { + return IntentsCase.forNumber(intentsCase_); + } + + public static final int INTENTS_URI_FIELD_NUMBER = 1; + /** + * + * + *
+   * The URI to a file containing the exported intents. This field is
+   * populated only if `intents_uri` is specified in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * string intents_uri = 1; + * + * @return Whether the intentsUri field is set. + */ + public boolean hasIntentsUri() { + return intentsCase_ == 1; + } + /** + * + * + *
+   * The URI to a file containing the exported intents. This field is
+   * populated only if `intents_uri` is specified in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * string intents_uri = 1; + * + * @return The intentsUri. + */ + public java.lang.String getIntentsUri() { + java.lang.Object ref = ""; + if (intentsCase_ == 1) { + ref = intents_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (intentsCase_ == 1) { + intents_ = s; + } + return s; + } + } + /** + * + * + *
+   * The URI to a file containing the exported intents. This field is
+   * populated only if `intents_uri` is specified in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * string intents_uri = 1; + * + * @return The bytes for intentsUri. + */ + public com.google.protobuf.ByteString getIntentsUriBytes() { + java.lang.Object ref = ""; + if (intentsCase_ == 1) { + ref = intents_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (intentsCase_ == 1) { + intents_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENTS_CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Uncompressed byte content for intents. This field is populated only if
+   * `intents_content_inline` is set to true in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + * + * @return Whether the intentsContent field is set. + */ + @java.lang.Override + public boolean hasIntentsContent() { + return intentsCase_ == 2; + } + /** + * + * + *
+   * Uncompressed byte content for intents. This field is populated only if
+   * `intents_content_inline` is set to true in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + * + * @return The intentsContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getIntentsContent() { + if (intentsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) intents_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Uncompressed byte content for intents. This field is populated only if
+   * `intents_content_inline` is set to true in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder + getIntentsContentOrBuilder() { + if (intentsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) intents_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (intentsCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, intents_); + } + if (intentsCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) intents_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (intentsCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, intents_); + } + if (intentsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) intents_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse) obj; + + if (!getIntentsCase().equals(other.getIntentsCase())) return false; + switch (intentsCase_) { + case 1: + if (!getIntentsUri().equals(other.getIntentsUri())) return false; + break; + case 2: + if (!getIntentsContent().equals(other.getIntentsContent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (intentsCase_) { + case 1: + hash = (37 * hash) + INTENTS_URI_FIELD_NUMBER; + hash = (53 * hash) + getIntentsUri().hashCode(); + break; + case 2: + hash = (37 * hash) + INTENTS_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getIntentsContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (intentsContentBuilder_ != null) { + intentsContentBuilder_.clear(); + } + intentsCase_ = 0; + intents_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse result) { + result.intentsCase_ = intentsCase_; + result.intents_ = this.intents_; + if (intentsCase_ == 2 && intentsContentBuilder_ != null) { + result.intents_ = intentsContentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse.getDefaultInstance()) + return this; + switch (other.getIntentsCase()) { + case INTENTS_URI: + { + intentsCase_ = 1; + intents_ = other.intents_; + onChanged(); + break; + } + case INTENTS_CONTENT: + { + mergeIntentsContent(other.getIntentsContent()); + break; + } + case INTENTS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + intentsCase_ = 1; + intents_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(getIntentsContentFieldBuilder().getBuilder(), extensionRegistry); + intentsCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int intentsCase_ = 0; + private java.lang.Object intents_; + + public IntentsCase getIntentsCase() { + return IntentsCase.forNumber(intentsCase_); + } + + public Builder clearIntents() { + intentsCase_ = 0; + intents_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The URI to a file containing the exported intents. This field is
+     * populated only if `intents_uri` is specified in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * string intents_uri = 1; + * + * @return Whether the intentsUri field is set. + */ + @java.lang.Override + public boolean hasIntentsUri() { + return intentsCase_ == 1; + } + /** + * + * + *
+     * The URI to a file containing the exported intents. This field is
+     * populated only if `intents_uri` is specified in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * string intents_uri = 1; + * + * @return The intentsUri. + */ + @java.lang.Override + public java.lang.String getIntentsUri() { + java.lang.Object ref = ""; + if (intentsCase_ == 1) { + ref = intents_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (intentsCase_ == 1) { + intents_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI to a file containing the exported intents. This field is
+     * populated only if `intents_uri` is specified in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * string intents_uri = 1; + * + * @return The bytes for intentsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIntentsUriBytes() { + java.lang.Object ref = ""; + if (intentsCase_ == 1) { + ref = intents_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (intentsCase_ == 1) { + intents_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI to a file containing the exported intents. This field is
+     * populated only if `intents_uri` is specified in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * string intents_uri = 1; + * + * @param value The intentsUri to set. + * @return This builder for chaining. + */ + public Builder setIntentsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + intentsCase_ = 1; + intents_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI to a file containing the exported intents. This field is
+     * populated only if `intents_uri` is specified in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * string intents_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearIntentsUri() { + if (intentsCase_ == 1) { + intentsCase_ = 0; + intents_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The URI to a file containing the exported intents. This field is
+     * populated only if `intents_uri` is specified in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * string intents_uri = 1; + * + * @param value The bytes for intentsUri to set. + * @return This builder for chaining. + */ + public Builder setIntentsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + intentsCase_ = 1; + intents_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder> + intentsContentBuilder_; + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + * + * @return Whether the intentsContent field is set. + */ + @java.lang.Override + public boolean hasIntentsContent() { + return intentsCase_ == 2; + } + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + * + * @return The intentsContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getIntentsContent() { + if (intentsContentBuilder_ == null) { + if (intentsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) intents_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } else { + if (intentsCase_ == 2) { + return intentsContentBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + public Builder setIntentsContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination value) { + if (intentsContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intents_ = value; + onChanged(); + } else { + intentsContentBuilder_.setMessage(value); + } + intentsCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + public Builder setIntentsContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder builderForValue) { + if (intentsContentBuilder_ == null) { + intents_ = builderForValue.build(); + onChanged(); + } else { + intentsContentBuilder_.setMessage(builderForValue.build()); + } + intentsCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + public Builder mergeIntentsContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination value) { + if (intentsContentBuilder_ == null) { + if (intentsCase_ == 2 + && intents_ + != com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance()) { + intents_ = + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) intents_) + .mergeFrom(value) + .buildPartial(); + } else { + intents_ = value; + } + onChanged(); + } else { + if (intentsCase_ == 2) { + intentsContentBuilder_.mergeFrom(value); + } else { + intentsContentBuilder_.setMessage(value); + } + } + intentsCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + public Builder clearIntentsContent() { + if (intentsContentBuilder_ == null) { + if (intentsCase_ == 2) { + intentsCase_ = 0; + intents_ = null; + onChanged(); + } + } else { + if (intentsCase_ == 2) { + intentsCase_ = 0; + intents_ = null; + } + intentsContentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder + getIntentsContentBuilder() { + return getIntentsContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder + getIntentsContentOrBuilder() { + if ((intentsCase_ == 2) && (intentsContentBuilder_ != null)) { + return intentsContentBuilder_.getMessageOrBuilder(); + } else { + if (intentsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) intents_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content for intents. This field is populated only if
+     * `intents_content_inline` is set to true in
+     * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder> + getIntentsContentFieldBuilder() { + if (intentsContentBuilder_ == null) { + if (!(intentsCase_ == 2)) { + intents_ = com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + intentsContentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) intents_, + getParentForChildren(), + isClean()); + intents_ = null; + } + intentsCase_ = 2; + onChanged(); + return intentsContentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportIntentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsResponseOrBuilder.java new file mode 100644 index 000000000000..906229ac5c00 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportIntentsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportIntentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI to a file containing the exported intents. This field is
+   * populated only if `intents_uri` is specified in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * string intents_uri = 1; + * + * @return Whether the intentsUri field is set. + */ + boolean hasIntentsUri(); + /** + * + * + *
+   * The URI to a file containing the exported intents. This field is
+   * populated only if `intents_uri` is specified in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * string intents_uri = 1; + * + * @return The intentsUri. + */ + java.lang.String getIntentsUri(); + /** + * + * + *
+   * The URI to a file containing the exported intents. This field is
+   * populated only if `intents_uri` is specified in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * string intents_uri = 1; + * + * @return The bytes for intentsUri. + */ + com.google.protobuf.ByteString getIntentsUriBytes(); + + /** + * + * + *
+   * Uncompressed byte content for intents. This field is populated only if
+   * `intents_content_inline` is set to true in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + * + * @return Whether the intentsContent field is set. + */ + boolean hasIntentsContent(); + /** + * + * + *
+   * Uncompressed byte content for intents. This field is populated only if
+   * `intents_content_inline` is set to true in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + * + * @return The intentsContent. + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getIntentsContent(); + /** + * + * + *
+   * Uncompressed byte content for intents. This field is populated only if
+   * `intents_content_inline` is set to true in
+   * [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination intents_content = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder getIntentsContentOrBuilder(); + + com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse.IntentsCase getIntentsCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java index 5f96de3d7fbe..fe4dabe87072 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Flow.java @@ -691,6 +691,60 @@ public com.google.cloud.dialogflow.cx.v3beta1.NluSettingsOrBuilder getNluSetting : nluSettings_; } + public static final int ADVANCED_SETTINGS_FIELD_NUMBER = 14; + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + /** + * + * + *
+   * Hierarchical advanced settings for this flow. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + * + * @return Whether the advancedSettings field is set. + */ + @java.lang.Override + public boolean hasAdvancedSettings() { + return advancedSettings_ != null; + } + /** + * + * + *
+   * Hierarchical advanced settings for this flow. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + * + * @return The advancedSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + /** + * + * + *
+   * Hierarchical advanced settings for this flow. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 18; private com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledgeConnectorSettings_; @@ -782,6 +836,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (nluSettings_ != null) { output.writeMessage(11, getNluSettings()); } + if (advancedSettings_ != null) { + output.writeMessage(14, getAdvancedSettings()); + } for (int i = 0; i < transitionRouteGroups_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString( output, 15, transitionRouteGroups_.getRaw(i)); @@ -816,6 +873,9 @@ public int getSerializedSize() { if (nluSettings_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getNluSettings()); } + if (advancedSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getAdvancedSettings()); + } { int dataSize = 0; for (int i = 0; i < transitionRouteGroups_.size(); i++) { @@ -855,6 +915,10 @@ public boolean equals(final java.lang.Object obj) { if (hasNluSettings()) { if (!getNluSettings().equals(other.getNluSettings())) return false; } + if (hasAdvancedSettings() != other.hasAdvancedSettings()) return false; + if (hasAdvancedSettings()) { + if (!getAdvancedSettings().equals(other.getAdvancedSettings())) return false; + } if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false; if (hasKnowledgeConnectorSettings()) { if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) @@ -893,6 +957,10 @@ public int hashCode() { hash = (37 * hash) + NLU_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getNluSettings().hashCode(); } + if (hasAdvancedSettings()) { + hash = (37 * hash) + ADVANCED_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedSettings().hashCode(); + } if (hasKnowledgeConnectorSettings()) { hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); @@ -1072,6 +1140,11 @@ public Builder clear() { nluSettingsBuilder_.dispose(); nluSettingsBuilder_ = null; } + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } knowledgeConnectorSettings_ = null; if (knowledgeConnectorSettingsBuilder_ != null) { knowledgeConnectorSettingsBuilder_.dispose(); @@ -1153,6 +1226,10 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Flow result) { nluSettingsBuilder_ == null ? nluSettings_ : nluSettingsBuilder_.build(); } if (((from_bitField0_ & 0x00000080) != 0)) { + result.advancedSettings_ = + advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { result.knowledgeConnectorSettings_ = knowledgeConnectorSettingsBuilder_ == null ? knowledgeConnectorSettings_ @@ -1287,6 +1364,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Flow other) { if (other.hasNluSettings()) { mergeNluSettings(other.getNluSettings()); } + if (other.hasAdvancedSettings()) { + mergeAdvancedSettings(other.getAdvancedSettings()); + } if (other.hasKnowledgeConnectorSettings()) { mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); } @@ -1368,6 +1448,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 90 + case 114: + { + input.readMessage( + getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 114 case 122: { java.lang.String s = input.readStringRequireUtf8(); @@ -1379,7 +1466,7 @@ public Builder mergeFrom( { input.readMessage( getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 146 default: @@ -3451,6 +3538,204 @@ public com.google.cloud.dialogflow.cx.v3beta1.NluSettingsOrBuilder getNluSetting return nluSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + advancedSettingsBuilder_; + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + * + * @return Whether the advancedSettings field is set. + */ + public boolean hasAdvancedSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + * + * @return The advancedSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + if (advancedSettingsBuilder_ == null) { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } else { + return advancedSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedSettings_ = value; + } else { + advancedSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder builderForValue) { + if (advancedSettingsBuilder_ == null) { + advancedSettings_ = builderForValue.build(); + } else { + advancedSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + public Builder mergeAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && advancedSettings_ != null + && advancedSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance()) { + getAdvancedSettingsBuilder().mergeFrom(value); + } else { + advancedSettings_ = value; + } + } else { + advancedSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + public Builder clearAdvancedSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder + getAdvancedSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getAdvancedSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + if (advancedSettingsBuilder_ != null) { + return advancedSettingsBuilder_.getMessageOrBuilder(); + } else { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + } + /** + * + * + *
+     * Hierarchical advanced settings for this flow. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + getAdvancedSettingsFieldBuilder() { + if (advancedSettingsBuilder_ == null) { + advancedSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder>( + getAdvancedSettings(), getParentForChildren(), isClean()); + advancedSettings_ = null; + } + return advancedSettingsBuilder_; + } + private com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledgeConnectorSettings_; private com.google.protobuf.SingleFieldBuilderV3< @@ -3472,7 +3757,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.NluSettingsOrBuilder getNluSetting * @return Whether the knowledgeConnectorSettings field is set. */ public boolean hasKnowledgeConnectorSettings() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -3518,7 +3803,7 @@ public Builder setKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3540,7 +3825,7 @@ public Builder setKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3558,7 +3843,7 @@ public Builder setKnowledgeConnectorSettings( public Builder mergeKnowledgeConnectorSettings( com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings value) { if (knowledgeConnectorSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000100) != 0) && knowledgeConnectorSettings_ != null && knowledgeConnectorSettings_ != com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings @@ -3570,7 +3855,7 @@ public Builder mergeKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3586,7 +3871,7 @@ public Builder mergeKnowledgeConnectorSettings( * */ public Builder clearKnowledgeConnectorSettings() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); knowledgeConnectorSettings_ = null; if (knowledgeConnectorSettingsBuilder_ != null) { knowledgeConnectorSettingsBuilder_.dispose(); @@ -3608,7 +3893,7 @@ public Builder clearKnowledgeConnectorSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder getKnowledgeConnectorSettingsBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java index 4ed08d8b4a51..c91dc0fbdb1c 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowOrBuilder.java @@ -487,6 +487,44 @@ com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRou */ com.google.cloud.dialogflow.cx.v3beta1.NluSettingsOrBuilder getNluSettingsOrBuilder(); + /** + * + * + *
+   * Hierarchical advanced settings for this flow. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + * + * @return Whether the advancedSettings field is set. + */ + boolean hasAdvancedSettings(); + /** + * + * + *
+   * Hierarchical advanced settings for this flow. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + * + * @return The advancedSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings(); + /** + * + * + *
+   * Hierarchical advanced settings for this flow. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 14; + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java index b8fe0c2f2823..cb81ad4803f8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowProto.java @@ -108,156 +108,159 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "w.proto\022\"google.cloud.dialogflow.cx.v3be" + "ta1\032\034google/api/annotations.proto\032\027googl" + "e/api/client.proto\032\037google/api/field_beh" - + "avior.proto\032\031google/api/resource.proto\0328" - + "google/cloud/dialogflow/cx/v3beta1/impor" - + "t_strategy.proto\032-google/cloud/dialogflo" - + "w/cx/v3beta1/page.proto\032;google/cloud/di" - + "alogflow/cx/v3beta1/validation_message.p" - + "roto\032#google/longrunning/operations.prot" - + "o\032\033google/protobuf/empty.proto\032 google/p" - + "rotobuf/field_mask.proto\032\034google/protobu" - + "f/struct.proto\032\037google/protobuf/timestam" - + "p.proto\"\266\003\n\013NluSettings\022M\n\nmodel_type\030\001 " - + "\001(\01629.google.cloud.dialogflow.cx.v3beta1" - + ".NluSettings.ModelType\022 \n\030classification" - + "_threshold\030\003 \001(\002\022^\n\023model_training_mode\030" - + "\004 \001(\0162A.google.cloud.dialogflow.cx.v3bet" - + "a1.NluSettings.ModelTrainingMode\"Y\n\tMode" - + "lType\022\032\n\026MODEL_TYPE_UNSPECIFIED\020\000\022\027\n\023MOD" - + "EL_TYPE_STANDARD\020\001\022\027\n\023MODEL_TYPE_ADVANCE" - + "D\020\003\"{\n\021ModelTrainingMode\022#\n\037MODEL_TRAINI" - + "NG_MODE_UNSPECIFIED\020\000\022!\n\035MODEL_TRAINING_" - + "MODE_AUTOMATIC\020\001\022\036\n\032MODEL_TRAINING_MODE_" - + "MANUAL\020\002\"\322\004\n\004Flow\022\014\n\004name\030\001 \001(\t\022\032\n\014displ" - + "ay_name\030\002 \001(\tB\004\342A\001\002\022\023\n\013description\030\003 \001(\t" - + "\022N\n\021transition_routes\030\004 \003(\01323.google.clo" - + "ud.dialogflow.cx.v3beta1.TransitionRoute" - + "\022H\n\016event_handlers\030\n \003(\01320.google.cloud." - + "dialogflow.cx.v3beta1.EventHandler\022T\n\027tr" - + "ansition_route_groups\030\017 \003(\tB3\372A0\n.dialog" - + "flow.googleapis.com/TransitionRouteGroup" - + "\022E\n\014nlu_settings\030\013 \001(\0132/.google.cloud.di" - + "alogflow.cx.v3beta1.NluSettings\022j\n\034knowl" - + "edge_connector_settings\030\022 \001(\0132>.google.c" - + "loud.dialogflow.cx.v3beta1.KnowledgeConn" - + "ectorSettingsB\004\342A\001\001:h\352Ae\n\036dialogflow.goo" - + "gleapis.com/Flow\022Cprojects/{project}/loc" - + "ations/{location}/agents/{agent}/flows/{" - + "flow}\"\241\001\n\021CreateFlowRequest\0227\n\006parent\030\001 " - + "\001(\tB\'\342A\001\002\372A \022\036dialogflow.googleapis.com/" - + "Flow\022<\n\004flow\030\002 \001(\0132(.google.cloud.dialog" - + "flow.cx.v3beta1.FlowB\004\342A\001\002\022\025\n\rlanguage_c" - + "ode\030\003 \001(\t\"Y\n\021DeleteFlowRequest\0225\n\004name\030\001" - + " \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com" - + "/Flow\022\r\n\005force\030\002 \001(\010\"\211\001\n\020ListFlowsReques" - + "t\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.g" - + "oogleapis.com/Flow\022\021\n\tpage_size\030\002 \001(\005\022\022\n" - + "\npage_token\030\003 \001(\t\022\025\n\rlanguage_code\030\004 \001(\t" - + "\"e\n\021ListFlowsResponse\0227\n\005flows\030\001 \003(\0132(.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Flow\022\027" - + "\n\017next_page_token\030\002 \001(\t\"^\n\016GetFlowReques" - + "t\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.goo" - + "gleapis.com/Flow\022\025\n\rlanguage_code\030\002 \001(\t\"" - + "\231\001\n\021UpdateFlowRequest\022<\n\004flow\030\001 \001(\0132(.go" - + "ogle.cloud.dialogflow.cx.v3beta1.FlowB\004\342" - + "A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protob" - + "uf.FieldMask\022\025\n\rlanguage_code\030\003 \001(\t\"I\n\020T" - + "rainFlowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036" - + "dialogflow.googleapis.com/Flow\"c\n\023Valida" - + "teFlowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036di" - + "alogflow.googleapis.com/Flow\022\025\n\rlanguage" - + "_code\030\002 \001(\t\"~\n\036GetFlowValidationResultRe" - + "quest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.dialogflow" - + ".googleapis.com/FlowValidationResult\022\025\n\r" - + "language_code\030\002 \001(\t\"\266\002\n\024FlowValidationRe" - + "sult\022\014\n\004name\030\001 \001(\t\022R\n\023validation_message" - + "s\030\002 \003(\01325.google.cloud.dialogflow.cx.v3b" - + "eta1.ValidationMessage\022/\n\013update_time\030\003 " - + "\001(\0132\032.google.protobuf.Timestamp:\212\001\352A\206\001\n." - + "dialogflow.googleapis.com/FlowValidation" - + "Result\022Tprojects/{project}/locations/{lo" - + "cation}/agents/{agent}/flows/{flow}/vali" - + "dationResult\"\376\002\n\021ImportFlowRequest\0227\n\006pa" - + "rent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.googleap" - + "is.com/Flow\022\022\n\010flow_uri\030\002 \001(\tH\000\022\026\n\014flow_" - + "content\030\003 \001(\014H\000\022Y\n\rimport_option\030\004 \001(\0162B" - + ".google.cloud.dialogflow.cx.v3beta1.Impo" - + "rtFlowRequest.ImportOption\022Z\n\024flow_impor" - + "t_strategy\030\005 \001(\01326.google.cloud.dialogfl" - + "ow.cx.v3beta1.FlowImportStrategyB\004\342A\001\001\"E" - + "\n\014ImportOption\022\035\n\031IMPORT_OPTION_UNSPECIF" - + "IED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\006\n\004flow\"n\n" - + "\022FlowImportStrategy\022X\n\026global_import_str" - + "ategy\030\001 \001(\01622.google.cloud.dialogflow.cx" - + ".v3beta1.ImportStrategyB\004\342A\001\001\"G\n\022ImportF" - + "lowResponse\0221\n\004flow\030\001 \001(\tB#\372A \n\036dialogfl" - + "ow.googleapis.com/Flow\"\212\001\n\021ExportFlowReq" - + "uest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow." - + "googleapis.com/Flow\022\026\n\010flow_uri\030\002 \001(\tB\004\342" - + "A\001\001\022&\n\030include_referenced_flows\030\004 \001(\010B\004\342" - + "A\001\001\"H\n\022ExportFlowResponse\022\022\n\010flow_uri\030\001 " - + "\001(\tH\000\022\026\n\014flow_content\030\002 \001(\014H\000B\006\n\004flow2\233\021" - + "\n\005Flows\022\302\001\n\nCreateFlow\0225.google.cloud.di" - + "alogflow.cx.v3beta1.CreateFlowRequest\032(." - + "google.cloud.dialogflow.cx.v3beta1.Flow\"" - + "S\332A\013parent,flow\202\323\344\223\002?\"7/v3beta1/{parent=" - + "projects/*/locations/*/agents/*}/flows:\004" - + "flow\022\243\001\n\nDeleteFlow\0225.google.cloud.dialo" - + "gflow.cx.v3beta1.DeleteFlowRequest\032\026.goo" - + "gle.protobuf.Empty\"F\332A\004name\202\323\344\223\0029*7/v3be" - + "ta1/{name=projects/*/locations/*/agents/" - + "*/flows/*}\022\302\001\n\tListFlows\0224.google.cloud." - + "dialogflow.cx.v3beta1.ListFlowsRequest\0325" - + ".google.cloud.dialogflow.cx.v3beta1.List" - + "FlowsResponse\"H\332A\006parent\202\323\344\223\0029\0227/v3beta1" - + "/{parent=projects/*/locations/*/agents/*" - + "}/flows\022\257\001\n\007GetFlow\0222.google.cloud.dialo" - + "gflow.cx.v3beta1.GetFlowRequest\032(.google" - + ".cloud.dialogflow.cx.v3beta1.Flow\"F\332A\004na" - + "me\202\323\344\223\0029\0227/v3beta1/{name=projects/*/loca" - + "tions/*/agents/*/flows/*}\022\314\001\n\nUpdateFlow" - + "\0225.google.cloud.dialogflow.cx.v3beta1.Up" - + "dateFlowRequest\032(.google.cloud.dialogflo" - + "w.cx.v3beta1.Flow\"]\332A\020flow,update_mask\202\323" - + "\344\223\002D2/v3beta" - + "1/{parent=projects/*/locations/*/agents/" - + "*}/flows:import:\001*\022\334\001\n\nExportFlow\0225.goog" - + "le.cloud.dialogflow.cx.v3beta1.ExportFlo" - + "wRequest\032\035.google.longrunning.Operation\"" - + "x\312A,\n\022ExportFlowResponse\022\026google.protobu" - + "f.Struct\202\323\344\223\002C\">/v3beta1/{name=projects/" - + "*/locations/*/agents/*/flows/*}:export:\001" - + "*\032x\312A\031dialogflow.googleapis.com\322AYhttps:" - + "//www.googleapis.com/auth/cloud-platform" - + ",https://www.googleapis.com/auth/dialogf" - + "lowB\303\001\n&com.google.cloud.dialogflow.cx.v" - + "3beta1B\tFlowProtoP\001Z6cloud.google.com/go" - + "/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002" - + "\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta1" - + "\352\002&Google::Cloud::Dialogflow::CX::V3beta" - + "1b\006proto3" + + "avior.proto\032\031google/api/resource.proto\032:" + + "google/cloud/dialogflow/cx/v3beta1/advan" + + "ced_settings.proto\0328google/cloud/dialogf" + + "low/cx/v3beta1/import_strategy.proto\032-go" + + "ogle/cloud/dialogflow/cx/v3beta1/page.pr" + + "oto\032;google/cloud/dialogflow/cx/v3beta1/" + + "validation_message.proto\032#google/longrun" + + "ning/operations.proto\032\033google/protobuf/e" + + "mpty.proto\032 google/protobuf/field_mask.p" + + "roto\032\034google/protobuf/struct.proto\032\037goog" + + "le/protobuf/timestamp.proto\"\266\003\n\013NluSetti" + + "ngs\022M\n\nmodel_type\030\001 \001(\01629.google.cloud.d" + + "ialogflow.cx.v3beta1.NluSettings.ModelTy" + + "pe\022 \n\030classification_threshold\030\003 \001(\002\022^\n\023" + + "model_training_mode\030\004 \001(\0162A.google.cloud" + + ".dialogflow.cx.v3beta1.NluSettings.Model" + + "TrainingMode\"Y\n\tModelType\022\032\n\026MODEL_TYPE_" + + "UNSPECIFIED\020\000\022\027\n\023MODEL_TYPE_STANDARD\020\001\022\027" + + "\n\023MODEL_TYPE_ADVANCED\020\003\"{\n\021ModelTraining" + + "Mode\022#\n\037MODEL_TRAINING_MODE_UNSPECIFIED\020" + + "\000\022!\n\035MODEL_TRAINING_MODE_AUTOMATIC\020\001\022\036\n\032" + + "MODEL_TRAINING_MODE_MANUAL\020\002\"\243\005\n\004Flow\022\014\n" + + "\004name\030\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022" + + "\023\n\013description\030\003 \001(\t\022N\n\021transition_route" + + "s\030\004 \003(\01323.google.cloud.dialogflow.cx.v3b" + + "eta1.TransitionRoute\022H\n\016event_handlers\030\n" + + " \003(\01320.google.cloud.dialogflow.cx.v3beta" + + "1.EventHandler\022T\n\027transition_route_group" + + "s\030\017 \003(\tB3\372A0\n.dialogflow.googleapis.com/" + + "TransitionRouteGroup\022E\n\014nlu_settings\030\013 \001" + + "(\0132/.google.cloud.dialogflow.cx.v3beta1." + + "NluSettings\022O\n\021advanced_settings\030\016 \001(\01324" + + ".google.cloud.dialogflow.cx.v3beta1.Adva" + + "ncedSettings\022j\n\034knowledge_connector_sett" + + "ings\030\022 \001(\0132>.google.cloud.dialogflow.cx." + + "v3beta1.KnowledgeConnectorSettingsB\004\342A\001\001" + + ":h\352Ae\n\036dialogflow.googleapis.com/Flow\022Cp" + + "rojects/{project}/locations/{location}/a" + + "gents/{agent}/flows/{flow}\"\241\001\n\021CreateFlo" + + "wRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dialo" + + "gflow.googleapis.com/Flow\022<\n\004flow\030\002 \001(\0132" + + "(.google.cloud.dialogflow.cx.v3beta1.Flo" + + "wB\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"Y\n\021Delete" + + "FlowRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dial" + + "ogflow.googleapis.com/Flow\022\r\n\005force\030\002 \001(" + + "\010\"\211\001\n\020ListFlowsRequest\0227\n\006parent\030\001 \001(\tB\'" + + "\342A\001\002\372A \022\036dialogflow.googleapis.com/Flow\022" + + "\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\025" + + "\n\rlanguage_code\030\004 \001(\t\"e\n\021ListFlowsRespon" + + "se\0227\n\005flows\030\001 \003(\0132(.google.cloud.dialogf" + + "low.cx.v3beta1.Flow\022\027\n\017next_page_token\030\002" + + " \001(\t\"^\n\016GetFlowRequest\0225\n\004name\030\001 \001(\tB\'\342A" + + "\001\002\372A \n\036dialogflow.googleapis.com/Flow\022\025\n" + + "\rlanguage_code\030\002 \001(\t\"\231\001\n\021UpdateFlowReque" + + "st\022<\n\004flow\030\001 \001(\0132(.google.cloud.dialogfl" + + "ow.cx.v3beta1.FlowB\004\342A\001\002\022/\n\013update_mask\030" + + "\002 \001(\0132\032.google.protobuf.FieldMask\022\025\n\rlan" + + "guage_code\030\003 \001(\t\"I\n\020TrainFlowRequest\0225\n\004" + + "name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleap" + + "is.com/Flow\"c\n\023ValidateFlowRequest\0225\n\004na" + + "me\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis" + + ".com/Flow\022\025\n\rlanguage_code\030\002 \001(\t\"~\n\036GetF" + + "lowValidationResultRequest\022E\n\004name\030\001 \001(\t" + + "B7\342A\001\002\372A0\n.dialogflow.googleapis.com/Flo" + + "wValidationResult\022\025\n\rlanguage_code\030\002 \001(\t" + + "\"\266\002\n\024FlowValidationResult\022\014\n\004name\030\001 \001(\t\022" + + "R\n\023validation_messages\030\002 \003(\01325.google.cl" + + "oud.dialogflow.cx.v3beta1.ValidationMess" + + "age\022/\n\013update_time\030\003 \001(\0132\032.google.protob" + + "uf.Timestamp:\212\001\352A\206\001\n.dialogflow.googleap" + + "is.com/FlowValidationResult\022Tprojects/{p" + + "roject}/locations/{location}/agents/{age" + + "nt}/flows/{flow}/validationResult\"\376\002\n\021Im" + + "portFlowRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A " + + "\022\036dialogflow.googleapis.com/Flow\022\022\n\010flow" + + "_uri\030\002 \001(\tH\000\022\026\n\014flow_content\030\003 \001(\014H\000\022Y\n\r" + + "import_option\030\004 \001(\0162B.google.cloud.dialo" + + "gflow.cx.v3beta1.ImportFlowRequest.Impor" + + "tOption\022Z\n\024flow_import_strategy\030\005 \001(\01326." + + "google.cloud.dialogflow.cx.v3beta1.FlowI" + + "mportStrategyB\004\342A\001\001\"E\n\014ImportOption\022\035\n\031I" + + "MPORT_OPTION_UNSPECIFIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010" + + "FALLBACK\020\002B\006\n\004flow\"n\n\022FlowImportStrategy" + + "\022X\n\026global_import_strategy\030\001 \001(\01622.googl" + + "e.cloud.dialogflow.cx.v3beta1.ImportStra" + + "tegyB\004\342A\001\001\"G\n\022ImportFlowResponse\0221\n\004flow" + + "\030\001 \001(\tB#\372A \n\036dialogflow.googleapis.com/F" + + "low\"\212\001\n\021ExportFlowRequest\0225\n\004name\030\001 \001(\tB" + + "\'\342A\001\002\372A \n\036dialogflow.googleapis.com/Flow" + + "\022\026\n\010flow_uri\030\002 \001(\tB\004\342A\001\001\022&\n\030include_refe" + + "renced_flows\030\004 \001(\010B\004\342A\001\001\"H\n\022ExportFlowRe" + + "sponse\022\022\n\010flow_uri\030\001 \001(\tH\000\022\026\n\014flow_conte" + + "nt\030\002 \001(\014H\000B\006\n\004flow2\233\021\n\005Flows\022\302\001\n\nCreateF" + + "low\0225.google.cloud.dialogflow.cx.v3beta1" + + ".CreateFlowRequest\032(.google.cloud.dialog" + + "flow.cx.v3beta1.Flow\"S\332A\013parent,flow\202\323\344\223" + + "\002?\"7/v3beta1/{parent=projects/*/location" + + "s/*/agents/*}/flows:\004flow\022\243\001\n\nDeleteFlow" + + "\0225.google.cloud.dialogflow.cx.v3beta1.De" + + "leteFlowRequest\032\026.google.protobuf.Empty\"" + + "F\332A\004name\202\323\344\223\0029*7/v3beta1/{name=projects/" + + "*/locations/*/agents/*/flows/*}\022\302\001\n\tList" + + "Flows\0224.google.cloud.dialogflow.cx.v3bet" + + "a1.ListFlowsRequest\0325.google.cloud.dialo" + + "gflow.cx.v3beta1.ListFlowsResponse\"H\332A\006p" + + "arent\202\323\344\223\0029\0227/v3beta1/{parent=projects/*" + + "/locations/*/agents/*}/flows\022\257\001\n\007GetFlow" + + "\0222.google.cloud.dialogflow.cx.v3beta1.Ge" + + "tFlowRequest\032(.google.cloud.dialogflow.c" + + "x.v3beta1.Flow\"F\332A\004name\202\323\344\223\0029\0227/v3beta1/" + + "{name=projects/*/locations/*/agents/*/fl" + + "ows/*}\022\314\001\n\nUpdateFlow\0225.google.cloud.dia" + + "logflow.cx.v3beta1.UpdateFlowRequest\032(.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Flow\"]" + + "\332A\020flow,update_mask\202\323\344\223\002D2/v3beta1/{parent=projects/" + + "*/locations/*/agents/*}/flows:import:\001*\022" + + "\334\001\n\nExportFlow\0225.google.cloud.dialogflow" + + ".cx.v3beta1.ExportFlowRequest\032\035.google.l" + + "ongrunning.Operation\"x\312A,\n\022ExportFlowRes" + + "ponse\022\026google.protobuf.Struct\202\323\344\223\002C\">/v3" + + "beta1/{name=projects/*/locations/*/agent" + + "s/*/flows/*}:export:\001*\032x\312A\031dialogflow.go" + + "ogleapis.com\322AYhttps://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/dialogflowB\303\001\n&com.google." + + "cloud.dialogflow.cx.v3beta1B\tFlowProtoP\001" + + "Z6cloud.google.com/go/dialogflow/cx/apiv" + + "3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud." + + "Dialogflow.Cx.V3Beta1\352\002&Google::Cloud::D" + + "ialogflow::CX::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -267,6 +270,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.ImportStrategyProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto.getDescriptor(), @@ -297,6 +301,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EventHandlers", "TransitionRouteGroups", "NluSettings", + "AdvancedSettings", "KnowledgeConnectorSettings", }); internal_static_google_cloud_dialogflow_cx_v3beta1_CreateFlowRequest_descriptor = @@ -435,6 +440,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.ImportStrategyProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.ValidationMessageProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java index 7692d4f4dab3..01db1ae3cd06 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Form.java @@ -264,6 +264,44 @@ public interface ParameterOrBuilder * @return The redact. */ boolean getRedact(); + + /** + * + * + *
+     * Hierarchical advanced settings for this parameter. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + * + * @return Whether the advancedSettings field is set. + */ + boolean hasAdvancedSettings(); + /** + * + * + *
+     * Hierarchical advanced settings for this parameter. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + * + * @return The advancedSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings(); + /** + * + * + *
+     * Hierarchical advanced settings for this parameter. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder(); } /** * @@ -2903,6 +2941,60 @@ public boolean getRedact() { return redact_; } + public static final int ADVANCED_SETTINGS_FIELD_NUMBER = 12; + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + /** + * + * + *
+     * Hierarchical advanced settings for this parameter. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + * + * @return Whether the advancedSettings field is set. + */ + @java.lang.Override + public boolean hasAdvancedSettings() { + return advancedSettings_ != null; + } + /** + * + * + *
+     * Hierarchical advanced settings for this parameter. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + * + * @return The advancedSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + /** + * + * + *
+     * Hierarchical advanced settings for this parameter. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2938,6 +3030,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (redact_ != false) { output.writeBool(11, redact_); } + if (advancedSettings_ != null) { + output.writeMessage(12, getAdvancedSettings()); + } getUnknownFields().writeTo(output); } @@ -2968,6 +3063,9 @@ public int getSerializedSize() { if (redact_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, redact_); } + if (advancedSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getAdvancedSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2997,6 +3095,10 @@ public boolean equals(final java.lang.Object obj) { if (!getDefaultValue().equals(other.getDefaultValue())) return false; } if (getRedact() != other.getRedact()) return false; + if (hasAdvancedSettings() != other.hasAdvancedSettings()) return false; + if (hasAdvancedSettings()) { + if (!getAdvancedSettings().equals(other.getAdvancedSettings())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3026,6 +3128,10 @@ public int hashCode() { } hash = (37 * hash) + REDACT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRedact()); + if (hasAdvancedSettings()) { + hash = (37 * hash) + ADVANCED_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3183,6 +3289,11 @@ public Builder clear() { defaultValueBuilder_ = null; } redact_ = false; + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } return this; } @@ -3242,6 +3353,12 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter if (((from_bitField0_ & 0x00000040) != 0)) { result.redact_ = redact_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.advancedSettings_ = + advancedSettingsBuilder_ == null + ? advancedSettings_ + : advancedSettingsBuilder_.build(); + } } @java.lang.Override @@ -3317,6 +3434,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter o if (other.getRedact() != false) { setRedact(other.getRedact()); } + if (other.hasAdvancedSettings()) { + mergeAdvancedSettings(other.getAdvancedSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3385,6 +3505,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 88 + case 98: + { + input.readMessage( + getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4242,6 +4369,204 @@ public Builder clearRedact() { return this; } + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + advancedSettingsBuilder_; + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + * + * @return Whether the advancedSettings field is set. + */ + public boolean hasAdvancedSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + * + * @return The advancedSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + if (advancedSettingsBuilder_ == null) { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } else { + return advancedSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedSettings_ = value; + } else { + advancedSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder builderForValue) { + if (advancedSettingsBuilder_ == null) { + advancedSettings_ = builderForValue.build(); + } else { + advancedSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + public Builder mergeAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && advancedSettings_ != null + && advancedSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance()) { + getAdvancedSettingsBuilder().mergeFrom(value); + } else { + advancedSettings_ = value; + } + } else { + advancedSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + public Builder clearAdvancedSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder + getAdvancedSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getAdvancedSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + if (advancedSettingsBuilder_ != null) { + return advancedSettingsBuilder_.getMessageOrBuilder(); + } else { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + } + /** + * + * + *
+       * Hierarchical advanced settings for this parameter. The settings exposed
+       * at the lower level overrides the settings exposed at the higher level.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + getAdvancedSettingsFieldBuilder() { + if (advancedSettingsBuilder_ == null) { + advancedSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder>( + getAdvancedSettings(), getParentForChildren(), isClean()); + advancedSettings_ = null; + } + return advancedSettingsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Fulfillment.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Fulfillment.java index 4cdc47f2b770..5fb72797b3c4 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Fulfillment.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Fulfillment.java @@ -5232,6 +5232,82 @@ public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases getCo return conditionalCases_.get(index); } + public static final int ADVANCED_SETTINGS_FIELD_NUMBER = 7; + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + /** + * + * + *
+   * Hierarchical advanced settings for this fulfillment. The settings exposed
+   * at the lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + * + * @return Whether the advancedSettings field is set. + */ + @java.lang.Override + public boolean hasAdvancedSettings() { + return advancedSettings_ != null; + } + /** + * + * + *
+   * Hierarchical advanced settings for this fulfillment. The settings exposed
+   * at the lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + * + * @return The advancedSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + /** + * + * + *
+   * Hierarchical advanced settings for this fulfillment. The settings exposed
+   * at the lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + + public static final int ENABLE_GENERATIVE_FALLBACK_FIELD_NUMBER = 12; + private boolean enableGenerativeFallback_ = false; + /** + * + * + *
+   * If the flag is true, the agent will utilize LLM to generate a text
+   * response. If LLM generation fails, the defined
+   * [responses][google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages] in the
+   * fulfillment will be respected. This flag is only useful for fulfillments
+   * associated with no-match event handlers.
+   * 
+ * + * bool enable_generative_fallback = 12; + * + * @return The enableGenerativeFallback. + */ + @java.lang.Override + public boolean getEnableGenerativeFallback() { + return enableGenerativeFallback_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -5261,9 +5337,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < conditionalCases_.size(); i++) { output.writeMessage(5, conditionalCases_.get(i)); } + if (advancedSettings_ != null) { + output.writeMessage(7, getAdvancedSettings()); + } if (returnPartialResponses_ != false) { output.writeBool(8, returnPartialResponses_); } + if (enableGenerativeFallback_ != false) { + output.writeBool(12, enableGenerativeFallback_); + } getUnknownFields().writeTo(output); } @@ -5289,9 +5371,15 @@ public int getSerializedSize() { for (int i = 0; i < conditionalCases_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, conditionalCases_.get(i)); } + if (advancedSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAdvancedSettings()); + } if (returnPartialResponses_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, returnPartialResponses_); } + if (enableGenerativeFallback_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, enableGenerativeFallback_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -5314,6 +5402,11 @@ public boolean equals(final java.lang.Object obj) { if (!getTag().equals(other.getTag())) return false; if (!getSetParameterActionsList().equals(other.getSetParameterActionsList())) return false; if (!getConditionalCasesList().equals(other.getConditionalCasesList())) return false; + if (hasAdvancedSettings() != other.hasAdvancedSettings()) return false; + if (hasAdvancedSettings()) { + if (!getAdvancedSettings().equals(other.getAdvancedSettings())) return false; + } + if (getEnableGenerativeFallback() != other.getEnableGenerativeFallback()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5343,6 +5436,12 @@ public int hashCode() { hash = (37 * hash) + CONDITIONAL_CASES_FIELD_NUMBER; hash = (53 * hash) + getConditionalCasesList().hashCode(); } + if (hasAdvancedSettings()) { + hash = (37 * hash) + ADVANCED_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedSettings().hashCode(); + } + hash = (37 * hash) + ENABLE_GENERATIVE_FALLBACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableGenerativeFallback()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -5522,6 +5621,12 @@ public Builder clear() { conditionalCasesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } + enableGenerativeFallback_ = false; return this; } @@ -5599,6 +5704,13 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Fulfillment re if (((from_bitField0_ & 0x00000008) != 0)) { result.tag_ = tag_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.advancedSettings_ = + advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.enableGenerativeFallback_ = enableGenerativeFallback_; + } } @java.lang.Override @@ -5741,6 +5853,12 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Fulfillment othe } } } + if (other.hasAdvancedSettings()) { + mergeAdvancedSettings(other.getAdvancedSettings()); + } + if (other.getEnableGenerativeFallback() != false) { + setEnableGenerativeFallback(other.getEnableGenerativeFallback()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -5823,12 +5941,25 @@ public Builder mergeFrom( } break; } // case 42 + case 58: + { + input.readMessage( + getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 case 64: { returnPartialResponses_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 64 + case 96: + { + enableGenerativeFallback_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 96 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7368,6 +7499,269 @@ public Builder removeConditionalCases(int index) { return conditionalCasesBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + advancedSettingsBuilder_; + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + * + * @return Whether the advancedSettings field is set. + */ + public boolean hasAdvancedSettings() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + * + * @return The advancedSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + if (advancedSettingsBuilder_ == null) { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } else { + return advancedSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedSettings_ = value; + } else { + advancedSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder builderForValue) { + if (advancedSettingsBuilder_ == null) { + advancedSettings_ = builderForValue.build(); + } else { + advancedSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + public Builder mergeAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && advancedSettings_ != null + && advancedSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance()) { + getAdvancedSettingsBuilder().mergeFrom(value); + } else { + advancedSettings_ = value; + } + } else { + advancedSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + public Builder clearAdvancedSettings() { + bitField0_ = (bitField0_ & ~0x00000040); + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder + getAdvancedSettingsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getAdvancedSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + if (advancedSettingsBuilder_ != null) { + return advancedSettingsBuilder_.getMessageOrBuilder(); + } else { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + } + /** + * + * + *
+     * Hierarchical advanced settings for this fulfillment. The settings exposed
+     * at the lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + getAdvancedSettingsFieldBuilder() { + if (advancedSettingsBuilder_ == null) { + advancedSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder>( + getAdvancedSettings(), getParentForChildren(), isClean()); + advancedSettings_ = null; + } + return advancedSettingsBuilder_; + } + + private boolean enableGenerativeFallback_; + /** + * + * + *
+     * If the flag is true, the agent will utilize LLM to generate a text
+     * response. If LLM generation fails, the defined
+     * [responses][google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages] in the
+     * fulfillment will be respected. This flag is only useful for fulfillments
+     * associated with no-match event handlers.
+     * 
+ * + * bool enable_generative_fallback = 12; + * + * @return The enableGenerativeFallback. + */ + @java.lang.Override + public boolean getEnableGenerativeFallback() { + return enableGenerativeFallback_; + } + /** + * + * + *
+     * If the flag is true, the agent will utilize LLM to generate a text
+     * response. If LLM generation fails, the defined
+     * [responses][google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages] in the
+     * fulfillment will be respected. This flag is only useful for fulfillments
+     * associated with no-match event handlers.
+     * 
+ * + * bool enable_generative_fallback = 12; + * + * @param value The enableGenerativeFallback to set. + * @return This builder for chaining. + */ + public Builder setEnableGenerativeFallback(boolean value) { + + enableGenerativeFallback_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * If the flag is true, the agent will utilize LLM to generate a text
+     * response. If LLM generation fails, the defined
+     * [responses][google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages] in the
+     * fulfillment will be respected. This flag is only useful for fulfillments
+     * associated with no-match event handlers.
+     * 
+ * + * bool enable_generative_fallback = 12; + * + * @return This builder for chaining. + */ + public Builder clearEnableGenerativeFallback() { + bitField0_ = (bitField0_ & ~0x00000080); + enableGenerativeFallback_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentOrBuilder.java index 0b5c3be4468f..e14ba52c7325 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentOrBuilder.java @@ -293,4 +293,59 @@ com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases getCondition */ com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCasesOrBuilder getConditionalCasesOrBuilder(int index); + + /** + * + * + *
+   * Hierarchical advanced settings for this fulfillment. The settings exposed
+   * at the lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + * + * @return Whether the advancedSettings field is set. + */ + boolean hasAdvancedSettings(); + /** + * + * + *
+   * Hierarchical advanced settings for this fulfillment. The settings exposed
+   * at the lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + * + * @return The advancedSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings(); + /** + * + * + *
+   * Hierarchical advanced settings for this fulfillment. The settings exposed
+   * at the lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 7; + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder(); + + /** + * + * + *
+   * If the flag is true, the agent will utilize LLM to generate a text
+   * response. If LLM generation fails, the defined
+   * [responses][google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages] in the
+   * fulfillment will be respected. This flag is only useful for fulfillments
+   * associated with no-match event handlers.
+   * 
+ * + * bool enable_generative_fallback = 12; + * + * @return The enableGenerativeFallback. + */ + boolean getEnableGenerativeFallback(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentProto.java index b6100f62b3e5..c6b0a6bcd3a0 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FulfillmentProto.java @@ -58,44 +58,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n4google/cloud/dialogflow/cx/v3beta1/ful" + "fillment.proto\022\"google.cloud.dialogflow." - + "cx.v3beta1\032\031google/api/resource.proto\0329g" - + "oogle/cloud/dialogflow/cx/v3beta1/respon" - + "se_message.proto\032\034google/protobuf/struct" - + ".proto\"\206\007\n\013Fulfillment\022E\n\010messages\030\001 \003(\013" - + "23.google.cloud.dialogflow.cx.v3beta1.Re" - + "sponseMessage\0227\n\007webhook\030\002 \001(\tB&\372A#\n!dia" - + "logflow.googleapis.com/Webhook\022 \n\030return" - + "_partial_responses\030\010 \001(\010\022\013\n\003tag\030\003 \001(\t\022a\n" - + "\025set_parameter_actions\030\004 \003(\0132B.google.cl" - + "oud.dialogflow.cx.v3beta1.Fulfillment.Se" - + "tParameterAction\022[\n\021conditional_cases\030\005 " - + "\003(\0132@.google.cloud.dialogflow.cx.v3beta1" - + ".Fulfillment.ConditionalCases\032N\n\022SetPara" - + "meterAction\022\021\n\tparameter\030\001 \001(\t\022%\n\005value\030" - + "\002 \001(\0132\026.google.protobuf.Value\032\267\003\n\020Condit" - + "ionalCases\022T\n\005cases\030\001 \003(\0132E.google.cloud" - + ".dialogflow.cx.v3beta1.Fulfillment.Condi" - + "tionalCases.Case\032\314\002\n\004Case\022\021\n\tcondition\030\001" - + " \001(\t\022g\n\014case_content\030\002 \003(\0132Q.google.clou" - + "d.dialogflow.cx.v3beta1.Fulfillment.Cond" - + "itionalCases.Case.CaseContent\032\307\001\n\013CaseCo" - + "ntent\022F\n\007message\030\001 \001(\01323.google.cloud.di" - + "alogflow.cx.v3beta1.ResponseMessageH\000\022\\\n" - + "\020additional_cases\030\002 \001(\0132@.google.cloud.d" + + "cx.v3beta1\032\031google/api/resource.proto\032:g" + + "oogle/cloud/dialogflow/cx/v3beta1/advanc" + + "ed_settings.proto\0329google/cloud/dialogfl" + + "ow/cx/v3beta1/response_message.proto\032\034go" + + "ogle/protobuf/struct.proto\"\373\007\n\013Fulfillme" + + "nt\022E\n\010messages\030\001 \003(\01323.google.cloud.dial" + + "ogflow.cx.v3beta1.ResponseMessage\0227\n\007web" + + "hook\030\002 \001(\tB&\372A#\n!dialogflow.googleapis.c" + + "om/Webhook\022 \n\030return_partial_responses\030\010" + + " \001(\010\022\013\n\003tag\030\003 \001(\t\022a\n\025set_parameter_actio" + + "ns\030\004 \003(\0132B.google.cloud.dialogflow.cx.v3" + + "beta1.Fulfillment.SetParameterAction\022[\n\021" + + "conditional_cases\030\005 \003(\0132@.google.cloud.d" + "ialogflow.cx.v3beta1.Fulfillment.Conditi" - + "onalCasesH\000B\022\n\020cases_or_messageB\312\001\n&com." - + "google.cloud.dialogflow.cx.v3beta1B\020Fulf" - + "illmentProtoP\001Z6cloud.google.com/go/dial" - + "ogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002" - + "\"Google.Cloud.Dialogflow.Cx.V3Beta1\352\002&Go" - + "ogle::Cloud::Dialogflow::CX::V3beta1b\006pr" - + "oto3" + + "onalCases\022O\n\021advanced_settings\030\007 \001(\01324.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Advanc" + + "edSettings\022\"\n\032enable_generative_fallback" + + "\030\014 \001(\010\032N\n\022SetParameterAction\022\021\n\tparamete" + + "r\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf" + + ".Value\032\267\003\n\020ConditionalCases\022T\n\005cases\030\001 \003" + + "(\0132E.google.cloud.dialogflow.cx.v3beta1." + + "Fulfillment.ConditionalCases.Case\032\314\002\n\004Ca" + + "se\022\021\n\tcondition\030\001 \001(\t\022g\n\014case_content\030\002 " + + "\003(\0132Q.google.cloud.dialogflow.cx.v3beta1" + + ".Fulfillment.ConditionalCases.Case.CaseC" + + "ontent\032\307\001\n\013CaseContent\022F\n\007message\030\001 \001(\0132" + + "3.google.cloud.dialogflow.cx.v3beta1.Res" + + "ponseMessageH\000\022\\\n\020additional_cases\030\002 \001(\013" + + "2@.google.cloud.dialogflow.cx.v3beta1.Fu" + + "lfillment.ConditionalCasesH\000B\022\n\020cases_or" + + "_messageB\312\001\n&com.google.cloud.dialogflow" + + ".cx.v3beta1B\020FulfillmentProtoP\001Z6cloud.g" + + "oogle.com/go/dialogflow/cx/apiv3beta1/cx" + + "pb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflo" + + "w.Cx.V3Beta1\352\002&Google::Cloud::Dialogflow" + + "::CX::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); @@ -111,6 +116,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Tag", "SetParameterActions", "ConditionalCases", + "AdvancedSettings", + "EnableGenerativeFallback", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Fulfillment_SetParameterAction_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_Fulfillment_descriptor @@ -158,6 +165,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsMetadata.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsMetadata.java new file mode 100644 index 000000000000..932f936be181 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsMetadata.java @@ -0,0 +1,439 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the
+ * [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents]
+ * long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata} + */ +public final class ImportIntentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata) + ImportIntentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportIntentsMetadata.newBuilder() to construct. + private ImportIntentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportIntentsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportIntentsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the
+   * [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents]
+   * long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata) + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportIntentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsMetadataOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsMetadataOrBuilder.java new file mode 100644 index 000000000000..c49e30a2bedc --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportIntentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsRequest.java new file mode 100644 index 000000000000..d863bb5057d6 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsRequest.java @@ -0,0 +1,1765 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest} + */ +public final class ImportIntentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) + ImportIntentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportIntentsRequest.newBuilder() to construct. + private ImportIntentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportIntentsRequest() { + parent_ = ""; + mergeOption_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportIntentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.Builder.class); + } + + /** + * + * + *
+   * Merge option when display name conflicts exist during import.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption} + */ + public enum MergeOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified. Should not be used.
+     * 
+ * + * MERGE_OPTION_UNSPECIFIED = 0; + */ + MERGE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * DEPRECATED: Please use
+     * [REPORT_CONFLICT][ImportIntentsRequest.REPORT_CONFLICT] instead.
+     * Fail the request if there are intents whose display names conflict with
+     * the display names of intents in the agent.
+     * 
+ * + * REJECT = 1 [deprecated = true]; + */ + @java.lang.Deprecated + REJECT(1), + /** + * + * + *
+     * Replace the original intent in the agent with the new intent when display
+     * name conflicts exist.
+     * 
+ * + * REPLACE = 2; + */ + REPLACE(2), + /** + * + * + *
+     * Merge the original intent with the new intent when display name conflicts
+     * exist.
+     * 
+ * + * MERGE = 3; + */ + MERGE(3), + /** + * + * + *
+     * Create new intents with new display names to differentiate them from the
+     * existing intents when display name conflicts exist.
+     * 
+ * + * RENAME = 4; + */ + RENAME(4), + /** + * + * + *
+     * Report conflict information if display names conflict is detected.
+     * Otherwise, import intents.
+     * 
+ * + * REPORT_CONFLICT = 5; + */ + REPORT_CONFLICT(5), + /** + * + * + *
+     * Keep the original intent and discard the conflicting new intent when
+     * display name conflicts exist.
+     * 
+ * + * KEEP = 6; + */ + KEEP(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified. Should not be used.
+     * 
+ * + * MERGE_OPTION_UNSPECIFIED = 0; + */ + public static final int MERGE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * DEPRECATED: Please use
+     * [REPORT_CONFLICT][ImportIntentsRequest.REPORT_CONFLICT] instead.
+     * Fail the request if there are intents whose display names conflict with
+     * the display names of intents in the agent.
+     * 
+ * + * REJECT = 1 [deprecated = true]; + */ + @java.lang.Deprecated public static final int REJECT_VALUE = 1; + /** + * + * + *
+     * Replace the original intent in the agent with the new intent when display
+     * name conflicts exist.
+     * 
+ * + * REPLACE = 2; + */ + public static final int REPLACE_VALUE = 2; + /** + * + * + *
+     * Merge the original intent with the new intent when display name conflicts
+     * exist.
+     * 
+ * + * MERGE = 3; + */ + public static final int MERGE_VALUE = 3; + /** + * + * + *
+     * Create new intents with new display names to differentiate them from the
+     * existing intents when display name conflicts exist.
+     * 
+ * + * RENAME = 4; + */ + public static final int RENAME_VALUE = 4; + /** + * + * + *
+     * Report conflict information if display names conflict is detected.
+     * Otherwise, import intents.
+     * 
+ * + * REPORT_CONFLICT = 5; + */ + public static final int REPORT_CONFLICT_VALUE = 5; + /** + * + * + *
+     * Keep the original intent and discard the conflicting new intent when
+     * display name conflicts exist.
+     * 
+ * + * KEEP = 6; + */ + public static final int KEEP_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MergeOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MergeOption forNumber(int value) { + switch (value) { + case 0: + return MERGE_OPTION_UNSPECIFIED; + case 1: + return REJECT; + case 2: + return REPLACE; + case 3: + return MERGE; + case 4: + return RENAME; + case 5: + return REPORT_CONFLICT; + case 6: + return KEEP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MergeOption findValueByNumber(int number) { + return MergeOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MergeOption[] VALUES = values(); + + public static MergeOption valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MergeOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption) + } + + private int intentsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object intents_; + + public enum IntentsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTENTS_URI(2), + INTENTS_CONTENT(3), + INTENTS_NOT_SET(0); + private final int value; + + private IntentsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IntentsCase valueOf(int value) { + return forNumber(value); + } + + public static IntentsCase forNumber(int value) { + switch (value) { + case 2: + return INTENTS_URI; + case 3: + return INTENTS_CONTENT; + case 0: + return INTENTS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IntentsCase getIntentsCase() { + return IntentsCase.forNumber(intentsCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The agent to import the intents into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to import the intents into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENTS_URI_FIELD_NUMBER = 2; + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import intents from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 2; + * + * @return Whether the intentsUri field is set. + */ + public boolean hasIntentsUri() { + return intentsCase_ == 2; + } + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import intents from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 2; + * + * @return The intentsUri. + */ + public java.lang.String getIntentsUri() { + java.lang.Object ref = ""; + if (intentsCase_ == 2) { + ref = intents_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (intentsCase_ == 2) { + intents_ = s; + } + return s; + } + } + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import intents from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 2; + * + * @return The bytes for intentsUri. + */ + public com.google.protobuf.ByteString getIntentsUriBytes() { + java.lang.Object ref = ""; + if (intentsCase_ == 2) { + ref = intents_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (intentsCase_ == 2) { + intents_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTENTS_CONTENT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Uncompressed byte content of intents.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + * + * @return Whether the intentsContent field is set. + */ + @java.lang.Override + public boolean hasIntentsContent() { + return intentsCase_ == 3; + } + /** + * + * + *
+   * Uncompressed byte content of intents.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + * + * @return The intentsContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource getIntentsContent() { + if (intentsCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) intents_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + /** + * + * + *
+   * Uncompressed byte content of intents.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder getIntentsContentOrBuilder() { + if (intentsCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) intents_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + + public static final int MERGE_OPTION_FIELD_NUMBER = 4; + private int mergeOption_ = 0; + /** + * + * + *
+   * Merge option for importing intents. If not specified, `REJECT` is assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + @java.lang.Override + public int getMergeOptionValue() { + return mergeOption_; + } + /** + * + * + *
+   * Merge option for importing intents. If not specified, `REJECT` is assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @return The mergeOption. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption getMergeOption() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption result = + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption.forNumber( + mergeOption_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (intentsCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, intents_); + } + if (intentsCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) intents_); + } + if (mergeOption_ + != com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption + .MERGE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, mergeOption_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (intentsCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, intents_); + } + if (intentsCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) intents_); + } + if (mergeOption_ + != com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption + .MERGE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mergeOption_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (mergeOption_ != other.mergeOption_) return false; + if (!getIntentsCase().equals(other.getIntentsCase())) return false; + switch (intentsCase_) { + case 2: + if (!getIntentsUri().equals(other.getIntentsUri())) return false; + break; + case 3: + if (!getIntentsContent().equals(other.getIntentsContent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + MERGE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + mergeOption_; + switch (intentsCase_) { + case 2: + hash = (37 * hash) + INTENTS_URI_FIELD_NUMBER; + hash = (53 * hash) + getIntentsUri().hashCode(); + break; + case 3: + hash = (37 * hash) + INTENTS_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getIntentsContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (intentsContentBuilder_ != null) { + intentsContentBuilder_.clear(); + } + mergeOption_ = 0; + intentsCase_ = 0; + intents_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mergeOption_ = mergeOption_; + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest result) { + result.intentsCase_ = intentsCase_; + result.intents_ = this.intents_; + if (intentsCase_ == 3 && intentsContentBuilder_ != null) { + result.intents_ = intentsContentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.mergeOption_ != 0) { + setMergeOptionValue(other.getMergeOptionValue()); + } + switch (other.getIntentsCase()) { + case INTENTS_URI: + { + intentsCase_ = 2; + intents_ = other.intents_; + onChanged(); + break; + } + case INTENTS_CONTENT: + { + mergeIntentsContent(other.getIntentsContent()); + break; + } + case INTENTS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + intentsCase_ = 2; + intents_ = s; + break; + } // case 18 + case 26: + { + input.readMessage(getIntentsContentFieldBuilder().getBuilder(), extensionRegistry); + intentsCase_ = 3; + break; + } // case 26 + case 32: + { + mergeOption_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int intentsCase_ = 0; + private java.lang.Object intents_; + + public IntentsCase getIntentsCase() { + return IntentsCase.forNumber(intentsCase_); + } + + public Builder clearIntents() { + intentsCase_ = 0; + intents_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to import the intents into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to import the intents into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to import the intents into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to import the intents into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to import the intents into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import intents from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 2; + * + * @return Whether the intentsUri field is set. + */ + @java.lang.Override + public boolean hasIntentsUri() { + return intentsCase_ == 2; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import intents from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 2; + * + * @return The intentsUri. + */ + @java.lang.Override + public java.lang.String getIntentsUri() { + java.lang.Object ref = ""; + if (intentsCase_ == 2) { + ref = intents_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (intentsCase_ == 2) { + intents_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import intents from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 2; + * + * @return The bytes for intentsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIntentsUriBytes() { + java.lang.Object ref = ""; + if (intentsCase_ == 2) { + ref = intents_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (intentsCase_ == 2) { + intents_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import intents from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 2; + * + * @param value The intentsUri to set. + * @return This builder for chaining. + */ + public Builder setIntentsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + intentsCase_ = 2; + intents_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import intents from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearIntentsUri() { + if (intentsCase_ == 2) { + intentsCase_ = 0; + intents_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import intents from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string intents_uri = 2; + * + * @param value The bytes for intentsUri to set. + * @return This builder for chaining. + */ + public Builder setIntentsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + intentsCase_ = 2; + intents_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineSource, + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder> + intentsContentBuilder_; + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + * + * @return Whether the intentsContent field is set. + */ + @java.lang.Override + public boolean hasIntentsContent() { + return intentsCase_ == 3; + } + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + * + * @return The intentsContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource getIntentsContent() { + if (intentsContentBuilder_ == null) { + if (intentsCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) intents_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } else { + if (intentsCase_ == 3) { + return intentsContentBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + public Builder setIntentsContent(com.google.cloud.dialogflow.cx.v3beta1.InlineSource value) { + if (intentsContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intents_ = value; + onChanged(); + } else { + intentsContentBuilder_.setMessage(value); + } + intentsCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + public Builder setIntentsContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder builderForValue) { + if (intentsContentBuilder_ == null) { + intents_ = builderForValue.build(); + onChanged(); + } else { + intentsContentBuilder_.setMessage(builderForValue.build()); + } + intentsCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + public Builder mergeIntentsContent(com.google.cloud.dialogflow.cx.v3beta1.InlineSource value) { + if (intentsContentBuilder_ == null) { + if (intentsCase_ == 3 + && intents_ + != com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance()) { + intents_ = + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) intents_) + .mergeFrom(value) + .buildPartial(); + } else { + intents_ = value; + } + onChanged(); + } else { + if (intentsCase_ == 3) { + intentsContentBuilder_.mergeFrom(value); + } else { + intentsContentBuilder_.setMessage(value); + } + } + intentsCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + public Builder clearIntentsContent() { + if (intentsContentBuilder_ == null) { + if (intentsCase_ == 3) { + intentsCase_ = 0; + intents_ = null; + onChanged(); + } + } else { + if (intentsCase_ == 3) { + intentsCase_ = 0; + intents_ = null; + } + intentsContentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder getIntentsContentBuilder() { + return getIntentsContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder + getIntentsContentOrBuilder() { + if ((intentsCase_ == 3) && (intentsContentBuilder_ != null)) { + return intentsContentBuilder_.getMessageOrBuilder(); + } else { + if (intentsCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) intents_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content of intents.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineSource, + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder> + getIntentsContentFieldBuilder() { + if (intentsContentBuilder_ == null) { + if (!(intentsCase_ == 3)) { + intents_ = com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + intentsContentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineSource, + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) intents_, + getParentForChildren(), + isClean()); + intents_ = null; + } + intentsCase_ = 3; + onChanged(); + return intentsContentBuilder_; + } + + private int mergeOption_ = 0; + /** + * + * + *
+     * Merge option for importing intents. If not specified, `REJECT` is assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + @java.lang.Override + public int getMergeOptionValue() { + return mergeOption_; + } + /** + * + * + *
+     * Merge option for importing intents. If not specified, `REJECT` is assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @param value The enum numeric value on the wire for mergeOption to set. + * @return This builder for chaining. + */ + public Builder setMergeOptionValue(int value) { + mergeOption_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Merge option for importing intents. If not specified, `REJECT` is assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @return The mergeOption. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption + getMergeOption() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption result = + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption.forNumber( + mergeOption_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Merge option for importing intents. If not specified, `REJECT` is assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @param value The mergeOption to set. + * @return This builder for chaining. + */ + public Builder setMergeOption( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + mergeOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Merge option for importing intents. If not specified, `REJECT` is assumed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearMergeOption() { + bitField0_ = (bitField0_ & ~0x00000008); + mergeOption_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportIntentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsRequestOrBuilder.java new file mode 100644 index 000000000000..cf58126d2de9 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsRequestOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportIntentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to import the intents into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to import the intents into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import intents from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 2; + * + * @return Whether the intentsUri field is set. + */ + boolean hasIntentsUri(); + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import intents from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 2; + * + * @return The intentsUri. + */ + java.lang.String getIntentsUri(); + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import intents from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string intents_uri = 2; + * + * @return The bytes for intentsUri. + */ + com.google.protobuf.ByteString getIntentsUriBytes(); + + /** + * + * + *
+   * Uncompressed byte content of intents.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + * + * @return Whether the intentsContent field is set. + */ + boolean hasIntentsContent(); + /** + * + * + *
+   * Uncompressed byte content of intents.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + * + * @return The intentsContent. + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineSource getIntentsContent(); + /** + * + * + *
+   * Uncompressed byte content of intents.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource intents_content = 3; + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder getIntentsContentOrBuilder(); + + /** + * + * + *
+   * Merge option for importing intents. If not specified, `REJECT` is assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + int getMergeOptionValue(); + /** + * + * + *
+   * Merge option for importing intents. If not specified, `REJECT` is assumed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption merge_option = 4; + * + * + * @return The mergeOption. + */ + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.MergeOption getMergeOption(); + + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest.IntentsCase getIntentsCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsResponse.java new file mode 100644 index 000000000000..834bc99a8571 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsResponse.java @@ -0,0 +1,2225 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse} + */ +public final class ImportIntentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse) + ImportIntentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportIntentsResponse.newBuilder() to construct. + private ImportIntentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportIntentsResponse() { + intents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportIntentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.Builder.class); + } + + public interface ConflictingResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Display names of conflicting intents.
+     * 
+ * + * repeated string intent_display_names = 1; + * + * @return A list containing the intentDisplayNames. + */ + java.util.List getIntentDisplayNamesList(); + /** + * + * + *
+     * Display names of conflicting intents.
+     * 
+ * + * repeated string intent_display_names = 1; + * + * @return The count of intentDisplayNames. + */ + int getIntentDisplayNamesCount(); + /** + * + * + *
+     * Display names of conflicting intents.
+     * 
+ * + * repeated string intent_display_names = 1; + * + * @param index The index of the element to return. + * @return The intentDisplayNames at the given index. + */ + java.lang.String getIntentDisplayNames(int index); + /** + * + * + *
+     * Display names of conflicting intents.
+     * 
+ * + * repeated string intent_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the intentDisplayNames at the given index. + */ + com.google.protobuf.ByteString getIntentDisplayNamesBytes(int index); + + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + java.util.List getEntityDisplayNamesList(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + int getEntityDisplayNamesCount(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + java.lang.String getEntityDisplayNames(int index); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index); + } + /** + * + * + *
+   * Conflicting resources detected during the import process. Only filled when
+   * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] is set in the
+   * request and there are conflicts in the display names.
+   * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources} + */ + public static final class ConflictingResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources) + ConflictingResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConflictingResources.newBuilder() to construct. + private ConflictingResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConflictingResources() { + intentDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConflictingResources(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .class, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .Builder.class); + } + + public static final int INTENT_DISPLAY_NAMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList intentDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Display names of conflicting intents.
+     * 
+ * + * repeated string intent_display_names = 1; + * + * @return A list containing the intentDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getIntentDisplayNamesList() { + return intentDisplayNames_; + } + /** + * + * + *
+     * Display names of conflicting intents.
+     * 
+ * + * repeated string intent_display_names = 1; + * + * @return The count of intentDisplayNames. + */ + public int getIntentDisplayNamesCount() { + return intentDisplayNames_.size(); + } + /** + * + * + *
+     * Display names of conflicting intents.
+     * 
+ * + * repeated string intent_display_names = 1; + * + * @param index The index of the element to return. + * @return The intentDisplayNames at the given index. + */ + public java.lang.String getIntentDisplayNames(int index) { + return intentDisplayNames_.get(index); + } + /** + * + * + *
+     * Display names of conflicting intents.
+     * 
+ * + * repeated string intent_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the intentDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getIntentDisplayNamesBytes(int index) { + return intentDisplayNames_.getByteString(index); + } + + public static final int ENTITY_DISPLAY_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityDisplayNamesList() { + return entityDisplayNames_; + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + public int getEntityDisplayNamesCount() { + return entityDisplayNames_.size(); + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + public java.lang.String getEntityDisplayNames(int index) { + return entityDisplayNames_.get(index); + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index) { + return entityDisplayNames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < intentDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, intentDisplayNames_.getRaw(i)); + } + for (int i = 0; i < entityDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, entityDisplayNames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < intentDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(intentDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getIntentDisplayNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < entityDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(entityDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityDisplayNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources) obj; + + if (!getIntentDisplayNamesList().equals(other.getIntentDisplayNamesList())) return false; + if (!getEntityDisplayNamesList().equals(other.getEntityDisplayNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIntentDisplayNamesCount() > 0) { + hash = (37 * hash) + INTENT_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getIntentDisplayNamesList().hashCode(); + } + if (getEntityDisplayNamesCount() > 0) { + hash = (37 * hash) + ENTITY_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getEntityDisplayNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Conflicting resources detected during the import process. Only filled when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] is set in the
+     * request and there are conflicts in the display names.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources) + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .class, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + intentDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + intentDisplayNames_.makeImmutable(); + result.intentDisplayNames_ = intentDisplayNames_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + entityDisplayNames_.makeImmutable(); + result.entityDisplayNames_ = entityDisplayNames_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .getDefaultInstance()) return this; + if (!other.intentDisplayNames_.isEmpty()) { + if (intentDisplayNames_.isEmpty()) { + intentDisplayNames_ = other.intentDisplayNames_; + bitField0_ |= 0x00000001; + } else { + ensureIntentDisplayNamesIsMutable(); + intentDisplayNames_.addAll(other.intentDisplayNames_); + } + onChanged(); + } + if (!other.entityDisplayNames_.isEmpty()) { + if (entityDisplayNames_.isEmpty()) { + entityDisplayNames_ = other.entityDisplayNames_; + bitField0_ |= 0x00000002; + } else { + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.addAll(other.entityDisplayNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIntentDisplayNamesIsMutable(); + intentDisplayNames_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList intentDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIntentDisplayNamesIsMutable() { + if (!intentDisplayNames_.isModifiable()) { + intentDisplayNames_ = new com.google.protobuf.LazyStringArrayList(intentDisplayNames_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @return A list containing the intentDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getIntentDisplayNamesList() { + intentDisplayNames_.makeImmutable(); + return intentDisplayNames_; + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @return The count of intentDisplayNames. + */ + public int getIntentDisplayNamesCount() { + return intentDisplayNames_.size(); + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @param index The index of the element to return. + * @return The intentDisplayNames at the given index. + */ + public java.lang.String getIntentDisplayNames(int index) { + return intentDisplayNames_.get(index); + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the intentDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getIntentDisplayNamesBytes(int index) { + return intentDisplayNames_.getByteString(index); + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @param index The index to set the value at. + * @param value The intentDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setIntentDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentDisplayNamesIsMutable(); + intentDisplayNames_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @param value The intentDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addIntentDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentDisplayNamesIsMutable(); + intentDisplayNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @param values The intentDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllIntentDisplayNames(java.lang.Iterable values) { + ensureIntentDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intentDisplayNames_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearIntentDisplayNames() { + intentDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting intents.
+       * 
+ * + * repeated string intent_display_names = 1; + * + * @param value The bytes of the intentDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addIntentDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIntentDisplayNamesIsMutable(); + intentDisplayNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList entityDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityDisplayNamesIsMutable() { + if (!entityDisplayNames_.isModifiable()) { + entityDisplayNames_ = new com.google.protobuf.LazyStringArrayList(entityDisplayNames_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityDisplayNamesList() { + entityDisplayNames_.makeImmutable(); + return entityDisplayNames_; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + public int getEntityDisplayNamesCount() { + return entityDisplayNames_.size(); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + public java.lang.String getEntityDisplayNames(int index) { + return entityDisplayNames_.get(index); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index) { + return entityDisplayNames_.getByteString(index); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index to set the value at. + * @param value The entityDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setEntityDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param value The entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param values The entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllEntityDisplayNames(java.lang.Iterable values) { + ensureEntityDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityDisplayNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearEntityDisplayNames() { + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param value The bytes of the entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse + .ConflictingResources + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConflictingResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int INTENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList intents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The unique identifier of the imported intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the intents. + */ + public com.google.protobuf.ProtocolStringList getIntentsList() { + return intents_; + } + /** + * + * + *
+   * The unique identifier of the imported intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of intents. + */ + public int getIntentsCount() { + return intents_.size(); + } + /** + * + * + *
+   * The unique identifier of the imported intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The intents at the given index. + */ + public java.lang.String getIntents(int index) { + return intents_.get(index); + } + /** + * + * + *
+   * The unique identifier of the imported intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the intents at the given index. + */ + public com.google.protobuf.ByteString getIntentsBytes(int index) { + return intents_.getByteString(index); + } + + public static final int CONFLICTING_RESOURCES_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + conflictingResources_; + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+   * set in ImportIntentsRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + @java.lang.Override + public boolean hasConflictingResources() { + return conflictingResources_ != null; + } + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+   * set in ImportIntentsRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + getConflictingResources() { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+   * set in ImportIntentsRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder() { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < intents_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, intents_.getRaw(i)); + } + if (conflictingResources_ != null) { + output.writeMessage(2, getConflictingResources()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < intents_.size(); i++) { + dataSize += computeStringSizeNoTag(intents_.getRaw(i)); + } + size += dataSize; + size += 1 * getIntentsList().size(); + } + if (conflictingResources_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConflictingResources()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse) obj; + + if (!getIntentsList().equals(other.getIntentsList())) return false; + if (hasConflictingResources() != other.hasConflictingResources()) return false; + if (hasConflictingResources()) { + if (!getConflictingResources().equals(other.getConflictingResources())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIntentsCount() > 0) { + hash = (37 * hash) + INTENTS_FIELD_NUMBER; + hash = (53 * hash) + getIntentsList().hashCode(); + } + if (hasConflictingResources()) { + hash = (37 * hash) + CONFLICTING_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getConflictingResources().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + intents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + conflictingResources_ = null; + if (conflictingResourcesBuilder_ != null) { + conflictingResourcesBuilder_.dispose(); + conflictingResourcesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.IntentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + intents_.makeImmutable(); + result.intents_ = intents_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.conflictingResources_ = + conflictingResourcesBuilder_ == null + ? conflictingResources_ + : conflictingResourcesBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.getDefaultInstance()) + return this; + if (!other.intents_.isEmpty()) { + if (intents_.isEmpty()) { + intents_ = other.intents_; + bitField0_ |= 0x00000001; + } else { + ensureIntentsIsMutable(); + intents_.addAll(other.intents_); + } + onChanged(); + } + if (other.hasConflictingResources()) { + mergeConflictingResources(other.getConflictingResources()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIntentsIsMutable(); + intents_.add(s); + break; + } // case 10 + case 18: + { + input.readMessage( + getConflictingResourcesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList intents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIntentsIsMutable() { + if (!intents_.isModifiable()) { + intents_ = new com.google.protobuf.LazyStringArrayList(intents_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the intents. + */ + public com.google.protobuf.ProtocolStringList getIntentsList() { + intents_.makeImmutable(); + return intents_; + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of intents. + */ + public int getIntentsCount() { + return intents_.size(); + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The intents at the given index. + */ + public java.lang.String getIntents(int index) { + return intents_.get(index); + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the intents at the given index. + */ + public com.google.protobuf.ByteString getIntentsBytes(int index) { + return intents_.getByteString(index); + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The intents to set. + * @return This builder for chaining. + */ + public Builder setIntents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The intents to add. + * @return This builder for chaining. + */ + public Builder addIntents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntentsIsMutable(); + intents_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param values The intents to add. + * @return This builder for chaining. + */ + public Builder addAllIntents(java.lang.Iterable values) { + ensureIntentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intents_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearIntents() { + intents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported intents.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/intents/<Intent ID>`.
+     * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the intents to add. + * @return This builder for chaining. + */ + public Builder addIntentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIntentsIsMutable(); + intents_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + conflictingResources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse + .ConflictingResourcesOrBuilder> + conflictingResourcesBuilder_; + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + public boolean hasConflictingResources() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + getConflictingResources() { + if (conflictingResourcesBuilder_ == null) { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } else { + return conflictingResourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder setConflictingResources( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources value) { + if (conflictingResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conflictingResources_ = value; + } else { + conflictingResourcesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder setConflictingResources( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources.Builder + builderForValue) { + if (conflictingResourcesBuilder_ == null) { + conflictingResources_ = builderForValue.build(); + } else { + conflictingResourcesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder mergeConflictingResources( + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources value) { + if (conflictingResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && conflictingResources_ != null + && conflictingResources_ + != com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .getDefaultInstance()) { + getConflictingResourcesBuilder().mergeFrom(value); + } else { + conflictingResources_ = value; + } + } else { + conflictingResourcesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder clearConflictingResources() { + bitField0_ = (bitField0_ & ~0x00000002); + conflictingResources_ = null; + if (conflictingResourcesBuilder_ != null) { + conflictingResourcesBuilder_.dispose(); + conflictingResourcesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources.Builder + getConflictingResourcesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConflictingResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse + .ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder() { + if (conflictingResourcesBuilder_ != null) { + return conflictingResourcesBuilder_.getMessageOrBuilder(); + } else { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+     * set in ImportIntentsRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse + .ConflictingResourcesOrBuilder> + getConflictingResourcesFieldBuilder() { + if (conflictingResourcesBuilder_ == null) { + conflictingResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse + .ConflictingResourcesOrBuilder>( + getConflictingResources(), getParentForChildren(), isClean()); + conflictingResources_ = null; + } + return conflictingResourcesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportIntentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsResponseOrBuilder.java new file mode 100644 index 000000000000..04c586988abc --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportIntentsResponseOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportIntentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the imported intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the intents. + */ + java.util.List getIntentsList(); + /** + * + * + *
+   * The unique identifier of the imported intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of intents. + */ + int getIntentsCount(); + /** + * + * + *
+   * The unique identifier of the imported intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The intents at the given index. + */ + java.lang.String getIntents(int index); + /** + * + * + *
+   * The unique identifier of the imported intents.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/intents/<Intent ID>`.
+   * 
+ * + * repeated string intents = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the intents at the given index. + */ + com.google.protobuf.ByteString getIntentsBytes(int index); + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+   * set in ImportIntentsRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + boolean hasConflictingResources(); + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+   * set in ImportIntentsRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources + getConflictingResources(); + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is
+   * set in ImportIntentsRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResources conflicting_resources = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineDestination.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineDestination.java new file mode 100644 index 000000000000..e8879c1b2414 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineDestination.java @@ -0,0 +1,547 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/inline.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Inline destination for a Dialogflow operation that writes or exports objects
+ * (e.g. [intents][google.cloud.dialogflow.cx.v3beta1.Intent]) outside of
+ * Dialogflow.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.InlineDestination} + */ +public final class InlineDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.InlineDestination) + InlineDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use InlineDestination.newBuilder() to construct. + private InlineDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InlineDestination() { + content_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InlineDestination(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.class, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * Output only. The uncompressed byte content for the objects.
+   * Only populated in responses.
+   * 
+ * + * bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!content_.isEmpty()) { + output.writeBytes(1, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.InlineDestination)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination other = + (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Inline destination for a Dialogflow operation that writes or exports objects
+   * (e.g. [intents][google.cloud.dialogflow.cx.v3beta1.Intent]) outside of
+   * Dialogflow.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.InlineDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.InlineDestination) + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.class, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination build() { + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination result = + new com.google.cloud.dialogflow.cx.v3beta1.InlineDestination(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.InlineDestination result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.InlineDestination other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance()) + return this; + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + content_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * Output only. The uncompressed byte content for the objects.
+     * Only populated in responses.
+     * 
+ * + * bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + * + * + *
+     * Output only. The uncompressed byte content for the objects.
+     * Only populated in responses.
+     * 
+ * + * bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The uncompressed byte content for the objects.
+     * Only populated in responses.
+     * 
+ * + * bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000001); + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.InlineDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.InlineDestination) + private static final com.google.cloud.dialogflow.cx.v3beta1.InlineDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.InlineDestination(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineDestinationOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineDestinationOrBuilder.java new file mode 100644 index 000000000000..34c7cf4bdb30 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineDestinationOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/inline.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface InlineDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.InlineDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The uncompressed byte content for the objects.
+   * Only populated in responses.
+   * 
+ * + * bytes content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The content. + */ + com.google.protobuf.ByteString getContent(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineProto.java new file mode 100644 index 000000000000..6c5c2bee6393 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineProto.java @@ -0,0 +1,90 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/inline.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class InlineProto { + private InlineProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/dialogflow/cx/v3beta1/inl" + + "ine.proto\022\"google.cloud.dialogflow.cx.v3" + + "beta1\032\037google/api/field_behavior.proto\"*" + + "\n\021InlineDestination\022\025\n\007content\030\001 \001(\014B\004\342A" + + "\001\003\"\037\n\014InlineSource\022\017\n\007content\030\001 \001(\014B\305\001\n&" + + "com.google.cloud.dialogflow.cx.v3beta1B\013" + + "InlineProtoP\001Z6cloud.google.com/go/dialo" + + "gflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"" + + "Google.Cloud.Dialogflow.Cx.V3Beta1\352\002&Goo" + + "gle::Cloud::Dialogflow::CX::V3beta1b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineDestination_descriptor, + new java.lang.String[] { + "Content", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_descriptor, + new java.lang.String[] { + "Content", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineSource.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineSource.java new file mode 100644 index 000000000000..6f705bc460f2 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineSource.java @@ -0,0 +1,540 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/inline.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Inline source for a Dialogflow operation that reads or imports objects
+ * (e.g. [intents][google.cloud.dialogflow.cx.v3beta1.Intent]) into Dialogflow.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.InlineSource} + */ +public final class InlineSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.InlineSource) + InlineSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use InlineSource.newBuilder() to construct. + private InlineSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InlineSource() { + content_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InlineSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.class, + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * The uncompressed byte content for the objects.
+   * 
+ * + * bytes content = 1; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!content_.isEmpty()) { + output.writeBytes(1, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.InlineSource)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.InlineSource other = + (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.InlineSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Inline source for a Dialogflow operation that reads or imports objects
+   * (e.g. [intents][google.cloud.dialogflow.cx.v3beta1.Intent]) into Dialogflow.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.InlineSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.InlineSource) + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.class, + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.InlineSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_InlineSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource build() { + com.google.cloud.dialogflow.cx.v3beta1.InlineSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.InlineSource result = + new com.google.cloud.dialogflow.cx.v3beta1.InlineSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.InlineSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.InlineSource) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.InlineSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.InlineSource other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance()) + return this; + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + content_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * The uncompressed byte content for the objects.
+     * 
+ * + * bytes content = 1; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + * + * + *
+     * The uncompressed byte content for the objects.
+     * 
+ * + * bytes content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The uncompressed byte content for the objects.
+     * 
+ * + * bytes content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000001); + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.InlineSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.InlineSource) + private static final com.google.cloud.dialogflow.cx.v3beta1.InlineSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.InlineSource(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.InlineSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineSourceOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineSourceOrBuilder.java new file mode 100644 index 000000000000..bd016b35f392 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InlineSourceOrBuilder.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/inline.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface InlineSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.InlineSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The uncompressed byte content for the objects.
+   * 
+ * + * bytes content = 1; + * + * @return The content. + */ + com.google.protobuf.ByteString getContent(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentProto.java index 9ef32da46ebe..951bfde93652 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentProto.java @@ -71,6 +71,34 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteIntentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteIntentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -85,85 +113,130 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "beta1\032\034google/api/annotations.proto\032\027goo" + "gle/api/client.proto\032\037google/api/field_b" + "ehavior.proto\032\031google/api/resource.proto" - + "\032\033google/protobuf/empty.proto\032 google/pr" - + "otobuf/field_mask.proto\"\265\006\n\006Intent\022\014\n\004na" - + "me\030\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022S\n\020" - + "training_phrases\030\003 \003(\01329.google.cloud.di" - + "alogflow.cx.v3beta1.Intent.TrainingPhras" - + "e\022H\n\nparameters\030\004 \003(\01324.google.cloud.dia" - + "logflow.cx.v3beta1.Intent.Parameter\022\020\n\010p" - + "riority\030\005 \001(\005\022\023\n\013is_fallback\030\006 \001(\010\022F\n\006la" - + "bels\030\007 \003(\01326.google.cloud.dialogflow.cx." - + "v3beta1.Intent.LabelsEntry\022\023\n\013descriptio" - + "n\030\010 \001(\t\032\271\001\n\016TrainingPhrase\022\n\n\002id\030\001 \001(\t\022S" - + "\n\005parts\030\002 \003(\0132>.google.cloud.dialogflow." - + "cx.v3beta1.Intent.TrainingPhrase.PartB\004\342" - + "A\001\002\022\024\n\014repeat_count\030\003 \001(\005\0320\n\004Part\022\022\n\004tex" - + "t\030\001 \001(\tB\004\342A\001\002\022\024\n\014parameter_id\030\002 \001(\t\032\202\001\n\t" - + "Parameter\022\020\n\002id\030\001 \001(\tB\004\342A\001\002\022B\n\013entity_ty" - + "pe\030\002 \001(\tB-\342A\001\002\372A&\n$dialogflow.googleapis" - + ".com/EntityType\022\017\n\007is_list\030\003 \001(\010\022\016\n\006reda" - + "ct\030\004 \001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" - + "value\030\002 \001(\t:\0028\001:n\352Ak\n dialogflow.googlea" - + "pis.com/Intent\022Gprojects/{project}/locat" - + "ions/{location}/agents/{agent}/intents/{" - + "intent}\"\322\001\n\022ListIntentsRequest\0229\n\006parent" - + "\030\001 \001(\tB)\342A\001\002\372A\"\022 dialogflow.googleapis.c" - + "om/Intent\022\025\n\rlanguage_code\030\002 \001(\t\022C\n\013inte" - + "nt_view\030\005 \001(\0162..google.cloud.dialogflow." - + "cx.v3beta1.IntentView\022\021\n\tpage_size\030\003 \001(\005" - + "\022\022\n\npage_token\030\004 \001(\t\"k\n\023ListIntentsRespo" - + "nse\022;\n\007intents\030\001 \003(\0132*.google.cloud.dial" - + "ogflow.cx.v3beta1.Intent\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"b\n\020GetIntentRequest\0227\n\004name\030\001 " - + "\001(\tB)\342A\001\002\372A\"\n dialogflow.googleapis.com/" - + "Intent\022\025\n\rlanguage_code\030\002 \001(\t\"\251\001\n\023Create" - + "IntentRequest\0229\n\006parent\030\001 \001(\tB)\342A\001\002\372A\"\022 " - + "dialogflow.googleapis.com/Intent\022@\n\006inte" - + "nt\030\002 \001(\0132*.google.cloud.dialogflow.cx.v3" - + "beta1.IntentB\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(" - + "\t\"\237\001\n\023UpdateIntentRequest\022@\n\006intent\030\001 \001(" - + "\0132*.google.cloud.dialogflow.cx.v3beta1.I" - + "ntentB\004\342A\001\002\022\025\n\rlanguage_code\030\002 \001(\t\022/\n\013up" - + "date_mask\030\003 \001(\0132\032.google.protobuf.FieldM" - + "ask\"N\n\023DeleteIntentRequest\0227\n\004name\030\001 \001(\t" - + "B)\342A\001\002\372A\"\n dialogflow.googleapis.com/Int" - + "ent*X\n\nIntentView\022\033\n\027INTENT_VIEW_UNSPECI" - + "FIED\020\000\022\027\n\023INTENT_VIEW_PARTIAL\020\001\022\024\n\020INTEN" - + "T_VIEW_FULL\020\0022\344\010\n\007Intents\022\312\001\n\013ListIntent" - + "s\0226.google.cloud.dialogflow.cx.v3beta1.L" - + "istIntentsRequest\0327.google.cloud.dialogf" - + "low.cx.v3beta1.ListIntentsResponse\"J\332A\006p" - + "arent\202\323\344\223\002;\0229/v3beta1/{parent=projects/*" - + "/locations/*/agents/*}/intents\022\267\001\n\tGetIn" - + "tent\0224.google.cloud.dialogflow.cx.v3beta" - + "1.GetIntentRequest\032*.google.cloud.dialog" - + "flow.cx.v3beta1.Intent\"H\332A\004name\202\323\344\223\002;\0229/" - + "v3beta1/{name=projects/*/locations/*/age" - + "nts/*/intents/*}\022\316\001\n\014CreateIntent\0227.goog" - + "le.cloud.dialogflow.cx.v3beta1.CreateInt" - + "entRequest\032*.google.cloud.dialogflow.cx." - + "v3beta1.Intent\"Y\332A\rparent,intent\202\323\344\223\002C\"9" - + "/v3beta1/{parent=projects/*/locations/*/" - + "agents/*}/intents:\006intent\022\332\001\n\014UpdateInte" + + "\032/google/cloud/dialogflow/cx/v3beta1/inl" + + "ine.proto\032#google/longrunning/operations" + + ".proto\032\033google/protobuf/empty.proto\032 goo" + + "gle/protobuf/field_mask.proto\"\265\006\n\006Intent" + + "\022\014\n\004name\030\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A" + + "\001\002\022S\n\020training_phrases\030\003 \003(\01329.google.cl" + + "oud.dialogflow.cx.v3beta1.Intent.Trainin" + + "gPhrase\022H\n\nparameters\030\004 \003(\01324.google.clo" + + "ud.dialogflow.cx.v3beta1.Intent.Paramete" + + "r\022\020\n\010priority\030\005 \001(\005\022\023\n\013is_fallback\030\006 \001(\010" + + "\022F\n\006labels\030\007 \003(\01326.google.cloud.dialogfl" + + "ow.cx.v3beta1.Intent.LabelsEntry\022\023\n\013desc" + + "ription\030\010 \001(\t\032\271\001\n\016TrainingPhrase\022\n\n\002id\030\001" + + " \001(\t\022S\n\005parts\030\002 \003(\0132>.google.cloud.dialo" + + "gflow.cx.v3beta1.Intent.TrainingPhrase.P" + + "artB\004\342A\001\002\022\024\n\014repeat_count\030\003 \001(\005\0320\n\004Part\022" + + "\022\n\004text\030\001 \001(\tB\004\342A\001\002\022\024\n\014parameter_id\030\002 \001(" + + "\t\032\202\001\n\tParameter\022\020\n\002id\030\001 \001(\tB\004\342A\001\002\022B\n\013ent" + + "ity_type\030\002 \001(\tB-\342A\001\002\372A&\n$dialogflow.goog" + + "leapis.com/EntityType\022\017\n\007is_list\030\003 \001(\010\022\016" + + "\n\006redact\030\004 \001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001:n\352Ak\n dialogflow.g" + + "oogleapis.com/Intent\022Gprojects/{project}" + + "/locations/{location}/agents/{agent}/int" + + "ents/{intent}\"\322\001\n\022ListIntentsRequest\0229\n\006" + + "parent\030\001 \001(\tB)\342A\001\002\372A\"\022 dialogflow.google" + + "apis.com/Intent\022\025\n\rlanguage_code\030\002 \001(\t\022C" + + "\n\013intent_view\030\005 \001(\0162..google.cloud.dialo" + + "gflow.cx.v3beta1.IntentView\022\021\n\tpage_size" + + "\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"k\n\023ListIntent" + + "sResponse\022;\n\007intents\030\001 \003(\0132*.google.clou" + + "d.dialogflow.cx.v3beta1.Intent\022\027\n\017next_p" + + "age_token\030\002 \001(\t\"b\n\020GetIntentRequest\0227\n\004n" + + "ame\030\001 \001(\tB)\342A\001\002\372A\"\n dialogflow.googleapi" + + "s.com/Intent\022\025\n\rlanguage_code\030\002 \001(\t\"\251\001\n\023" + + "CreateIntentRequest\0229\n\006parent\030\001 \001(\tB)\342A\001" + + "\002\372A\"\022 dialogflow.googleapis.com/Intent\022@" + + "\n\006intent\030\002 \001(\0132*.google.cloud.dialogflow" + + ".cx.v3beta1.IntentB\004\342A\001\002\022\025\n\rlanguage_cod" + + "e\030\003 \001(\t\"\237\001\n\023UpdateIntentRequest\022@\n\006inten" + + "t\030\001 \001(\0132*.google.cloud.dialogflow.cx.v3b" + + "eta1.IntentB\004\342A\001\002\022\025\n\rlanguage_code\030\002 \001(\t" + + "\022/\n\013update_mask\030\003 \001(\0132\032.google.protobuf." + + "FieldMask\"N\n\023DeleteIntentRequest\0227\n\004name" + + "\030\001 \001(\tB)\342A\001\002\372A\"\n dialogflow.googleapis.c" + + "om/Intent\"\234\003\n\024ImportIntentsRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\342A\001\002\372A\"\022 dialogflow.googleap" + + "is.com/Intent\022\025\n\013intents_uri\030\002 \001(\tH\000\022K\n\017" + + "intents_content\030\003 \001(\01320.google.cloud.dia" + + "logflow.cx.v3beta1.InlineSourceH\000\022Z\n\014mer" + + "ge_option\030\004 \001(\0162D.google.cloud.dialogflo" + + "w.cx.v3beta1.ImportIntentsRequest.MergeO" + + "ption\"~\n\013MergeOption\022\034\n\030MERGE_OPTION_UNS" + + "PECIFIED\020\000\022\016\n\006REJECT\020\001\032\002\010\001\022\013\n\007REPLACE\020\002\022" + + "\t\n\005MERGE\020\003\022\n\n\006RENAME\020\004\022\023\n\017REPORT_CONFLIC" + + "T\020\005\022\010\n\004KEEP\020\006B\t\n\007intents\"\222\002\n\025ImportInten" + + "tsResponse\0226\n\007intents\030\001 \003(\tB%\372A\"\n dialog" + + "flow.googleapis.com/Intent\022m\n\025conflictin" + + "g_resources\030\002 \001(\0132N.google.cloud.dialogf" + + "low.cx.v3beta1.ImportIntentsResponse.Con" + + "flictingResources\032R\n\024ConflictingResource" + + "s\022\034\n\024intent_display_names\030\001 \003(\t\022\034\n\024entit" + + "y_display_names\030\002 \003(\t\"\027\n\025ImportIntentsMe" + + "tadata\"\344\002\n\024ExportIntentsRequest\0229\n\006paren" + + "t\030\001 \001(\tB)\342A\001\002\372A\"\022 dialogflow.googleapis." + + "com/Intent\022\025\n\007intents\030\002 \003(\tB\004\342A\001\002\022\033\n\013int" + + "ents_uri\030\003 \001(\tB\004\342A\001\001H\000\022&\n\026intents_conten" + + "t_inline\030\004 \001(\010B\004\342A\001\001H\000\022^\n\013data_format\030\005 " + + "\001(\0162C.google.cloud.dialogflow.cx.v3beta1" + + ".ExportIntentsRequest.DataFormatB\004\342A\001\001\"F" + + "\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020" + + "\000\022\010\n\004BLOB\020\001\022\010\n\004JSON\020\002\022\007\n\003CSV\020\003B\r\n\013destin" + + "ation\"\213\001\n\025ExportIntentsResponse\022\025\n\013inten" + + "ts_uri\030\001 \001(\tH\000\022P\n\017intents_content\030\002 \001(\0132" + + "5.google.cloud.dialogflow.cx.v3beta1.Inl" + + "ineDestinationH\000B\t\n\007intents\"\027\n\025ExportInt" + + "entsMetadata*X\n\nIntentView\022\033\n\027INTENT_VIE" + + "W_UNSPECIFIED\020\000\022\027\n\023INTENT_VIEW_PARTIAL\020\001" + + "\022\024\n\020INTENT_VIEW_FULL\020\0022\266\014\n\007Intents\022\312\001\n\013L" + + "istIntents\0226.google.cloud.dialogflow.cx." + + "v3beta1.ListIntentsRequest\0327.google.clou" + + "d.dialogflow.cx.v3beta1.ListIntentsRespo" + + "nse\"J\332A\006parent\202\323\344\223\002;\0229/v3beta1/{parent=p" + + "rojects/*/locations/*/agents/*}/intents\022" + + "\267\001\n\tGetIntent\0224.google.cloud.dialogflow." + + "cx.v3beta1.GetIntentRequest\032*.google.clo" + + "ud.dialogflow.cx.v3beta1.Intent\"H\332A\004name" + + "\202\323\344\223\002;\0229/v3beta1/{name=projects/*/locati" + + "ons/*/agents/*/intents/*}\022\316\001\n\014CreateInte" + "nt\0227.google.cloud.dialogflow.cx.v3beta1." - + "UpdateIntentRequest\032*.google.cloud.dialo" - + "gflow.cx.v3beta1.Intent\"e\332A\022intent,updat" - + "e_mask\202\323\344\223\002J2@/v3beta1/{intent.name=proj" - + "ects/*/locations/*/agents/*/intents/*}:\006" - + "intent\022\251\001\n\014DeleteIntent\0227.google.cloud.d" - + "ialogflow.cx.v3beta1.DeleteIntentRequest" - + "\032\026.google.protobuf.Empty\"H\332A\004name\202\323\344\223\002;*" - + "9/v3beta1/{name=projects/*/locations/*/a" - + "gents/*/intents/*}\032x\312A\031dialogflow.google" - + "apis.com\322AYhttps://www.googleapis.com/au" - + "th/cloud-platform,https://www.googleapis" - + ".com/auth/dialogflowB\305\001\n&com.google.clou" - + "d.dialogflow.cx.v3beta1B\013IntentProtoP\001Z6" - + "cloud.google.com/go/dialogflow/cx/apiv3b" - + "eta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Di" - + "alogflow.Cx.V3Beta1\352\002&Google::Cloud::Dia" - + "logflow::CX::V3beta1b\006proto3" + + "CreateIntentRequest\032*.google.cloud.dialo" + + "gflow.cx.v3beta1.Intent\"Y\332A\rparent,inten" + + "t\202\323\344\223\002C\"9/v3beta1/{parent=projects/*/loc" + + "ations/*/agents/*}/intents:\006intent\022\332\001\n\014U" + + "pdateIntent\0227.google.cloud.dialogflow.cx" + + ".v3beta1.UpdateIntentRequest\032*.google.cl" + + "oud.dialogflow.cx.v3beta1.Intent\"e\332A\022int" + + "ent,update_mask\202\323\344\223\002J2@/v3beta1/{intent." + + "name=projects/*/locations/*/agents/*/int" + + "ents/*}:\006intent\022\251\001\n\014DeleteIntent\0227.googl" + + "e.cloud.dialogflow.cx.v3beta1.DeleteInte" + + "ntRequest\032\026.google.protobuf.Empty\"H\332A\004na" + + "me\202\323\344\223\002;*9/v3beta1/{name=projects/*/loca" + + "tions/*/agents/*/intents/*}\022\346\001\n\rImportIn" + + "tents\0228.google.cloud.dialogflow.cx.v3bet" + + "a1.ImportIntentsRequest\032\035.google.longrun" + + "ning.Operation\"|\312A.\n\025ImportIntentsRespon" + + "se\022\025ImportIntentsMetadata\202\323\344\223\002E\"@/v3beta" + + "1/{parent=projects/*/locations/*/agents/" + + "*}/intents:import:\001*\022\346\001\n\rExportIntents\0228" + + ".google.cloud.dialogflow.cx.v3beta1.Expo" + + "rtIntentsRequest\032\035.google.longrunning.Op" + + "eration\"|\312A.\n\025ExportIntentsResponse\022\025Exp" + + "ortIntentsMetadata\202\323\344\223\002E\"@/v3beta1/{pare" + + "nt=projects/*/locations/*/agents/*}/inte" + + "nts:export:\001*\032x\312A\031dialogflow.googleapis." + + "com\322AYhttps://www.googleapis.com/auth/cl" + + "oud-platform,https://www.googleapis.com/" + + "auth/dialogflowB\305\001\n&com.google.cloud.dia" + + "logflow.cx.v3beta1B\013IntentProtoP\001Z6cloud" + + ".google.com/go/dialogflow/cx/apiv3beta1/" + + "cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogf" + + "low.Cx.V3Beta1\352\002&Google::Cloud::Dialogfl" + + "ow::CX::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -173,6 +246,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.InlineProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), }); @@ -279,6 +354,65 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsRequest_descriptor, + new java.lang.String[] { + "Parent", "IntentsUri", "IntentsContent", "MergeOption", "Intents", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_descriptor, + new java.lang.String[] { + "Intents", "ConflictingResources", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsResponse_ConflictingResources_descriptor, + new java.lang.String[] { + "IntentDisplayNames", "EntityDisplayNames", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportIntentsMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsRequest_descriptor, + new java.lang.String[] { + "Parent", + "Intents", + "IntentsUri", + "IntentsContentInline", + "DataFormat", + "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsResponse_descriptor, + new java.lang.String[] { + "IntentsUri", "IntentsContent", "Intents", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportIntentsMetadata_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -288,12 +422,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.InlineProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java index 4ec6f2c24d19..71f8872a3f18 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java @@ -698,6 +698,60 @@ public com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder getEventHand return eventHandlers_.get(index); } + public static final int ADVANCED_SETTINGS_FIELD_NUMBER = 13; + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + /** + * + * + *
+   * Hierarchical advanced settings for this page. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + * + * @return Whether the advancedSettings field is set. + */ + @java.lang.Override + public boolean hasAdvancedSettings() { + return advancedSettings_ != null; + } + /** + * + * + *
+   * Hierarchical advanced settings for this page. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + * + * @return The advancedSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + /** + * + * + *
+   * Hierarchical advanced settings for this page. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 18; private com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledgeConnectorSettings_; @@ -793,6 +847,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 11, transitionRouteGroups_.getRaw(i)); } + if (advancedSettings_ != null) { + output.writeMessage(13, getAdvancedSettings()); + } if (knowledgeConnectorSettings_ != null) { output.writeMessage(18, getKnowledgeConnectorSettings()); } @@ -831,6 +888,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getTransitionRouteGroupsList().size(); } + if (advancedSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getAdvancedSettings()); + } if (knowledgeConnectorSettings_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -865,6 +925,10 @@ public boolean equals(final java.lang.Object obj) { if (!getTransitionRouteGroupsList().equals(other.getTransitionRouteGroupsList())) return false; if (!getTransitionRoutesList().equals(other.getTransitionRoutesList())) return false; if (!getEventHandlersList().equals(other.getEventHandlersList())) return false; + if (hasAdvancedSettings() != other.hasAdvancedSettings()) return false; + if (hasAdvancedSettings()) { + if (!getAdvancedSettings().equals(other.getAdvancedSettings())) return false; + } if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false; if (hasKnowledgeConnectorSettings()) { if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) @@ -905,6 +969,10 @@ public int hashCode() { hash = (37 * hash) + EVENT_HANDLERS_FIELD_NUMBER; hash = (53 * hash) + getEventHandlersList().hashCode(); } + if (hasAdvancedSettings()) { + hash = (37 * hash) + ADVANCED_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedSettings().hashCode(); + } if (hasKnowledgeConnectorSettings()) { hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); @@ -1090,6 +1158,11 @@ public Builder clear() { eventHandlersBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } knowledgeConnectorSettings_ = null; if (knowledgeConnectorSettingsBuilder_ != null) { knowledgeConnectorSettingsBuilder_.dispose(); @@ -1171,6 +1244,10 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Page result) { result.transitionRouteGroups_ = transitionRouteGroups_; } if (((from_bitField0_ & 0x00000080) != 0)) { + result.advancedSettings_ = + advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { result.knowledgeConnectorSettings_ = knowledgeConnectorSettingsBuilder_ == null ? knowledgeConnectorSettings_ @@ -1303,6 +1380,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Page other) { } } } + if (other.hasAdvancedSettings()) { + mergeAdvancedSettings(other.getAdvancedSettings()); + } if (other.hasKnowledgeConnectorSettings()) { mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); } @@ -1392,11 +1472,18 @@ public Builder mergeFrom( transitionRouteGroups_.add(s); break; } // case 90 + case 106: + { + input.readMessage( + getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 106 case 146: { input.readMessage( getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 146 default: @@ -3539,6 +3626,204 @@ public com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder addEventHandl return eventHandlersBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + advancedSettingsBuilder_; + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + * + * @return Whether the advancedSettings field is set. + */ + public boolean hasAdvancedSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + * + * @return The advancedSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + if (advancedSettingsBuilder_ == null) { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } else { + return advancedSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedSettings_ = value; + } else { + advancedSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder builderForValue) { + if (advancedSettingsBuilder_ == null) { + advancedSettings_ = builderForValue.build(); + } else { + advancedSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + public Builder mergeAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && advancedSettings_ != null + && advancedSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance()) { + getAdvancedSettingsBuilder().mergeFrom(value); + } else { + advancedSettings_ = value; + } + } else { + advancedSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + public Builder clearAdvancedSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder + getAdvancedSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getAdvancedSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + if (advancedSettingsBuilder_ != null) { + return advancedSettingsBuilder_.getMessageOrBuilder(); + } else { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + } + /** + * + * + *
+     * Hierarchical advanced settings for this page. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + getAdvancedSettingsFieldBuilder() { + if (advancedSettingsBuilder_ == null) { + advancedSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder>( + getAdvancedSettings(), getParentForChildren(), isClean()); + advancedSettings_ = null; + } + return advancedSettingsBuilder_; + } + private com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings knowledgeConnectorSettings_; private com.google.protobuf.SingleFieldBuilderV3< @@ -3560,7 +3845,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder addEventHandl * @return Whether the knowledgeConnectorSettings field is set. */ public boolean hasKnowledgeConnectorSettings() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -3606,7 +3891,7 @@ public Builder setKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3628,7 +3913,7 @@ public Builder setKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3646,7 +3931,7 @@ public Builder setKnowledgeConnectorSettings( public Builder mergeKnowledgeConnectorSettings( com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings value) { if (knowledgeConnectorSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000100) != 0) && knowledgeConnectorSettings_ != null && knowledgeConnectorSettings_ != com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings @@ -3658,7 +3943,7 @@ public Builder mergeKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3674,7 +3959,7 @@ public Builder mergeKnowledgeConnectorSettings( * */ public Builder clearKnowledgeConnectorSettings() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); knowledgeConnectorSettings_ = null; if (knowledgeConnectorSettingsBuilder_ != null) { knowledgeConnectorSettingsBuilder_.dispose(); @@ -3696,7 +3981,7 @@ public Builder clearKnowledgeConnectorSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder getKnowledgeConnectorSettingsBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java index c0a1a0a290b9..085fde887dd6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java @@ -507,6 +507,44 @@ com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder getTransitionRou */ com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder getEventHandlersOrBuilder(int index); + /** + * + * + *
+   * Hierarchical advanced settings for this page. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + * + * @return Whether the advancedSettings field is set. + */ + boolean hasAdvancedSettings(); + /** + * + * + *
+   * Hierarchical advanced settings for this page. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + * + * @return The advancedSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings(); + /** + * + * + *
+   * Hierarchical advanced settings for this page. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java index bc2ceae7f8c1..d0a30e897d9c 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java @@ -92,119 +92,125 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e.proto\022\"google.cloud.dialogflow.cx.v3be" + "ta1\032\034google/api/annotations.proto\032\027googl" + "e/api/client.proto\032\037google/api/field_beh" - + "avior.proto\032\031google/api/resource.proto\032>" - + "google/cloud/dialogflow/cx/v3beta1/data_" - + "store_connection.proto\0324google/cloud/dia" - + "logflow/cx/v3beta1/fulfillment.proto\032\033go" - + "ogle/protobuf/empty.proto\032 google/protob" - + "uf/field_mask.proto\032\034google/protobuf/str" - + "uct.proto\"\207\005\n\004Page\022\014\n\004name\030\001 \001(\t\022\032\n\014disp" - + "lay_name\030\002 \001(\tB\004\342A\001\002\022J\n\021entry_fulfillmen" - + "t\030\007 \001(\0132/.google.cloud.dialogflow.cx.v3b" - + "eta1.Fulfillment\0226\n\004form\030\004 \001(\0132(.google." - + "cloud.dialogflow.cx.v3beta1.Form\022T\n\027tran" - + "sition_route_groups\030\013 \003(\tB3\372A0\n.dialogfl" - + "ow.googleapis.com/TransitionRouteGroup\022N" - + "\n\021transition_routes\030\t \003(\01323.google.cloud" - + ".dialogflow.cx.v3beta1.TransitionRoute\022H" - + "\n\016event_handlers\030\n \003(\01320.google.cloud.di" - + "alogflow.cx.v3beta1.EventHandler\022j\n\034know" - + "ledge_connector_settings\030\022 \001(\0132>.google." - + "cloud.dialogflow.cx.v3beta1.KnowledgeCon" - + "nectorSettingsB\004\342A\001\001:u\352Ar\n\036dialogflow.go" - + "ogleapis.com/Page\022Pprojects/{project}/lo" - + "cations/{location}/agents/{agent}/flows/" - + "{flow}/pages/{page}\"\273\004\n\004Form\022F\n\nparamete" - + "rs\030\001 \003(\01322.google.cloud.dialogflow.cx.v3" - + "beta1.Form.Parameter\032\352\003\n\tParameter\022\032\n\014di" - + "splay_name\030\001 \001(\tB\004\342A\001\002\022\020\n\010required\030\002 \001(\010" - + "\022B\n\013entity_type\030\003 \001(\tB-\342A\001\002\372A&\n$dialogfl" - + "ow.googleapis.com/EntityType\022\017\n\007is_list\030" - + "\004 \001(\010\022\\\n\rfill_behavior\030\007 \001(\0132?.google.cl" - + "oud.dialogflow.cx.v3beta1.Form.Parameter" - + ".FillBehaviorB\004\342A\001\002\022-\n\rdefault_value\030\t \001" - + "(\0132\026.google.protobuf.Value\022\016\n\006redact\030\013 \001" - + "(\010\032\274\001\n\014FillBehavior\022Y\n\032initial_prompt_fu" - + "lfillment\030\003 \001(\0132/.google.cloud.dialogflo" - + "w.cx.v3beta1.FulfillmentB\004\342A\001\002\022Q\n\027reprom" - + "pt_event_handlers\030\005 \003(\01320.google.cloud.d" - + "ialogflow.cx.v3beta1.EventHandler\"\207\002\n\014Ev" - + "entHandler\022\022\n\004name\030\006 \001(\tB\004\342A\001\003\022\023\n\005event\030" - + "\004 \001(\tB\004\342A\001\002\022L\n\023trigger_fulfillment\030\005 \001(\013" - + "2/.google.cloud.dialogflow.cx.v3beta1.Fu" - + "lfillment\022:\n\013target_page\030\002 \001(\tB#\372A \n\036dia" - + "logflow.googleapis.com/PageH\000\022:\n\013target_" - + "flow\030\003 \001(\tB#\372A \n\036dialogflow.googleapis.c" - + "om/FlowH\000B\010\n\006target\"\332\002\n\017TransitionRoute\022" - + "\022\n\004name\030\006 \001(\tB\004\342A\001\003\022\031\n\013description\030\010 \001(\t" - + "B\004\342A\001\001\0225\n\006intent\030\001 \001(\tB%\372A\"\n dialogflow." - + "googleapis.com/Intent\022\021\n\tcondition\030\002 \001(\t" - + "\022L\n\023trigger_fulfillment\030\003 \001(\0132/.google.c" - + "loud.dialogflow.cx.v3beta1.Fulfillment\022:" - + "\n\013target_page\030\004 \001(\tB#\372A \n\036dialogflow.goo" - + "gleapis.com/PageH\000\022:\n\013target_flow\030\005 \001(\tB" - + "#\372A \n\036dialogflow.googleapis.com/FlowH\000B\010" - + "\n\006target\"\211\001\n\020ListPagesRequest\0227\n\006parent\030" - + "\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.googleapis.co" - + "m/Page\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n\tpage_si" - + "ze\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"e\n\021ListPage" - + "sResponse\0227\n\005pages\030\001 \003(\0132(.google.cloud." - + "dialogflow.cx.v3beta1.Page\022\027\n\017next_page_" - + "token\030\002 \001(\t\"^\n\016GetPageRequest\0225\n\004name\030\001 " - + "\001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com/" - + "Page\022\025\n\rlanguage_code\030\002 \001(\t\"\241\001\n\021CreatePa" - + "geRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036dial" - + "ogflow.googleapis.com/Page\022<\n\004page\030\002 \001(\013" - + "2(.google.cloud.dialogflow.cx.v3beta1.Pa" - + "geB\004\342A\001\002\022\025\n\rlanguage_code\030\003 \001(\t\"\231\001\n\021Upda" - + "tePageRequest\022<\n\004page\030\001 \001(\0132(.google.clo" - + "ud.dialogflow.cx.v3beta1.PageB\004\342A\001\002\022\025\n\rl" - + "anguage_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132" - + "\032.google.protobuf.FieldMask\"Y\n\021DeletePag" - + "eRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dialogf" - + "low.googleapis.com/Page\022\r\n\005force\030\002 \001(\010\"\334" - + "\002\n\032KnowledgeConnectorSettings\022\017\n\007enabled" - + "\030\001 \001(\010\022L\n\023trigger_fulfillment\030\003 \001(\0132/.go" - + "ogle.cloud.dialogflow.cx.v3beta1.Fulfill" - + "ment\022:\n\013target_page\030\004 \001(\tB#\372A \n\036dialogfl" - + "ow.googleapis.com/PageH\000\022:\n\013target_flow\030" - + "\005 \001(\tB#\372A \n\036dialogflow.googleapis.com/Fl" - + "owH\000\022]\n\026data_store_connections\030\006 \003(\01327.g" - + "oogle.cloud.dialogflow.cx.v3beta1.DataSt" - + "oreConnectionB\004\342A\001\001B\010\n\006target2\332\010\n\005Pages\022" - + "\312\001\n\tListPages\0224.google.cloud.dialogflow." - + "cx.v3beta1.ListPagesRequest\0325.google.clo" - + "ud.dialogflow.cx.v3beta1.ListPagesRespon" - + "se\"P\332A\006parent\202\323\344\223\002A\022?/v3beta1/{parent=pr" - + "ojects/*/locations/*/agents/*/flows/*}/p" - + "ages\022\267\001\n\007GetPage\0222.google.cloud.dialogfl" - + "ow.cx.v3beta1.GetPageRequest\032(.google.cl" - + "oud.dialogflow.cx.v3beta1.Page\"N\332A\004name\202" - + "\323\344\223\002A\022?/v3beta1/{name=projects/*/locatio" - + "ns/*/agents/*/flows/*/pages/*}\022\312\001\n\nCreat" - + "ePage\0225.google.cloud.dialogflow.cx.v3bet" - + "a1.CreatePageRequest\032(.google.cloud.dial" - + "ogflow.cx.v3beta1.Page\"[\332A\013parent,page\202\323" - + "\344\223\002G\"?/v3beta1/{parent=projects/*/locati" - + "ons/*/agents/*/flows/*}/pages:\004page\022\324\001\n\n" - + "UpdatePage\0225.google.cloud.dialogflow.cx." - + "v3beta1.UpdatePageRequest\032(.google.cloud" - + ".dialogflow.cx.v3beta1.Page\"e\332A\020page,upd" - + "ate_mask\202\323\344\223\002L2D/v3beta1/{page.name=proj" - + "ects/*/locations/*/agents/*/flows/*/page" - + "s/*}:\004page\022\253\001\n\nDeletePage\0225.google.cloud" - + ".dialogflow.cx.v3beta1.DeletePageRequest" - + "\032\026.google.protobuf.Empty\"N\332A\004name\202\323\344\223\002A*" - + "?/v3beta1/{name=projects/*/locations/*/a" - + "gents/*/flows/*/pages/*}\032x\312A\031dialogflow." - + "googleapis.com\322AYhttps://www.googleapis." - + "com/auth/cloud-platform,https://www.goog" - + "leapis.com/auth/dialogflowB\303\001\n&com.googl" - + "e.cloud.dialogflow.cx.v3beta1B\tPageProto" - + "P\001Z6cloud.google.com/go/dialogflow/cx/ap" - + "iv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Clou" - + "d.Dialogflow.Cx.V3Beta1\352\002&Google::Cloud:" - + ":Dialogflow::CX::V3beta1b\006proto3" + + "avior.proto\032\031google/api/resource.proto\032:" + + "google/cloud/dialogflow/cx/v3beta1/advan" + + "ced_settings.proto\032>google/cloud/dialogf" + + "low/cx/v3beta1/data_store_connection.pro" + + "to\0324google/cloud/dialogflow/cx/v3beta1/f" + + "ulfillment.proto\032\033google/protobuf/empty." + + "proto\032 google/protobuf/field_mask.proto\032" + + "\034google/protobuf/struct.proto\"\330\005\n\004Page\022\014" + + "\n\004name\030\001 \001(\t\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002" + + "\022J\n\021entry_fulfillment\030\007 \001(\0132/.google.clo" + + "ud.dialogflow.cx.v3beta1.Fulfillment\0226\n\004" + + "form\030\004 \001(\0132(.google.cloud.dialogflow.cx." + + "v3beta1.Form\022T\n\027transition_route_groups\030" + + "\013 \003(\tB3\372A0\n.dialogflow.googleapis.com/Tr" + + "ansitionRouteGroup\022N\n\021transition_routes\030" + + "\t \003(\01323.google.cloud.dialogflow.cx.v3bet" + + "a1.TransitionRoute\022H\n\016event_handlers\030\n \003" + + "(\01320.google.cloud.dialogflow.cx.v3beta1." + + "EventHandler\022O\n\021advanced_settings\030\r \001(\0132" + + "4.google.cloud.dialogflow.cx.v3beta1.Adv" + + "ancedSettings\022j\n\034knowledge_connector_set" + + "tings\030\022 \001(\0132>.google.cloud.dialogflow.cx" + + ".v3beta1.KnowledgeConnectorSettingsB\004\342A\001" + + "\001:u\352Ar\n\036dialogflow.googleapis.com/Page\022P" + + "projects/{project}/locations/{location}/" + + "agents/{agent}/flows/{flow}/pages/{page}" + + "\"\214\005\n\004Form\022F\n\nparameters\030\001 \003(\01322.google.c" + + "loud.dialogflow.cx.v3beta1.Form.Paramete" + + "r\032\273\004\n\tParameter\022\032\n\014display_name\030\001 \001(\tB\004\342" + + "A\001\002\022\020\n\010required\030\002 \001(\010\022B\n\013entity_type\030\003 \001" + + "(\tB-\342A\001\002\372A&\n$dialogflow.googleapis.com/E" + + "ntityType\022\017\n\007is_list\030\004 \001(\010\022\\\n\rfill_behav" + + "ior\030\007 \001(\0132?.google.cloud.dialogflow.cx.v" + + "3beta1.Form.Parameter.FillBehaviorB\004\342A\001\002" + + "\022-\n\rdefault_value\030\t \001(\0132\026.google.protobu" + + "f.Value\022\016\n\006redact\030\013 \001(\010\022O\n\021advanced_sett" + + "ings\030\014 \001(\01324.google.cloud.dialogflow.cx." + + "v3beta1.AdvancedSettings\032\274\001\n\014FillBehavio" + + "r\022Y\n\032initial_prompt_fulfillment\030\003 \001(\0132/." + + "google.cloud.dialogflow.cx.v3beta1.Fulfi" + + "llmentB\004\342A\001\002\022Q\n\027reprompt_event_handlers\030" + + "\005 \003(\01320.google.cloud.dialogflow.cx.v3bet" + + "a1.EventHandler\"\207\002\n\014EventHandler\022\022\n\004name" + + "\030\006 \001(\tB\004\342A\001\003\022\023\n\005event\030\004 \001(\tB\004\342A\001\002\022L\n\023tri" + + "gger_fulfillment\030\005 \001(\0132/.google.cloud.di" + + "alogflow.cx.v3beta1.Fulfillment\022:\n\013targe" + + "t_page\030\002 \001(\tB#\372A \n\036dialogflow.googleapis" + + ".com/PageH\000\022:\n\013target_flow\030\003 \001(\tB#\372A \n\036d" + + "ialogflow.googleapis.com/FlowH\000B\010\n\006targe" + + "t\"\332\002\n\017TransitionRoute\022\022\n\004name\030\006 \001(\tB\004\342A\001" + + "\003\022\031\n\013description\030\010 \001(\tB\004\342A\001\001\0225\n\006intent\030\001" + + " \001(\tB%\372A\"\n dialogflow.googleapis.com/Int" + + "ent\022\021\n\tcondition\030\002 \001(\t\022L\n\023trigger_fulfil" + + "lment\030\003 \001(\0132/.google.cloud.dialogflow.cx" + + ".v3beta1.Fulfillment\022:\n\013target_page\030\004 \001(" + + "\tB#\372A \n\036dialogflow.googleapis.com/PageH\000" + + "\022:\n\013target_flow\030\005 \001(\tB#\372A \n\036dialogflow.g" + + "oogleapis.com/FlowH\000B\010\n\006target\"\211\001\n\020ListP" + + "agesRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036di" + + "alogflow.googleapis.com/Page\022\025\n\rlanguage" + + "_code\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_t" + + "oken\030\004 \001(\t\"e\n\021ListPagesResponse\0227\n\005pages" + + "\030\001 \003(\0132(.google.cloud.dialogflow.cx.v3be" + + "ta1.Page\022\027\n\017next_page_token\030\002 \001(\t\"^\n\016Get" + + "PageRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036dial" + + "ogflow.googleapis.com/Page\022\025\n\rlanguage_c" + + "ode\030\002 \001(\t\"\241\001\n\021CreatePageRequest\0227\n\006paren" + + "t\030\001 \001(\tB\'\342A\001\002\372A \022\036dialogflow.googleapis." + + "com/Page\022<\n\004page\030\002 \001(\0132(.google.cloud.di" + + "alogflow.cx.v3beta1.PageB\004\342A\001\002\022\025\n\rlangua" + + "ge_code\030\003 \001(\t\"\231\001\n\021UpdatePageRequest\022<\n\004p" + + "age\030\001 \001(\0132(.google.cloud.dialogflow.cx.v" + + "3beta1.PageB\004\342A\001\002\022\025\n\rlanguage_code\030\002 \001(\t" + + "\022/\n\013update_mask\030\003 \001(\0132\032.google.protobuf." + + "FieldMask\"Y\n\021DeletePageRequest\0225\n\004name\030\001" + + " \001(\tB\'\342A\001\002\372A \n\036dialogflow.googleapis.com" + + "/Page\022\r\n\005force\030\002 \001(\010\"\334\002\n\032KnowledgeConnec" + + "torSettings\022\017\n\007enabled\030\001 \001(\010\022L\n\023trigger_" + + "fulfillment\030\003 \001(\0132/.google.cloud.dialogf" + + "low.cx.v3beta1.Fulfillment\022:\n\013target_pag" + + "e\030\004 \001(\tB#\372A \n\036dialogflow.googleapis.com/" + + "PageH\000\022:\n\013target_flow\030\005 \001(\tB#\372A \n\036dialog" + + "flow.googleapis.com/FlowH\000\022]\n\026data_store" + + "_connections\030\006 \003(\01327.google.cloud.dialog" + + "flow.cx.v3beta1.DataStoreConnectionB\004\342A\001" + + "\001B\010\n\006target2\332\010\n\005Pages\022\312\001\n\tListPages\0224.go" + + "ogle.cloud.dialogflow.cx.v3beta1.ListPag" + + "esRequest\0325.google.cloud.dialogflow.cx.v" + + "3beta1.ListPagesResponse\"P\332A\006parent\202\323\344\223\002" + + "A\022?/v3beta1/{parent=projects/*/locations" + + "/*/agents/*/flows/*}/pages\022\267\001\n\007GetPage\0222" + + ".google.cloud.dialogflow.cx.v3beta1.GetP" + + "ageRequest\032(.google.cloud.dialogflow.cx." + + "v3beta1.Page\"N\332A\004name\202\323\344\223\002A\022?/v3beta1/{n" + + "ame=projects/*/locations/*/agents/*/flow" + + "s/*/pages/*}\022\312\001\n\nCreatePage\0225.google.clo" + + "ud.dialogflow.cx.v3beta1.CreatePageReque" + + "st\032(.google.cloud.dialogflow.cx.v3beta1." + + "Page\"[\332A\013parent,page\202\323\344\223\002G\"?/v3beta1/{pa" + + "rent=projects/*/locations/*/agents/*/flo" + + "ws/*}/pages:\004page\022\324\001\n\nUpdatePage\0225.googl" + + "e.cloud.dialogflow.cx.v3beta1.UpdatePage" + + "Request\032(.google.cloud.dialogflow.cx.v3b" + + "eta1.Page\"e\332A\020page,update_mask\202\323\344\223\002L2D/v" + + "3beta1/{page.name=projects/*/locations/*" + + "/agents/*/flows/*/pages/*}:\004page\022\253\001\n\nDel" + + "etePage\0225.google.cloud.dialogflow.cx.v3b" + + "eta1.DeletePageRequest\032\026.google.protobuf" + + ".Empty\"N\332A\004name\202\323\344\223\002A*?/v3beta1/{name=pr" + + "ojects/*/locations/*/agents/*/flows/*/pa" + + "ges/*}\032x\312A\031dialogflow.googleapis.com\322AYh" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tform,https://www.googleapis.com/auth/di" + + "alogflowB\303\001\n&com.google.cloud.dialogflow" + + ".cx.v3beta1B\tPageProtoP\001Z6cloud.google.c" + + "om/go/dialogflow/cx/apiv3beta1/cxpb;cxpb" + + "\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3" + + "Beta1\352\002&Google::Cloud::Dialogflow::CX::V" + + "3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -214,6 +220,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.FulfillmentProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), @@ -233,6 +240,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TransitionRouteGroups", "TransitionRoutes", "EventHandlers", + "AdvancedSettings", "KnowledgeConnectorSettings", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Form_descriptor = @@ -256,6 +264,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FillBehavior", "DefaultValue", "Redact", + "AdvancedSettings", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Form_Parameter_FillBehavior_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_Form_Parameter_descriptor @@ -366,6 +375,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.FulfillmentProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java index e985bf7270fc..3728edcf4f4c 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java @@ -944,7 +944,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuil * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 * @return Whether the intent field is set. */ @java.lang.Override @@ -967,7 +967,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 * @return The intent. */ @java.lang.Override @@ -1019,7 +1019,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getIntentOrBuilder * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -1243,6 +1243,69 @@ public boolean hasSentimentAnalysisResult() { : sentimentAnalysisResult_; } + public static final int ADVANCED_SETTINGS_FIELD_NUMBER = 21; + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + /** + * + * + *
+   * Returns the current advanced settings including IVR settings. Even though
+   * the operations configured by these settings are performed by Dialogflow,
+   * the client may need to perform special logic at the moment. For example, if
+   * Dialogflow exports audio to Google Cloud Storage, then the client may need
+   * to wait for the resulting object to appear in the bucket before proceeding.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + * + * @return Whether the advancedSettings field is set. + */ + @java.lang.Override + public boolean hasAdvancedSettings() { + return advancedSettings_ != null; + } + /** + * + * + *
+   * Returns the current advanced settings including IVR settings. Even though
+   * the operations configured by these settings are performed by Dialogflow,
+   * the client may need to perform special logic at the moment. For example, if
+   * Dialogflow exports audio to Google Cloud Storage, then the client may need
+   * to wait for the resulting object to appear in the bucket before proceeding.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + * + * @return The advancedSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + /** + * + * + *
+   * Returns the current advanced settings including IVR settings. Even though
+   * the operations configured by these settings are performed by Dialogflow,
+   * the client may need to perform special logic at the moment. For example, if
+   * Dialogflow exports audio to Google Cloud Storage, then the client may need
+   * to wait for the resulting object to appear in the bucket before proceeding.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1302,6 +1365,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sentimentAnalysisResult_ != null) { output.writeMessage(17, getSentimentAnalysisResult()); } + if (advancedSettings_ != null) { + output.writeMessage(21, getAdvancedSettings()); + } if (queryCase_ == 23) { output.writeMessage(23, (com.google.cloud.dialogflow.cx.v3beta1.DtmfInput) query_); } @@ -1361,6 +1427,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 17, getSentimentAnalysisResult()); } + if (advancedSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getAdvancedSettings()); + } if (queryCase_ == 23) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -1412,6 +1481,10 @@ public boolean equals(final java.lang.Object obj) { if (hasSentimentAnalysisResult()) { if (!getSentimentAnalysisResult().equals(other.getSentimentAnalysisResult())) return false; } + if (hasAdvancedSettings() != other.hasAdvancedSettings()) return false; + if (hasAdvancedSettings()) { + if (!getAdvancedSettings().equals(other.getAdvancedSettings())) return false; + } if (!getQueryCase().equals(other.getQueryCase())) return false; switch (queryCase_) { case 1: @@ -1483,6 +1556,10 @@ public int hashCode() { hash = (37 * hash) + SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER; hash = (53 * hash) + getSentimentAnalysisResult().hashCode(); } + if (hasAdvancedSettings()) { + hash = (37 * hash) + ADVANCED_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedSettings().hashCode(); + } switch (queryCase_) { case 1: hash = (37 * hash) + TEXT_FIELD_NUMBER; @@ -1702,6 +1779,11 @@ public Builder clear() { sentimentAnalysisResultBuilder_.dispose(); sentimentAnalysisResultBuilder_ = null; } + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } queryCase_ = 0; query_ = null; return this; @@ -1802,6 +1884,10 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.QueryResult re ? sentimentAnalysisResult_ : sentimentAnalysisResultBuilder_.build(); } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.advancedSettings_ = + advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); + } } private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.QueryResult result) { @@ -1965,6 +2051,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryResult othe if (other.hasSentimentAnalysisResult()) { mergeSentimentAnalysisResult(other.getSentimentAnalysisResult()); } + if (other.hasAdvancedSettings()) { + mergeAdvancedSettings(other.getAdvancedSettings()); + } switch (other.getQueryCase()) { case TEXT: { @@ -2145,6 +2234,13 @@ public Builder mergeFrom( bitField0_ |= 0x00008000; break; } // case 138 + case 170: + { + input.readMessage( + getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 170 case 186: { input.readMessage(getDtmfFieldBuilder().getBuilder(), extensionRegistry); @@ -4807,7 +4903,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuil * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -4829,7 +4925,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 * @return The intent. */ @java.lang.Deprecated @@ -5046,7 +5142,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getIntentOrBuilder * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -5072,7 +5168,7 @@ public float getIntentDetectionConfidence() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 * @param value The intentDetectionConfidence to set. * @return This builder for chaining. */ @@ -5102,7 +5198,7 @@ public Builder setIntentDetectionConfidence(float value) { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 * @return This builder for chaining. */ @java.lang.Deprecated @@ -5859,6 +5955,231 @@ public Builder clearSentimentAnalysisResult() { return sentimentAnalysisResultBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advancedSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + advancedSettingsBuilder_; + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + * + * @return Whether the advancedSettings field is set. + */ + public boolean hasAdvancedSettings() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + * + * @return The advancedSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings() { + if (advancedSettingsBuilder_ == null) { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } else { + return advancedSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedSettings_ = value; + } else { + advancedSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder builderForValue) { + if (advancedSettingsBuilder_ == null) { + advancedSettings_ = builderForValue.build(); + } else { + advancedSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + public Builder mergeAdvancedSettings( + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && advancedSettings_ != null + && advancedSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance()) { + getAdvancedSettingsBuilder().mergeFrom(value); + } else { + advancedSettings_ = value; + } + } else { + advancedSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + public Builder clearAdvancedSettings() { + bitField0_ = (bitField0_ & ~0x00010000); + advancedSettings_ = null; + if (advancedSettingsBuilder_ != null) { + advancedSettingsBuilder_.dispose(); + advancedSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder + getAdvancedSettingsBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getAdvancedSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + if (advancedSettingsBuilder_ != null) { + return advancedSettingsBuilder_.getMessageOrBuilder(); + } else { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + } + /** + * + * + *
+     * Returns the current advanced settings including IVR settings. Even though
+     * the operations configured by these settings are performed by Dialogflow,
+     * the client may need to perform special logic at the moment. For example, if
+     * Dialogflow exports audio to Google Cloud Storage, then the client may need
+     * to wait for the resulting object to appear in the bucket before proceeding.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder> + getAdvancedSettingsFieldBuilder() { + if (advancedSettingsBuilder_ == null) { + advancedSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder>( + getAdvancedSettings(), getParentForChildren(), isClean()); + advancedSettings_ = null; + } + return advancedSettingsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java index b3accb288a73..4375ecb061c9 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java @@ -582,7 +582,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -602,7 +602,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=728 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=729 * @return The intent. */ @java.lang.Deprecated @@ -642,7 +642,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=739 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=740 * @return The intentDetectionConfidence. */ @java.lang.Deprecated @@ -817,5 +817,52 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResultOrBuilder getSentimentAnalysisResultOrBuilder(); + /** + * + * + *
+   * Returns the current advanced settings including IVR settings. Even though
+   * the operations configured by these settings are performed by Dialogflow,
+   * the client may need to perform special logic at the moment. For example, if
+   * Dialogflow exports audio to Google Cloud Storage, then the client may need
+   * to wait for the resulting object to appear in the bucket before proceeding.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + * + * @return Whether the advancedSettings field is set. + */ + boolean hasAdvancedSettings(); + /** + * + * + *
+   * Returns the current advanced settings including IVR settings. Even though
+   * the operations configured by these settings are performed by Dialogflow,
+   * the client may need to perform special logic at the moment. For example, if
+   * Dialogflow exports audio to Google Cloud Storage, then the client may need
+   * to wait for the resulting object to appear in the bucket before proceeding.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + * + * @return The advancedSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings getAdvancedSettings(); + /** + * + * + *
+   * Returns the current advanced settings including IVR settings. Even though
+   * the operations configured by these settings are performed by Dialogflow,
+   * the client may need to perform special logic at the moment. For example, if
+   * Dialogflow exports audio to Google Cloud Storage, then the client may need
+   * to wait for the resulting object to appear in the bucket before proceeding.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; + */ + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder(); + com.google.cloud.dialogflow.cx.v3beta1.QueryResult.QueryCase getQueryCase(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java index 85e729d01b4b..f88b162f1eed 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java @@ -125,221 +125,225 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "3beta1\032\034google/api/annotations.proto\032\027go" + "ogle/api/client.proto\032\037google/api/field_" + "behavior.proto\032\031google/api/resource.prot" - + "o\0325google/cloud/dialogflow/cx/v3beta1/au" - + "dio_config.proto\032/google/cloud/dialogflo" - + "w/cx/v3beta1/intent.proto\032-google/cloud/" - + "dialogflow/cx/v3beta1/page.proto\0329google" - + "/cloud/dialogflow/cx/v3beta1/response_me" - + "ssage.proto\032" - + ".google.cloud.dialogflow.cx.v3beta1.Stre" - + "amingRecognitionResultH\000\022Z\n\026detect_inten" - + "t_response\030\002 \001(\01328.google.cloud.dialogfl" - + "ow.cx.v3beta1.DetectIntentResponseH\000\022Z\n\016" - + "debugging_info\030\004 \001(\0132B.google.cloud.dial" - + "ogflow.cx.v3beta1.CloudConversationDebug" - + "gingInfoB\n\n\010response\"\300\003\n\032StreamingRecogn" - + "itionResult\022`\n\014message_type\030\001 \001(\0162J.goog" - + "le.cloud.dialogflow.cx.v3beta1.Streaming" - + "RecognitionResult.MessageType\022\022\n\ntranscr" - + "ipt\030\002 \001(\t\022\020\n\010is_final\030\003 \001(\010\022\022\n\nconfidenc" - + "e\030\004 \001(\002\022\021\n\tstability\030\006 \001(\002\022L\n\020speech_wor" - + "d_info\030\007 \003(\01322.google.cloud.dialogflow.c" - + "x.v3beta1.SpeechWordInfo\0224\n\021speech_end_o" - + "ffset\030\010 \001(\0132\031.google.protobuf.Duration\022\025" - + "\n\rlanguage_code\030\n \001(\t\"X\n\013MessageType\022\034\n\030" - + "MESSAGE_TYPE_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT" - + "\020\001\022\033\n\027END_OF_SINGLE_UTTERANCE\020\002\"\224\005\n\017Quer" - + "yParameters\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_lo" - + "cation\030\002 \001(\0132\023.google.type.LatLng\022S\n\024ses" - + "sion_entity_types\030\003 \003(\01325.google.cloud.d" - + "ialogflow.cx.v3beta1.SessionEntityType\022(" - + "\n\007payload\030\004 \001(\0132\027.google.protobuf.Struct" - + "\022+\n\nparameters\030\005 \001(\0132\027.google.protobuf.S" - + "truct\0229\n\014current_page\030\006 \001(\tB#\372A \n\036dialog" - + "flow.googleapis.com/Page\022\027\n\017disable_webh" - + "ook\030\007 \001(\010\022$\n\034analyze_query_text_sentimen" - + "t\030\010 \001(\010\022`\n\017webhook_headers\030\n \003(\0132G.googl" - + "e.cloud.dialogflow.cx.v3beta1.QueryParam" - + "eters.WebhookHeadersEntry\022=\n\rflow_versio" - + "ns\030\016 \003(\tB&\372A#\n!dialogflow.googleapis.com" - + "/Version\022\017\n\007channel\030\017 \001(\t\0224\n\013session_ttl" - + "\030\020 \001(\0132\031.google.protobuf.DurationB\004\342A\001\001\032" - + "5\n\023WebhookHeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001\"\365\002\n\nQueryInput\022=\n\004text\030\002 " + + "onfig\"\235\003\n\024DetectIntentResponse\022\023\n\013respon" + + "se_id\030\001 \001(\t\022E\n\014query_result\030\002 \001(\0132/.goog" + + "le.cloud.dialogflow.cx.v3beta1.QueryResu" + + "lt\022\024\n\014output_audio\030\004 \001(\014\022R\n\023output_audio" + + "_config\030\005 \001(\01325.google.cloud.dialogflow." + + "cx.v3beta1.OutputAudioConfig\022\\\n\rresponse" + + "_type\030\006 \001(\0162E.google.cloud.dialogflow.cx" + + ".v3beta1.DetectIntentResponse.ResponseTy" + + "pe\022\032\n\022allow_cancellation\030\007 \001(\010\"E\n\014Respon" + + "seType\022\035\n\031RESPONSE_TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007PARTIAL\020\001\022\t\n\005FINAL\020\002\"\201\003\n\034StreamingDetec" + + "tIntentRequest\0227\n\007session\030\001 \001(\tB&\372A#\n!di" + + "alogflow.googleapis.com/Session\022I\n\014query" + + "_params\030\002 \001(\01323.google.cloud.dialogflow." + + "cx.v3beta1.QueryParameters\022I\n\013query_inpu" + + "t\030\003 \001(\0132..google.cloud.dialogflow.cx.v3b" + + "eta1.QueryInputB\004\342A\001\002\022R\n\023output_audio_co" + + "nfig\030\004 \001(\01325.google.cloud.dialogflow.cx." + + "v3beta1.OutputAudioConfig\022\037\n\027enable_part" + + "ial_response\030\005 \001(\010\022\035\n\025enable_debugging_i" + + "nfo\030\010 \001(\010\"\260\007\n\036CloudConversationDebugging" + + "Info\022\031\n\021audio_data_chunks\030\001 \001(\005\0229\n\026resul" + + "t_end_time_offset\030\002 \001(\0132\031.google.protobu" + + "f.Duration\0227\n\024first_audio_duration\030\003 \001(\013" + + "2\031.google.protobuf.Duration\022\030\n\020single_ut" + + "terance\030\005 \001(\010\022C\n speech_partial_results_" + + "end_times\030\006 \003(\0132\031.google.protobuf.Durati" + + "on\022A\n\036speech_final_results_end_times\030\007 \003" + + "(\0132\031.google.protobuf.Duration\022\031\n\021partial" + + "_responses\030\010 \001(\005\022,\n$speaker_id_passive_l" + + "atency_ms_offset\030\t \001(\005\022\037\n\027bargein_event_" + + "triggered\030\n \001(\010\022\037\n\027speech_single_utteran" + + "ce\030\013 \001(\010\022=\n\032dtmf_partial_results_times\030\014" + + " \003(\0132\031.google.protobuf.Duration\022;\n\030dtmf_" + + "final_results_times\030\r \003(\0132\031.google.proto" + + "buf.Duration\022C\n single_utterance_end_tim" + + "e_offset\030\016 \001(\0132\031.google.protobuf.Duratio" + + "n\0224\n\021no_speech_timeout\030\017 \001(\0132\031.google.pr" + + "otobuf.Duration\0226\n\023endpointing_timeout\030\023" + + " \001(\0132\031.google.protobuf.Duration\022\025\n\ris_in" + + "put_text\030\020 \001(\010\022@\n\035client_half_close_time" + + "_offset\030\021 \001(\0132\031.google.protobuf.Duration" + + "\022J\n\'client_half_close_streaming_time_off" + + "set\030\022 \001(\0132\031.google.protobuf.Duration\"\301\002\n" + + "\035StreamingDetectIntentResponse\022\\\n\022recogn" + + "ition_result\030\001 \001(\0132>.google.cloud.dialog" + + "flow.cx.v3beta1.StreamingRecognitionResu" + + "ltH\000\022Z\n\026detect_intent_response\030\002 \001(\01328.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Detect" + + "IntentResponseH\000\022Z\n\016debugging_info\030\004 \001(\013" + + "2B.google.cloud.dialogflow.cx.v3beta1.Cl" + + "oudConversationDebuggingInfoB\n\n\010response" + + "\"\300\003\n\032StreamingRecognitionResult\022`\n\014messa" + + "ge_type\030\001 \001(\0162J.google.cloud.dialogflow." + + "cx.v3beta1.StreamingRecognitionResult.Me" + + "ssageType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_fina" + + "l\030\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022\021\n\tstability" + + "\030\006 \001(\002\022L\n\020speech_word_info\030\007 \003(\01322.googl" + + "e.cloud.dialogflow.cx.v3beta1.SpeechWord" + + "Info\0224\n\021speech_end_offset\030\010 \001(\0132\031.google" + + ".protobuf.Duration\022\025\n\rlanguage_code\030\n \001(" + + "\t\"X\n\013MessageType\022\034\n\030MESSAGE_TYPE_UNSPECI" + + "FIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SINGLE_" + + "UTTERANCE\020\002\"\224\005\n\017QueryParameters\022\021\n\ttime_" + + "zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023.googl" + + "e.type.LatLng\022S\n\024session_entity_types\030\003 " + + "\003(\01325.google.cloud.dialogflow.cx.v3beta1" + + ".SessionEntityType\022(\n\007payload\030\004 \001(\0132\027.go" + + "ogle.protobuf.Struct\022+\n\nparameters\030\005 \001(\013" + + "2\027.google.protobuf.Struct\0229\n\014current_pag" + + "e\030\006 \001(\tB#\372A \n\036dialogflow.googleapis.com/" + + "Page\022\027\n\017disable_webhook\030\007 \001(\010\022$\n\034analyze" + + "_query_text_sentiment\030\010 \001(\010\022`\n\017webhook_h" + + "eaders\030\n \003(\0132G.google.cloud.dialogflow.c" + + "x.v3beta1.QueryParameters.WebhookHeaders" + + "Entry\022=\n\rflow_versions\030\016 \003(\tB&\372A#\n!dialo" + + "gflow.googleapis.com/Version\022\017\n\007channel\030" + + "\017 \001(\t\0224\n\013session_ttl\030\020 \001(\0132\031.google.prot" + + "obuf.DurationB\004\342A\001\001\0325\n\023WebhookHeadersEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\365\002\n\nQ" + + "ueryInput\022=\n\004text\030\002 \001(\0132-.google.cloud.d" + + "ialogflow.cx.v3beta1.TextInputH\000\022A\n\006inte" + + "nt\030\003 \001(\0132/.google.cloud.dialogflow.cx.v3" + + "beta1.IntentInputH\000\022?\n\005audio\030\005 \001(\0132..goo" + + "gle.cloud.dialogflow.cx.v3beta1.AudioInp" + + "utH\000\022?\n\005event\030\006 \001(\0132..google.cloud.dialo" + + "gflow.cx.v3beta1.EventInputH\000\022=\n\004dtmf\030\007 " + "\001(\0132-.google.cloud.dialogflow.cx.v3beta1" - + ".TextInputH\000\022A\n\006intent\030\003 \001(\0132/.google.cl" - + "oud.dialogflow.cx.v3beta1.IntentInputH\000\022" - + "?\n\005audio\030\005 \001(\0132..google.cloud.dialogflow" - + ".cx.v3beta1.AudioInputH\000\022?\n\005event\030\006 \001(\0132" - + "..google.cloud.dialogflow.cx.v3beta1.Eve" - + "ntInputH\000\022=\n\004dtmf\030\007 \001(\0132-.google.cloud.d" - + "ialogflow.cx.v3beta1.DtmfInputH\000\022\033\n\rlang" - + "uage_code\030\004 \001(\tB\004\342A\001\002B\007\n\005input\"\277\006\n\013Query" - + "Result\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent" - + "\030\013 \001(\tB%\372A\"\n dialogflow.googleapis.com/I" - + "ntentH\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rtrigger" - + "_event\030\016 \001(\tH\000\022=\n\004dtmf\030\027 \001(\0132-.google.cl" - + "oud.dialogflow.cx.v3beta1.DtmfInputH\000\022\025\n" - + "\rlanguage_code\030\002 \001(\t\022+\n\nparameters\030\003 \001(\013" - + "2\027.google.protobuf.Struct\022N\n\021response_me" - + "ssages\030\004 \003(\01323.google.cloud.dialogflow.c" - + "x.v3beta1.ResponseMessage\022,\n\020webhook_sta" - + "tuses\030\r \003(\0132\022.google.rpc.Status\0221\n\020webho" - + "ok_payloads\030\006 \003(\0132\027.google.protobuf.Stru" - + "ct\022>\n\014current_page\030\007 \001(\0132(.google.cloud." - + "dialogflow.cx.v3beta1.Page\022>\n\006intent\030\010 \001" - + "(\0132*.google.cloud.dialogflow.cx.v3beta1." - + "IntentB\002\030\001\022\'\n\033intent_detection_confidenc" - + "e\030\t \001(\002B\002\030\001\0228\n\005match\030\017 \001(\0132).google.clou" - + "d.dialogflow.cx.v3beta1.Match\0220\n\017diagnos" - + "tic_info\030\n \001(\0132\027.google.protobuf.Struct\022" - + "^\n\031sentiment_analysis_result\030\021 \001(\0132;.goo" - + "gle.cloud.dialogflow.cx.v3beta1.Sentimen" - + "tAnalysisResultB\007\n\005query\"\037\n\tTextInput\022\022\n" - + "\004text\030\001 \001(\tB\004\342A\001\002\"H\n\013IntentInput\0229\n\006inte" - + "nt\030\001 \001(\tB)\342A\001\002\372A\"\n dialogflow.googleapis" - + ".com/Intent\"g\n\nAudioInput\022J\n\006config\030\001 \001(" - + "\01324.google.cloud.dialogflow.cx.v3beta1.I" - + "nputAudioConfigB\004\342A\001\002\022\r\n\005audio\030\002 \001(\014\"\033\n\n" - + "EventInput\022\r\n\005event\030\001 \001(\t\"1\n\tDtmfInput\022\016" - + "\n\006digits\030\001 \001(\t\022\024\n\014finish_digit\030\002 \001(\t\"\373\002\n" - + "\005Match\022:\n\006intent\030\001 \001(\0132*.google.cloud.di" - + "alogflow.cx.v3beta1.Intent\022\r\n\005event\030\006 \001(" - + "\t\022+\n\nparameters\030\002 \001(\0132\027.google.protobuf." - + "Struct\022\026\n\016resolved_input\030\003 \001(\t\022G\n\nmatch_" - + "type\030\004 \001(\01623.google.cloud.dialogflow.cx." - + "v3beta1.Match.MatchType\022\022\n\nconfidence\030\005 " - + "\001(\002\"\204\001\n\tMatchType\022\032\n\026MATCH_TYPE_UNSPECIF" - + "IED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021" - + "PARAMETER_FILLING\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_" - + "INPUT\020\005\022\t\n\005EVENT\020\006\"\212\002\n\022MatchIntentReques" - + "t\022;\n\007session\030\001 \001(\tB*\342A\001\002\372A#\n!dialogflow." - + "googleapis.com/Session\022I\n\014query_params\030\002" - + " \001(\01323.google.cloud.dialogflow.cx.v3beta" - + "1.QueryParameters\022I\n\013query_input\030\003 \001(\0132." - + ".google.cloud.dialogflow.cx.v3beta1.Quer" - + "yInputB\004\342A\001\002\022!\n\031persist_parameter_change" - + "s\030\005 \001(\010\"\232\002\n\023MatchIntentResponse\022\016\n\004text\030" - + "\001 \001(\tH\000\022?\n\016trigger_intent\030\002 \001(\tB%\372A\"\n di" - + "alogflow.googleapis.com/IntentH\000\022\024\n\ntran" - + "script\030\003 \001(\tH\000\022\027\n\rtrigger_event\030\006 \001(\tH\000\022" - + ":\n\007matches\030\004 \003(\0132).google.cloud.dialogfl" - + "ow.cx.v3beta1.Match\022>\n\014current_page\030\005 \001(" - + "\0132(.google.cloud.dialogflow.cx.v3beta1.P" - + "ageB\007\n\005query\"\372\001\n\024FulfillIntentRequest\022T\n" - + "\024match_intent_request\030\001 \001(\01326.google.clo" - + "ud.dialogflow.cx.v3beta1.MatchIntentRequ" - + "est\0228\n\005match\030\002 \001(\0132).google.cloud.dialog" - + "flow.cx.v3beta1.Match\022R\n\023output_audio_co" - + "nfig\030\003 \001(\01325.google.cloud.dialogflow.cx." - + "v3beta1.OutputAudioConfig\"\335\001\n\025FulfillInt" - + "entResponse\022\023\n\013response_id\030\001 \001(\t\022E\n\014quer" - + "y_result\030\002 \001(\0132/.google.cloud.dialogflow" - + ".cx.v3beta1.QueryResult\022\024\n\014output_audio\030" - + "\003 \001(\014\022R\n\023output_audio_config\030\004 \001(\01325.goo" - + "gle.cloud.dialogflow.cx.v3beta1.OutputAu" - + "dioConfig\";\n\027SentimentAnalysisResult\022\r\n\005" - + "score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\0022\212\n\n\010Sessi" - + "ons\022\272\002\n\014DetectIntent\0227.google.cloud.dial" - + "ogflow.cx.v3beta1.DetectIntentRequest\0328." - + "google.cloud.dialogflow.cx.v3beta1.Detec" - + "tIntentResponse\"\266\001\202\323\344\223\002\257\001\"J/v3beta1/{ses" - + "sion=projects/*/locations/*/agents/*/ses" - + "sions/*}:detectIntent:\001*Z^\"Y/v3beta1/{se" - + "ssion=projects/*/locations/*/agents/*/en" - + "vironments/*/sessions/*}:detectIntent:\001*" - + "\022\242\001\n\025StreamingDetectIntent\022@.google.clou" - + "d.dialogflow.cx.v3beta1.StreamingDetectI" - + "ntentRequest\032A.google.cloud.dialogflow.c" - + "x.v3beta1.StreamingDetectIntentResponse\"" - + "\000(\0010\001\022\265\002\n\013MatchIntent\0226.google.cloud.dia" - + "logflow.cx.v3beta1.MatchIntentRequest\0327." + + ".DtmfInputH\000\022\033\n\rlanguage_code\030\004 \001(\tB\004\342A\001" + + "\002B\007\n\005input\"\220\007\n\013QueryResult\022\016\n\004text\030\001 \001(\t" + + "H\000\022?\n\016trigger_intent\030\013 \001(\tB%\372A\"\n dialogf" + + "low.googleapis.com/IntentH\000\022\024\n\ntranscrip" + + "t\030\014 \001(\tH\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\022=\n\004dt" + + "mf\030\027 \001(\0132-.google.cloud.dialogflow.cx.v3" + + "beta1.DtmfInputH\000\022\025\n\rlanguage_code\030\002 \001(\t" + + "\022+\n\nparameters\030\003 \001(\0132\027.google.protobuf.S" + + "truct\022N\n\021response_messages\030\004 \003(\01323.googl" + + "e.cloud.dialogflow.cx.v3beta1.ResponseMe" + + "ssage\022,\n\020webhook_statuses\030\r \003(\0132\022.google" + + ".rpc.Status\0221\n\020webhook_payloads\030\006 \003(\0132\027." + + "google.protobuf.Struct\022>\n\014current_page\030\007" + + " \001(\0132(.google.cloud.dialogflow.cx.v3beta" + + "1.Page\022>\n\006intent\030\010 \001(\0132*.google.cloud.di" + + "alogflow.cx.v3beta1.IntentB\002\030\001\022\'\n\033intent" + + "_detection_confidence\030\t \001(\002B\002\030\001\0228\n\005match" + + "\030\017 \001(\0132).google.cloud.dialogflow.cx.v3be" + + "ta1.Match\0220\n\017diagnostic_info\030\n \001(\0132\027.goo" + + "gle.protobuf.Struct\022^\n\031sentiment_analysi" + + "s_result\030\021 \001(\0132;.google.cloud.dialogflow" + + ".cx.v3beta1.SentimentAnalysisResult\022O\n\021a" + + "dvanced_settings\030\025 \001(\01324.google.cloud.di" + + "alogflow.cx.v3beta1.AdvancedSettingsB\007\n\005" + + "query\"\037\n\tTextInput\022\022\n\004text\030\001 \001(\tB\004\342A\001\002\"H" + + "\n\013IntentInput\0229\n\006intent\030\001 \001(\tB)\342A\001\002\372A\"\n " + + "dialogflow.googleapis.com/Intent\"g\n\nAudi" + + "oInput\022J\n\006config\030\001 \001(\01324.google.cloud.di" + + "alogflow.cx.v3beta1.InputAudioConfigB\004\342A" + + "\001\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005event" + + "\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006digits\030\001 \001(\t\022\024\n\014f" + + "inish_digit\030\002 \001(\t\"\373\002\n\005Match\022:\n\006intent\030\001 " + + "\001(\0132*.google.cloud.dialogflow.cx.v3beta1" + + ".Intent\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030\002 \001" + + "(\0132\027.google.protobuf.Struct\022\026\n\016resolved_" + + "input\030\003 \001(\t\022G\n\nmatch_type\030\004 \001(\01623.google" + + ".cloud.dialogflow.cx.v3beta1.Match.Match" + + "Type\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchType\022\032" + + "\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021" + + "\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER_FILLING\020\003" + + "\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\"" + + "\212\002\n\022MatchIntentRequest\022;\n\007session\030\001 \001(\tB" + + "*\342A\001\002\372A#\n!dialogflow.googleapis.com/Sess" + + "ion\022I\n\014query_params\030\002 \001(\01323.google.cloud" + + ".dialogflow.cx.v3beta1.QueryParameters\022I" + + "\n\013query_input\030\003 \001(\0132..google.cloud.dialo" + + "gflow.cx.v3beta1.QueryInputB\004\342A\001\002\022!\n\031per" + + "sist_parameter_changes\030\005 \001(\010\"\232\002\n\023MatchIn" + + "tentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_" + + "intent\030\002 \001(\tB%\372A\"\n dialogflow.googleapis" + + ".com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rt" + + "rigger_event\030\006 \001(\tH\000\022:\n\007matches\030\004 \003(\0132)." + "google.cloud.dialogflow.cx.v3beta1.Match" - + "IntentResponse\"\264\001\202\323\344\223\002\255\001\"I/v3beta1/{sess" + + "\022>\n\014current_page\030\005 \001(\0132(.google.cloud.di" + + "alogflow.cx.v3beta1.PageB\007\n\005query\"\372\001\n\024Fu" + + "lfillIntentRequest\022T\n\024match_intent_reque" + + "st\030\001 \001(\01326.google.cloud.dialogflow.cx.v3" + + "beta1.MatchIntentRequest\0228\n\005match\030\002 \001(\0132" + + ").google.cloud.dialogflow.cx.v3beta1.Mat" + + "ch\022R\n\023output_audio_config\030\003 \001(\01325.google" + + ".cloud.dialogflow.cx.v3beta1.OutputAudio" + + "Config\"\335\001\n\025FulfillIntentResponse\022\023\n\013resp" + + "onse_id\030\001 \001(\t\022E\n\014query_result\030\002 \001(\0132/.go" + + "ogle.cloud.dialogflow.cx.v3beta1.QueryRe" + + "sult\022\024\n\014output_audio\030\003 \001(\014\022R\n\023output_aud" + + "io_config\030\004 \001(\01325.google.cloud.dialogflo" + + "w.cx.v3beta1.OutputAudioConfig\";\n\027Sentim" + + "entAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagn" + + "itude\030\002 \001(\0022\212\n\n\010Sessions\022\272\002\n\014DetectInten" + + "t\0227.google.cloud.dialogflow.cx.v3beta1.D" + + "etectIntentRequest\0328.google.cloud.dialog" + + "flow.cx.v3beta1.DetectIntentResponse\"\266\001\202" + + "\323\344\223\002\257\001\"J/v3beta1/{session=projects/*/loc" + + "ations/*/agents/*/sessions/*}:detectInte" + + "nt:\001*Z^\"Y/v3beta1/{session=projects/*/lo" + + "cations/*/agents/*/environments/*/sessio" + + "ns/*}:detectIntent:\001*\022\242\001\n\025StreamingDetec" + + "tIntent\022@.google.cloud.dialogflow.cx.v3b" + + "eta1.StreamingDetectIntentRequest\032A.goog" + + "le.cloud.dialogflow.cx.v3beta1.Streaming" + + "DetectIntentResponse\"\000(\0010\001\022\265\002\n\013MatchInte" + + "nt\0226.google.cloud.dialogflow.cx.v3beta1." + + "MatchIntentRequest\0327.google.cloud.dialog" + + "flow.cx.v3beta1.MatchIntentResponse\"\264\001\202\323" + + "\344\223\002\255\001\"I/v3beta1/{session=projects/*/loca" + + "tions/*/agents/*/sessions/*}:matchIntent" + + ":\001*Z]\"X/v3beta1/{session=projects/*/loca" + + "tions/*/agents/*/environments/*/sessions" + + "/*}:matchIntent:\001*\022\351\002\n\rFulfillIntent\0228.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Fulfil" + + "lIntentRequest\0329.google.cloud.dialogflow" + + ".cx.v3beta1.FulfillIntentResponse\"\342\001\202\323\344\223" + + "\002\333\001\"`/v3beta1/{match_intent_request.sess" + "ion=projects/*/locations/*/agents/*/sess" - + "ions/*}:matchIntent:\001*Z]\"X/v3beta1/{sess" - + "ion=projects/*/locations/*/agents/*/envi" - + "ronments/*/sessions/*}:matchIntent:\001*\022\351\002" - + "\n\rFulfillIntent\0228.google.cloud.dialogflo" - + "w.cx.v3beta1.FulfillIntentRequest\0329.goog" - + "le.cloud.dialogflow.cx.v3beta1.FulfillIn" - + "tentResponse\"\342\001\202\323\344\223\002\333\001\"`/v3beta1/{match_" - + "intent_request.session=projects/*/locati" - + "ons/*/agents/*/sessions/*}:fulfillIntent" - + ":\001*Zt\"o/v3beta1/{match_intent_request.se" - + "ssion=projects/*/locations/*/agents/*/en" - + "vironments/*/sessions/*}:fulfillIntent:\001" - + "*\032x\312A\031dialogflow.googleapis.com\322AYhttps:" - + "//www.googleapis.com/auth/cloud-platform" - + ",https://www.googleapis.com/auth/dialogf" - + "lowB\236\003\n&com.google.cloud.dialogflow.cx.v" - + "3beta1B\014SessionProtoP\001Z6cloud.google.com" - + "/go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001" - + "\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Be" - + "ta1\352\002&Google::Cloud::Dialogflow::CX::V3b" - + "eta1\352A\324\001\n!dialogflow.googleapis.com/Sess" - + "ion\022Iprojects/{project}/locations/{locat" - + "ion}/agents/{agent}/sessions/{session}\022d" - + "projects/{project}/locations/{location}/" - + "agents/{agent}/environments/{environment" - + "}/sessions/{session}b\006proto3" + + "ions/*}:fulfillIntent:\001*Zt\"o/v3beta1/{ma" + + "tch_intent_request.session=projects/*/lo" + + "cations/*/agents/*/environments/*/sessio" + + "ns/*}:fulfillIntent:\001*\032x\312A\031dialogflow.go" + + "ogleapis.com\322AYhttps://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/dialogflowB\236\003\n&com.google." + + "cloud.dialogflow.cx.v3beta1B\014SessionProt" + + "oP\001Z6cloud.google.com/go/dialogflow/cx/a" + + "piv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Clo" + + "ud.Dialogflow.Cx.V3Beta1\352\002&Google::Cloud" + + "::Dialogflow::CX::V3beta1\352A\324\001\n!dialogflo" + + "w.googleapis.com/Session\022Iprojects/{proj" + + "ect}/locations/{location}/agents/{agent}" + + "/sessions/{session}\022dprojects/{project}/" + + "locations/{location}/agents/{agent}/envi" + + "ronments/{environment}/sessions/{session" + + "}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -349,6 +353,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.IntentProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(), @@ -500,6 +505,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Match", "DiagnosticInfo", "SentimentAnalysisResult", + "AdvancedSettings", "Query", }); internal_static_google_cloud_dialogflow_cx_v3beta1_TextInput_descriptor = @@ -610,6 +616,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.IntentProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto index 983fb1ff8711..e6086381b6d7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto @@ -40,6 +40,23 @@ option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; // // Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. message AdvancedSettings { + // Define behaviors for DTMF (dual tone multi frequency). + message DtmfSettings { + // If true, incoming audio is processed for DTMF (dual tone multi frequency) + // events. For example, if the caller presses a button on their telephone + // keypad and DTMF processing is enabled, Dialogflow will detect the + // event (e.g. a "3" was pressed) in the incoming audio and pass the event + // to the bot to drive business logic (e.g. when 3 is pressed, return the + // account balance). + bool enabled = 1; + + // Max length of DTMF digits. + int32 max_digits = 2; + + // The digit that terminates a DTMF digit sequence. + string finish_digit = 3; + } + // Define behaviors on logging. message LoggingSettings { // If true, StackDriver logging is currently enabled. @@ -56,6 +73,14 @@ message AdvancedSettings { // - Flow level GcsDestination audio_export_gcs_destination = 2; + // Settings for DTMF. + // Exposed at the following levels: + // - Agent level + // - Flow level + // - Page level + // - Parameter level. + DtmfSettings dtmf_settings = 5; + // Settings for logging. // Settings for Dialogflow History, Contact Center messages, StackDriver logs, // and speech logging. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto index 861e02bcba3f..dd88934fdba7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3beta1/import_strategy.proto"; import "google/cloud/dialogflow/cx/v3beta1/page.proto"; import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto"; @@ -321,6 +322,10 @@ message Flow { // NLU related settings of the flow. NluSettings nlu_settings = 11; + // Hierarchical advanced settings for this flow. The settings exposed at the + // lower level overrides the settings exposed at the higher level. + AdvancedSettings advanced_settings = 14; + // Optional. Knowledge connector configuration. KnowledgeConnectorSettings knowledge_connector_settings = 18 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto index 23d8e388de3f..4817a7ba142f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3beta1; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3beta1/response_message.proto"; import "google/protobuf/struct.proto"; @@ -126,4 +127,15 @@ message Fulfillment { // Conditional cases for this fulfillment. repeated ConditionalCases conditional_cases = 5; + + // Hierarchical advanced settings for this fulfillment. The settings exposed + // at the lower level overrides the settings exposed at the higher level. + AdvancedSettings advanced_settings = 7; + + // If the flag is true, the agent will utilize LLM to generate a text + // response. If LLM generation fails, the defined + // [responses][google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages] in the + // fulfillment will be respected. This flag is only useful for fulfillments + // associated with no-match event handlers. + bool enable_generative_fallback = 12; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/inline.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/inline.proto new file mode 100644 index 000000000000..cf182ee289bf --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/inline.proto @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "InlineProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; + +// Inline destination for a Dialogflow operation that writes or exports objects +// (e.g. [intents][google.cloud.dialogflow.cx.v3beta1.Intent]) outside of +// Dialogflow. +message InlineDestination { + // Output only. The uncompressed byte content for the objects. + // Only populated in responses. + bytes content = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Inline source for a Dialogflow operation that reads or imports objects +// (e.g. [intents][google.cloud.dialogflow.cx.v3beta1.Intent]) into Dialogflow. +message InlineSource { + // The uncompressed byte content for the objects. + bytes content = 1; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto index b62ae80682b8..29a050a8ab66 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/intent.proto @@ -20,6 +20,8 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/inline.proto"; +import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -92,6 +94,50 @@ service Intents { }; option (google.api.method_signature) = "name"; } + + // Imports the specified intents into the agent. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: + // [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata] + // - `response`: + // [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse] + rpc ImportIntents(ImportIntentsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/intents:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ImportIntentsResponse" + metadata_type: "ImportIntentsMetadata" + }; + } + + // Exports the selected intents. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: + // [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata] + // - `response`: + // [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse] + rpc ExportIntents(ExportIntentsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/intents:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportIntentsResponse" + metadata_type: "ExportIntentsMetadata" + }; + } } // An intent represents a user's intent to interact with a conversational agent. @@ -388,3 +434,178 @@ enum IntentView { // All fields are populated. INTENT_VIEW_FULL = 2; } + +// The request message for +// [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents]. +message ImportIntentsRequest { + // Merge option when display name conflicts exist during import. + enum MergeOption { + // Unspecified. Should not be used. + MERGE_OPTION_UNSPECIFIED = 0; + + // DEPRECATED: Please use + // [REPORT_CONFLICT][ImportIntentsRequest.REPORT_CONFLICT] instead. + // Fail the request if there are intents whose display names conflict with + // the display names of intents in the agent. + REJECT = 1 [deprecated = true]; + + // Replace the original intent in the agent with the new intent when display + // name conflicts exist. + REPLACE = 2; + + // Merge the original intent with the new intent when display name conflicts + // exist. + MERGE = 3; + + // Create new intents with new display names to differentiate them from the + // existing intents when display name conflicts exist. + RENAME = 4; + + // Report conflict information if display names conflict is detected. + // Otherwise, import intents. + REPORT_CONFLICT = 5; + + // Keep the original intent and discard the conflicting new intent when + // display name conflicts exist. + KEEP = 6; + } + + // Required. The agent to import the intents into. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Required. The intents to import. + oneof intents { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import intents from. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string intents_uri = 2; + + // Uncompressed byte content of intents. + InlineSource intents_content = 3; + } + + // Merge option for importing intents. If not specified, `REJECT` is assumed. + MergeOption merge_option = 4; +} + +// The response message for +// [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents]. +message ImportIntentsResponse { + // Conflicting resources detected during the import process. Only filled when + // [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] is set in the + // request and there are conflicts in the display names. + message ConflictingResources { + // Display names of conflicting intents. + repeated string intent_display_names = 1; + + // Display names of conflicting entities. + repeated string entity_display_names = 2; + } + + // The unique identifier of the imported intents. + // Format: `projects//locations//agents//intents/`. + repeated string intents = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + }]; + + // Info which resources have conflicts when + // [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] merge_option is + // set in ImportIntentsRequest. + ConflictingResources conflicting_resources = 2; +} + +// Metadata returned for the +// [Intents.ImportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ImportIntents] +// long running operation. +message ImportIntentsMetadata {} + +// The request message for +// [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents]. +message ExportIntentsRequest { + // Data format of the exported intents. + enum DataFormat { + // Unspecified format. Treated as `BLOB`. + DATA_FORMAT_UNSPECIFIED = 0; + + // Intents will be exported as raw bytes. + BLOB = 1; + + // Intents will be exported in JSON format. + JSON = 2; + + // Intents will be exported in CSV format. + CSV = 3; + } + + // Required. The name of the parent agent to export intents. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Required. The name of the intents to export. + // Format: `projects//locations//agents//intents/`. + repeated string intents = 2 [(google.api.field_behavior) = REQUIRED]; + + // The destination to export. + oneof destination { + // Optional. The [Google Cloud + // Storage](https://cloud.google.com/storage/docs/) URI to export the + // intents to. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string intents_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The option to return the serialized intents inline. + bool intents_content_inline = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The data format of the exported intents. If not specified, `BLOB` + // is assumed. + DataFormat data_format = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents]. +message ExportIntentsResponse { + // The exported intents. + oneof intents { + // The URI to a file containing the exported intents. This field is + // populated only if `intents_uri` is specified in + // [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest]. + string intents_uri = 1; + + // Uncompressed byte content for intents. This field is populated only if + // `intents_content_inline` is set to true in + // [ExportIntentsRequest][google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest]. + InlineDestination intents_content = 2; + } +} + +// Metadata returned for the +// [Intents.ExportIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ExportIntents] +// long running operation. +message ExportIntentsMetadata {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto index 1d56080128c8..22c2283d89d0 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/page.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto"; import "google/cloud/dialogflow/cx/v3beta1/fulfillment.proto"; import "google/protobuf/empty.proto"; @@ -179,6 +180,10 @@ message Page { // no match or no input. repeated EventHandler event_handlers = 10; + // Hierarchical advanced settings for this page. The settings exposed at the + // lower level overrides the settings exposed at the higher level. + AdvancedSettings advanced_settings = 13; + // Optional. Knowledge connector configuration. KnowledgeConnectorSettings knowledge_connector_settings = 18 [(google.api.field_behavior) = OPTIONAL]; @@ -275,6 +280,10 @@ message Form { // redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is // enabled. bool redact = 11; + + // Hierarchical advanced settings for this parameter. The settings exposed + // at the lower level overrides the settings exposed at the higher level. + AdvancedSettings advanced_settings = 12; } // Parameters to collect from the user. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto index aae82bff3767..d0895cf89e44 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3beta1/audio_config.proto"; import "google/cloud/dialogflow/cx/v3beta1/intent.proto"; import "google/cloud/dialogflow/cx/v3beta1/page.proto"; @@ -766,6 +767,13 @@ message QueryResult { // [google.cloud.dialogflow.cx.v3beta1.QueryParameters.analyze_query_text_sentiment], // specified in the request. SentimentAnalysisResult sentiment_analysis_result = 17; + + // Returns the current advanced settings including IVR settings. Even though + // the operations configured by these settings are performed by Dialogflow, + // the client may need to perform special logic at the moment. For example, if + // Dialogflow exports audio to Google Cloud Storage, then the client may need + // to wait for the resulting object to appear in the bucket before proceeding. + AdvancedSettings advanced_settings = 21; } // Represents the natural language text to be processed. diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/AsyncExportIntents.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/AsyncExportIntents.java new file mode 100644 index 000000000000..7c45b8e3f29b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/AsyncExportIntents.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Intents_ExportIntents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.IntentsClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncExportIntents { + + public static void main(String[] args) throws Exception { + asyncExportIntents(); + } + + public static void asyncExportIntents() throws Exception { + // 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 (IntentsClient intentsClient = IntentsClient.create()) { + ExportIntentsRequest request = + ExportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllIntents(new ArrayList()) + .build(); + ApiFuture future = intentsClient.exportIntentsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Intents_ExportIntents_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/AsyncExportIntentsLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/AsyncExportIntentsLRO.java new file mode 100644 index 000000000000..2fb3346fc606 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/AsyncExportIntentsLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Intents_ExportIntents_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.IntentsClient; +import java.util.ArrayList; + +public class AsyncExportIntentsLRO { + + public static void main(String[] args) throws Exception { + asyncExportIntentsLRO(); + } + + public static void asyncExportIntentsLRO() throws Exception { + // 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 (IntentsClient intentsClient = IntentsClient.create()) { + ExportIntentsRequest request = + ExportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllIntents(new ArrayList()) + .build(); + OperationFuture future = + intentsClient.exportIntentsOperationCallable().futureCall(request); + // Do something. + ExportIntentsResponse response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Intents_ExportIntents_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/SyncExportIntents.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/SyncExportIntents.java new file mode 100644 index 000000000000..30e30575c0c1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/exportintents/SyncExportIntents.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Intents_ExportIntents_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.IntentsClient; +import java.util.ArrayList; + +public class SyncExportIntents { + + public static void main(String[] args) throws Exception { + syncExportIntents(); + } + + public static void syncExportIntents() throws Exception { + // 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 (IntentsClient intentsClient = IntentsClient.create()) { + ExportIntentsRequest request = + ExportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllIntents(new ArrayList()) + .build(); + ExportIntentsResponse response = intentsClient.exportIntentsAsync(request).get(); + } + } +} +// [END dialogflow_v3beta1_generated_Intents_ExportIntents_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/AsyncImportIntents.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/AsyncImportIntents.java new file mode 100644 index 000000000000..ee63cf8c7df2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/AsyncImportIntents.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Intents_ImportIntents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.IntentsClient; +import com.google.longrunning.Operation; + +public class AsyncImportIntents { + + public static void main(String[] args) throws Exception { + asyncImportIntents(); + } + + public static void asyncImportIntents() throws Exception { + // 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 (IntentsClient intentsClient = IntentsClient.create()) { + ImportIntentsRequest request = + ImportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + ApiFuture future = intentsClient.importIntentsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Intents_ImportIntents_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/AsyncImportIntentsLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/AsyncImportIntentsLRO.java new file mode 100644 index 000000000000..a587313bb645 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/AsyncImportIntentsLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Intents_ImportIntents_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.IntentsClient; + +public class AsyncImportIntentsLRO { + + public static void main(String[] args) throws Exception { + asyncImportIntentsLRO(); + } + + public static void asyncImportIntentsLRO() throws Exception { + // 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 (IntentsClient intentsClient = IntentsClient.create()) { + ImportIntentsRequest request = + ImportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + OperationFuture future = + intentsClient.importIntentsOperationCallable().futureCall(request); + // Do something. + ImportIntentsResponse response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Intents_ImportIntents_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/SyncImportIntents.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/SyncImportIntents.java new file mode 100644 index 000000000000..646613600c64 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/intents/importintents/SyncImportIntents.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Intents_ImportIntents_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.IntentsClient; + +public class SyncImportIntents { + + public static void main(String[] args) throws Exception { + syncImportIntents(); + } + + public static void syncImportIntents() throws Exception { + // 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 (IntentsClient intentsClient = IntentsClient.create()) { + ImportIntentsRequest request = + ImportIntentsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + ImportIntentsResponse response = intentsClient.importIntentsAsync(request).get(); + } + } +} +// [END dialogflow_v3beta1_generated_Intents_ImportIntents_sync]