diff --git a/generation_config.yaml b/generation_config.yaml index 76a9c95606a8..5edacfe42946 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.65.1 -googleapis_commitish: 415914bd49d41beaae8a9adb348ee2587c93aa70 +googleapis_commitish: 984014a92ee7bc436b1b8ee5829fda79d4792707 libraries_bom_version: 26.73.0 # the libraries are ordered with respect to library name, which is diff --git a/java-databasecenter/README.md b/java-databasecenter/README.md index 27c394a5e2da..0b54301e83e5 100644 --- a/java-databasecenter/README.md +++ b/java-databasecenter/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-databasecenter - 0.2.0 + 0.3.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-databasecenter:0.2.0' +implementation 'com.google.cloud:google-cloud-databasecenter:0.3.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-databasecenter" % "0.2.0" +libraryDependencies += "com.google.cloud" % "google-cloud-databasecenter" % "0.3.0" ``` ## Authentication @@ -181,7 +181,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-databasecenter/latest/overview [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-databasecenter.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-databasecenter/0.2.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-databasecenter/0.3.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClient.java b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClient.java index e5051440323a..ff017431ebae 100644 --- a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClient.java +++ b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClient.java @@ -47,15 +47,14 @@ * // - 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 (DatabaseCenterClient databaseCenterClient = DatabaseCenterClient.create()) { - * QueryProductsRequest request = - * QueryProductsRequest.newBuilder() + * AggregateIssueStatsRequest request = + * AggregateIssueStatsRequest.newBuilder() * .setParent("parent-995424086") - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .addAllSignalTypeGroups(new ArrayList()) + * .setBaselineDate(Date.newBuilder().build()) * .build(); - * for (Product element : databaseCenterClient.queryProducts(request).iterateAll()) { - * // doThingsWith(element); - * } + * AggregateIssueStatsResponse response = databaseCenterClient.aggregateIssueStats(request); * } * } * @@ -114,6 +113,20 @@ * * * + * + *

AggregateIssueStats + *

AggregateIssueStats provides database resource issues statistics. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ * + * + * * * *

See the individual methods for example code. @@ -564,6 +577,69 @@ public final QueryDatabaseResourceGroupsPagedResponse queryDatabaseResourceGroup return stub.queryDatabaseResourceGroupsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * AggregateIssueStats provides database resource issues statistics. + * + *

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 (DatabaseCenterClient databaseCenterClient = DatabaseCenterClient.create()) {
+   *   AggregateIssueStatsRequest request =
+   *       AggregateIssueStatsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFilter("filter-1274492040")
+   *           .addAllSignalTypeGroups(new ArrayList())
+   *           .setBaselineDate(Date.newBuilder().build())
+   *           .build();
+   *   AggregateIssueStatsResponse response = databaseCenterClient.aggregateIssueStats(request);
+   * }
+   * }
+ * + * @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 AggregateIssueStatsResponse aggregateIssueStats(AggregateIssueStatsRequest request) { + return aggregateIssueStatsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * AggregateIssueStats provides database resource issues statistics. + * + *

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 (DatabaseCenterClient databaseCenterClient = DatabaseCenterClient.create()) {
+   *   AggregateIssueStatsRequest request =
+   *       AggregateIssueStatsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFilter("filter-1274492040")
+   *           .addAllSignalTypeGroups(new ArrayList())
+   *           .setBaselineDate(Date.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       databaseCenterClient.aggregateIssueStatsCallable().futureCall(request);
+   *   // Do something.
+   *   AggregateIssueStatsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + aggregateIssueStatsCallable() { + return stub.aggregateIssueStatsCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterSettings.java b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterSettings.java index b7bec0796589..945176936a56 100644 --- a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterSettings.java +++ b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterSettings.java @@ -55,7 +55,7 @@ * *

For example, to set the * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of queryProducts: + * of aggregateIssueStats: * *

{@code
  * // This snippet has been automatically generated and should be regarded as a code template only.
@@ -66,10 +66,10 @@
  * DatabaseCenterSettings.Builder databaseCenterSettingsBuilder =
  *     DatabaseCenterSettings.newBuilder();
  * databaseCenterSettingsBuilder
- *     .queryProductsSettings()
+ *     .aggregateIssueStatsSettings()
  *     .setRetrySettings(
  *         databaseCenterSettingsBuilder
- *             .queryProductsSettings()
+ *             .aggregateIssueStatsSettings()
  *             .getRetrySettings()
  *             .toBuilder()
  *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
@@ -114,6 +114,12 @@ public class DatabaseCenterSettings extends ClientSettings
+      aggregateIssueStatsSettings() {
+    return ((DatabaseCenterStubSettings) getStubSettings()).aggregateIssueStatsSettings();
+  }
+
   public static final DatabaseCenterSettings create(DatabaseCenterStubSettings stub)
       throws IOException {
     return new DatabaseCenterSettings.Builder(stub.toBuilder()).build();
@@ -249,6 +255,12 @@ public Builder applyToAllUnaryMethods(
       return getStubSettingsBuilder().queryDatabaseResourceGroupsSettings();
     }
 
+    /** Returns the builder for the settings used for calls to aggregateIssueStats. */
+    public UnaryCallSettings.Builder
+        aggregateIssueStatsSettings() {
+      return getStubSettingsBuilder().aggregateIssueStatsSettings();
+    }
+
     @Override
     public DatabaseCenterSettings build() throws IOException {
       return new DatabaseCenterSettings(this);
diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/gapic_metadata.json b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/gapic_metadata.json
index 2590bb182e55..c45ba2664465 100644
--- a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/gapic_metadata.json
+++ b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/gapic_metadata.json
@@ -13,6 +13,9 @@
             "AggregateFleet": {
               "methods": ["aggregateFleet", "aggregateFleetPagedCallable", "aggregateFleetCallable"]
             },
+            "AggregateIssueStats": {
+              "methods": ["aggregateIssueStats", "aggregateIssueStatsCallable"]
+            },
             "QueryDatabaseResourceGroups": {
               "methods": ["queryDatabaseResourceGroups", "queryDatabaseResourceGroupsPagedCallable", "queryDatabaseResourceGroupsCallable"]
             },
diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/package-info.java b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/package-info.java
index a27b731ee387..396c675d6d59 100644
--- a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/package-info.java
+++ b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/package-info.java
@@ -33,15 +33,14 @@
  * // - 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 (DatabaseCenterClient databaseCenterClient = DatabaseCenterClient.create()) {
- *   QueryProductsRequest request =
- *       QueryProductsRequest.newBuilder()
+ *   AggregateIssueStatsRequest request =
+ *       AggregateIssueStatsRequest.newBuilder()
  *           .setParent("parent-995424086")
- *           .setPageSize(883849137)
- *           .setPageToken("pageToken873572522")
+ *           .setFilter("filter-1274492040")
+ *           .addAllSignalTypeGroups(new ArrayList())
+ *           .setBaselineDate(Date.newBuilder().build())
  *           .build();
- *   for (Product element : databaseCenterClient.queryProducts(request).iterateAll()) {
- *     // doThingsWith(element);
- *   }
+ *   AggregateIssueStatsResponse response = databaseCenterClient.aggregateIssueStats(request);
  * }
  * }
*/ diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/DatabaseCenterStub.java b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/DatabaseCenterStub.java index b1a439debeff..1ac02449f7de 100644 --- a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/DatabaseCenterStub.java +++ b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/DatabaseCenterStub.java @@ -25,6 +25,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.databasecenter.v1beta.AggregateFleetRequest; import com.google.cloud.databasecenter.v1beta.AggregateFleetResponse; +import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest; +import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse; import com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest; import com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsResponse; import com.google.cloud.databasecenter.v1beta.QueryProductsRequest; @@ -71,6 +73,11 @@ public UnaryCallable aggregateFle "Not implemented: queryDatabaseResourceGroupsCallable()"); } + public UnaryCallable + aggregateIssueStatsCallable() { + throw new UnsupportedOperationException("Not implemented: aggregateIssueStatsCallable()"); + } + @Override public abstract void close(); } diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/DatabaseCenterStubSettings.java b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/DatabaseCenterStubSettings.java index 8fe4f8d1a481..c6f6a4f56365 100644 --- a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/DatabaseCenterStubSettings.java +++ b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/DatabaseCenterStubSettings.java @@ -49,6 +49,8 @@ import com.google.cloud.databasecenter.v1beta.AggregateFleetRequest; import com.google.cloud.databasecenter.v1beta.AggregateFleetResponse; import com.google.cloud.databasecenter.v1beta.AggregateFleetRow; +import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest; +import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse; import com.google.cloud.databasecenter.v1beta.DatabaseResourceGroup; import com.google.cloud.databasecenter.v1beta.Product; import com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest; @@ -81,7 +83,7 @@ * *

For example, to set the * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of queryProducts: + * of aggregateIssueStats: * *

{@code
  * // This snippet has been automatically generated and should be regarded as a code template only.
@@ -92,10 +94,10 @@
  * DatabaseCenterStubSettings.Builder databaseCenterSettingsBuilder =
  *     DatabaseCenterStubSettings.newBuilder();
  * databaseCenterSettingsBuilder
- *     .queryProductsSettings()
+ *     .aggregateIssueStatsSettings()
  *     .setRetrySettings(
  *         databaseCenterSettingsBuilder
- *             .queryProductsSettings()
+ *             .aggregateIssueStatsSettings()
  *             .getRetrySettings()
  *             .toBuilder()
  *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
@@ -132,6 +134,8 @@ public class DatabaseCenterStubSettings extends StubSettings
       queryDatabaseResourceGroupsSettings;
+  private final UnaryCallSettings
+      aggregateIssueStatsSettings;
 
   private static final PagedListDescriptor
       QUERY_PRODUCTS_PAGE_STR_DESC =
@@ -337,6 +341,12 @@ public ApiFuture getFuturePagedRespons
     return queryDatabaseResourceGroupsSettings;
   }
 
+  /** Returns the object with the settings used for calls to aggregateIssueStats. */
+  public UnaryCallSettings
+      aggregateIssueStatsSettings() {
+    return aggregateIssueStatsSettings;
+  }
+
   public DatabaseCenterStub createStub() throws IOException {
     if (getTransportChannelProvider()
         .getTransportName()
@@ -452,6 +462,7 @@ protected DatabaseCenterStubSettings(Builder settingsBuilder) throws IOException
     aggregateFleetSettings = settingsBuilder.aggregateFleetSettings().build();
     queryDatabaseResourceGroupsSettings =
         settingsBuilder.queryDatabaseResourceGroupsSettings().build();
+    aggregateIssueStatsSettings = settingsBuilder.aggregateIssueStatsSettings().build();
   }
 
   /** Builder for DatabaseCenterStubSettings. */
@@ -468,6 +479,8 @@ public static class Builder extends StubSettings.Builder
         queryDatabaseResourceGroupsSettings;
+    private final UnaryCallSettings.Builder
+        aggregateIssueStatsSettings;
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
 
@@ -499,10 +512,14 @@ protected Builder(ClientContext clientContext) {
       aggregateFleetSettings = PagedCallSettings.newBuilder(AGGREGATE_FLEET_PAGE_STR_FACT);
       queryDatabaseResourceGroupsSettings =
           PagedCallSettings.newBuilder(QUERY_DATABASE_RESOURCE_GROUPS_PAGE_STR_FACT);
+      aggregateIssueStatsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
-              queryProductsSettings, aggregateFleetSettings, queryDatabaseResourceGroupsSettings);
+              queryProductsSettings,
+              aggregateFleetSettings,
+              queryDatabaseResourceGroupsSettings,
+              aggregateIssueStatsSettings);
       initDefaults(this);
     }
 
@@ -513,10 +530,14 @@ protected Builder(DatabaseCenterStubSettings settings) {
       aggregateFleetSettings = settings.aggregateFleetSettings.toBuilder();
       queryDatabaseResourceGroupsSettings =
           settings.queryDatabaseResourceGroupsSettings.toBuilder();
+      aggregateIssueStatsSettings = settings.aggregateIssueStatsSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
-              queryProductsSettings, aggregateFleetSettings, queryDatabaseResourceGroupsSettings);
+              queryProductsSettings,
+              aggregateFleetSettings,
+              queryDatabaseResourceGroupsSettings,
+              aggregateIssueStatsSettings);
     }
 
     private static Builder createDefault() {
@@ -559,6 +580,11 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
 
+      builder
+          .aggregateIssueStatsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
       return builder;
     }
 
@@ -600,6 +626,12 @@ public Builder applyToAllUnaryMethods(
       return queryDatabaseResourceGroupsSettings;
     }
 
+    /** Returns the builder for the settings used for calls to aggregateIssueStats. */
+    public UnaryCallSettings.Builder
+        aggregateIssueStatsSettings() {
+      return aggregateIssueStatsSettings;
+    }
+
     @Override
     public DatabaseCenterStubSettings build() throws IOException {
       return new DatabaseCenterStubSettings(this);
diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/GrpcDatabaseCenterStub.java b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/GrpcDatabaseCenterStub.java
index 62bd1a017efd..0d95c8cebd38 100644
--- a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/GrpcDatabaseCenterStub.java
+++ b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/GrpcDatabaseCenterStub.java
@@ -29,6 +29,8 @@
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.cloud.databasecenter.v1beta.AggregateFleetRequest;
 import com.google.cloud.databasecenter.v1beta.AggregateFleetResponse;
+import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest;
+import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse;
 import com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest;
 import com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsResponse;
 import com.google.cloud.databasecenter.v1beta.QueryProductsRequest;
@@ -88,6 +90,19 @@ public class GrpcDatabaseCenterStub extends DatabaseCenterStub {
               .setSampledToLocalTracing(true)
               .build();
 
+  private static final MethodDescriptor
+      aggregateIssueStatsMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(
+                  "google.cloud.databasecenter.v1beta.DatabaseCenter/AggregateIssueStats")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(AggregateIssueStatsRequest.getDefaultInstance()))
+              .setResponseMarshaller(
+                  ProtoUtils.marshaller(AggregateIssueStatsResponse.getDefaultInstance()))
+              .setSampledToLocalTracing(true)
+              .build();
+
   private final UnaryCallable queryProductsCallable;
   private final UnaryCallable
       queryProductsPagedCallable;
@@ -100,6 +115,8 @@ public class GrpcDatabaseCenterStub extends DatabaseCenterStub {
   private final UnaryCallable<
           QueryDatabaseResourceGroupsRequest, QueryDatabaseResourceGroupsPagedResponse>
       queryDatabaseResourceGroupsPagedCallable;
+  private final UnaryCallable
+      aggregateIssueStatsCallable;
 
   private final BackgroundResource backgroundResources;
   private final GrpcOperationsStub operationsStub;
@@ -161,6 +178,11 @@ protected GrpcDatabaseCenterStub(
                     newBuilder()
                 .setMethodDescriptor(queryDatabaseResourceGroupsMethodDescriptor)
                 .build();
+    GrpcCallSettings
+        aggregateIssueStatsTransportSettings =
+            GrpcCallSettings.newBuilder()
+                .setMethodDescriptor(aggregateIssueStatsMethodDescriptor)
+                .build();
 
     this.queryProductsCallable =
         callableFactory.createUnaryCallable(
@@ -184,6 +206,11 @@ protected GrpcDatabaseCenterStub(
             queryDatabaseResourceGroupsTransportSettings,
             settings.queryDatabaseResourceGroupsSettings(),
             clientContext);
+    this.aggregateIssueStatsCallable =
+        callableFactory.createUnaryCallable(
+            aggregateIssueStatsTransportSettings,
+            settings.aggregateIssueStatsSettings(),
+            clientContext);
 
     this.backgroundResources =
         new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -227,6 +254,12 @@ public UnaryCallable aggregateFle
     return queryDatabaseResourceGroupsPagedCallable;
   }
 
+  @Override
+  public UnaryCallable
+      aggregateIssueStatsCallable() {
+    return aggregateIssueStatsCallable;
+  }
+
   @Override
   public final void close() {
     try {
diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/HttpJsonDatabaseCenterStub.java b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/HttpJsonDatabaseCenterStub.java
index c82fdc6c50b8..aa4648a6d4f0 100644
--- a/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/HttpJsonDatabaseCenterStub.java
+++ b/java-databasecenter/google-cloud-databasecenter/src/main/java/com/google/cloud/databasecenter/v1beta/stub/HttpJsonDatabaseCenterStub.java
@@ -34,6 +34,8 @@
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.cloud.databasecenter.v1beta.AggregateFleetRequest;
 import com.google.cloud.databasecenter.v1beta.AggregateFleetResponse;
+import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest;
+import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse;
 import com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest;
 import com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsResponse;
 import com.google.cloud.databasecenter.v1beta.QueryProductsRequest;
@@ -176,6 +178,43 @@ public class HttpJsonDatabaseCenterStub extends DatabaseCenterStub {
                       .build())
               .build();
 
+  private static final ApiMethodDescriptor
+      aggregateIssueStatsMethodDescriptor =
+          ApiMethodDescriptor.newBuilder()
+              .setFullMethodName(
+                  "google.cloud.databasecenter.v1beta.DatabaseCenter/AggregateIssueStats")
+              .setHttpMethod("POST")
+              .setType(ApiMethodDescriptor.MethodType.UNARY)
+              .setRequestFormatter(
+                  ProtoMessageRequestFormatter.newBuilder()
+                      .setPath(
+                          "/v1beta:aggregateIssueStats",
+                          request -> {
+                            Map fields = new HashMap<>();
+                            ProtoRestSerializer serializer =
+                                ProtoRestSerializer.create();
+                            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().build(), true))
+                      .build())
+              .setResponseParser(
+                  ProtoMessageResponseParser.newBuilder()
+                      .setDefaultInstance(AggregateIssueStatsResponse.getDefaultInstance())
+                      .setDefaultTypeRegistry(typeRegistry)
+                      .build())
+              .build();
+
   private final UnaryCallable queryProductsCallable;
   private final UnaryCallable
       queryProductsPagedCallable;
@@ -188,6 +227,8 @@ public class HttpJsonDatabaseCenterStub extends DatabaseCenterStub {
   private final UnaryCallable<
           QueryDatabaseResourceGroupsRequest, QueryDatabaseResourceGroupsPagedResponse>
       queryDatabaseResourceGroupsPagedCallable;
+  private final UnaryCallable
+      aggregateIssueStatsCallable;
 
   private final BackgroundResource backgroundResources;
   private final HttpJsonStubCallableFactory callableFactory;
@@ -251,6 +292,13 @@ protected HttpJsonDatabaseCenterStub(
                 .setMethodDescriptor(queryDatabaseResourceGroupsMethodDescriptor)
                 .setTypeRegistry(typeRegistry)
                 .build();
+    HttpJsonCallSettings
+        aggregateIssueStatsTransportSettings =
+            HttpJsonCallSettings
+                .newBuilder()
+                .setMethodDescriptor(aggregateIssueStatsMethodDescriptor)
+                .setTypeRegistry(typeRegistry)
+                .build();
 
     this.queryProductsCallable =
         callableFactory.createUnaryCallable(
@@ -274,6 +322,11 @@ protected HttpJsonDatabaseCenterStub(
             queryDatabaseResourceGroupsTransportSettings,
             settings.queryDatabaseResourceGroupsSettings(),
             clientContext);
+    this.aggregateIssueStatsCallable =
+        callableFactory.createUnaryCallable(
+            aggregateIssueStatsTransportSettings,
+            settings.aggregateIssueStatsSettings(),
+            clientContext);
 
     this.backgroundResources =
         new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -285,6 +338,7 @@ public static List getMethodDescriptors() {
     methodDescriptors.add(queryProductsMethodDescriptor);
     methodDescriptors.add(aggregateFleetMethodDescriptor);
     methodDescriptors.add(queryDatabaseResourceGroupsMethodDescriptor);
+    methodDescriptors.add(aggregateIssueStatsMethodDescriptor);
     return methodDescriptors;
   }
 
@@ -322,6 +376,12 @@ public UnaryCallable aggregateFle
     return queryDatabaseResourceGroupsPagedCallable;
   }
 
+  @Override
+  public UnaryCallable
+      aggregateIssueStatsCallable() {
+    return aggregateIssueStatsCallable;
+  }
+
   @Override
   public final void close() {
     try {
diff --git a/java-databasecenter/google-cloud-databasecenter/src/main/resources/META-INF/native-image/com.google.cloud.databasecenter.v1beta/reflect-config.json b/java-databasecenter/google-cloud-databasecenter/src/main/resources/META-INF/native-image/com.google.cloud.databasecenter.v1beta/reflect-config.json
index 4ceaa6974bf6..443ff777aec8 100644
--- a/java-databasecenter/google-cloud-databasecenter/src/main/resources/META-INF/native-image/com.google.cloud.databasecenter.v1beta/reflect-config.json
+++ b/java-databasecenter/google-cloud-databasecenter/src/main/resources/META-INF/native-image/com.google.cloud.databasecenter.v1beta/reflect-config.json
@@ -485,6 +485,42 @@
     "allDeclaredClasses": true,
     "allPublicClasses": true
   },
+  {
+    "name": "com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest",
+    "queryAllDeclaredConstructors": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredClasses": true,
+    "allPublicClasses": true
+  },
+  {
+    "name": "com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest$Builder",
+    "queryAllDeclaredConstructors": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredClasses": true,
+    "allPublicClasses": true
+  },
+  {
+    "name": "com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse",
+    "queryAllDeclaredConstructors": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredClasses": true,
+    "allPublicClasses": true
+  },
+  {
+    "name": "com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse$Builder",
+    "queryAllDeclaredConstructors": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredClasses": true,
+    "allPublicClasses": true
+  },
   {
     "name": "com.google.cloud.databasecenter.v1beta.AutomatedBackupPolicyInfo",
     "queryAllDeclaredConstructors": true,
@@ -692,6 +728,24 @@
     "allDeclaredClasses": true,
     "allPublicClasses": true
   },
+  {
+    "name": "com.google.cloud.databasecenter.v1beta.IssueGroupStats",
+    "queryAllDeclaredConstructors": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredClasses": true,
+    "allPublicClasses": true
+  },
+  {
+    "name": "com.google.cloud.databasecenter.v1beta.IssueGroupStats$Builder",
+    "queryAllDeclaredConstructors": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredClasses": true,
+    "allPublicClasses": true
+  },
   {
     "name": "com.google.cloud.databasecenter.v1beta.IssueSeverity",
     "queryAllDeclaredConstructors": true,
@@ -701,6 +755,24 @@
     "allDeclaredClasses": true,
     "allPublicClasses": true
   },
+  {
+    "name": "com.google.cloud.databasecenter.v1beta.IssueStats",
+    "queryAllDeclaredConstructors": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredClasses": true,
+    "allPublicClasses": true
+  },
+  {
+    "name": "com.google.cloud.databasecenter.v1beta.IssueStats$Builder",
+    "queryAllDeclaredConstructors": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredClasses": true,
+    "allPublicClasses": true
+  },
   {
     "name": "com.google.cloud.databasecenter.v1beta.Label",
     "queryAllDeclaredConstructors": true,
diff --git a/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClientHttpJsonTest.java b/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClientHttpJsonTest.java
index 0d895e8ea332..906a6e7d68b2 100644
--- a/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClientHttpJsonTest.java
+++ b/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClientHttpJsonTest.java
@@ -275,4 +275,63 @@ public void queryDatabaseResourceGroupsExceptionTest() throws Exception {
       // Expected exception.
     }
   }
+
+  @Test
+  public void aggregateIssueStatsTest() throws Exception {
+    AggregateIssueStatsResponse expectedResponse =
+        AggregateIssueStatsResponse.newBuilder()
+            .addAllIssueGroupStats(new ArrayList())
+            .setTotalResourcesCount(-1148081286)
+            .setTotalResourceGroupsCount(-1586193222)
+            .addAllUnreachable(new ArrayList())
+            .build();
+    mockService.addResponse(expectedResponse);
+
+    AggregateIssueStatsRequest request =
+        AggregateIssueStatsRequest.newBuilder()
+            .setParent("parent-995424086")
+            .setFilter("filter-1274492040")
+            .addAllSignalTypeGroups(new ArrayList())
+            .setBaselineDate(Date.newBuilder().build())
+            .build();
+
+    AggregateIssueStatsResponse actualResponse = client.aggregateIssueStats(request);
+    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 aggregateIssueStatsExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      AggregateIssueStatsRequest request =
+          AggregateIssueStatsRequest.newBuilder()
+              .setParent("parent-995424086")
+              .setFilter("filter-1274492040")
+              .addAllSignalTypeGroups(new ArrayList())
+              .setBaselineDate(Date.newBuilder().build())
+              .build();
+      client.aggregateIssueStats(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
 }
diff --git a/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClientTest.java b/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClientTest.java
index 4b24b1d0f456..002d66141ae3 100644
--- a/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClientTest.java
+++ b/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterClientTest.java
@@ -275,4 +275,60 @@ public void queryDatabaseResourceGroupsExceptionTest() throws Exception {
       // Expected exception.
     }
   }
+
+  @Test
+  public void aggregateIssueStatsTest() throws Exception {
+    AggregateIssueStatsResponse expectedResponse =
+        AggregateIssueStatsResponse.newBuilder()
+            .addAllIssueGroupStats(new ArrayList())
+            .setTotalResourcesCount(-1148081286)
+            .setTotalResourceGroupsCount(-1586193222)
+            .addAllUnreachable(new ArrayList())
+            .build();
+    mockDatabaseCenter.addResponse(expectedResponse);
+
+    AggregateIssueStatsRequest request =
+        AggregateIssueStatsRequest.newBuilder()
+            .setParent("parent-995424086")
+            .setFilter("filter-1274492040")
+            .addAllSignalTypeGroups(new ArrayList())
+            .setBaselineDate(Date.newBuilder().build())
+            .build();
+
+    AggregateIssueStatsResponse actualResponse = client.aggregateIssueStats(request);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockDatabaseCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    AggregateIssueStatsRequest actualRequest = ((AggregateIssueStatsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(request.getParent(), actualRequest.getParent());
+    Assert.assertEquals(request.getFilter(), actualRequest.getFilter());
+    Assert.assertEquals(request.getSignalTypeGroupsList(), actualRequest.getSignalTypeGroupsList());
+    Assert.assertEquals(request.getBaselineDate(), actualRequest.getBaselineDate());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void aggregateIssueStatsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockDatabaseCenter.addException(exception);
+
+    try {
+      AggregateIssueStatsRequest request =
+          AggregateIssueStatsRequest.newBuilder()
+              .setParent("parent-995424086")
+              .setFilter("filter-1274492040")
+              .addAllSignalTypeGroups(new ArrayList())
+              .setBaselineDate(Date.newBuilder().build())
+              .build();
+      client.aggregateIssueStats(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
 }
diff --git a/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/MockDatabaseCenterImpl.java b/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/MockDatabaseCenterImpl.java
index 735234316598..416eee07d67e 100644
--- a/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/MockDatabaseCenterImpl.java
+++ b/java-databasecenter/google-cloud-databasecenter/src/test/java/com/google/cloud/databasecenter/v1beta/MockDatabaseCenterImpl.java
@@ -122,4 +122,26 @@ public void queryDatabaseResourceGroups(
                   Exception.class.getName())));
     }
   }
+
+  @Override
+  public void aggregateIssueStats(
+      AggregateIssueStatsRequest request,
+      StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof AggregateIssueStatsResponse) {
+      requests.add(request);
+      responseObserver.onNext(((AggregateIssueStatsResponse) 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 AggregateIssueStats, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  AggregateIssueStatsResponse.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
 }
diff --git a/java-databasecenter/grpc-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterGrpc.java b/java-databasecenter/grpc-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterGrpc.java
index e9983acf42e3..a0c4d1b10567 100644
--- a/java-databasecenter/grpc-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterGrpc.java
+++ b/java-databasecenter/grpc-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/DatabaseCenterGrpc.java
@@ -181,6 +181,55 @@ private DatabaseCenterGrpc() {}
     return getQueryDatabaseResourceGroupsMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest,
+          com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse>
+      getAggregateIssueStatsMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "AggregateIssueStats",
+      requestType = com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest.class,
+      responseType = com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest,
+          com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse>
+      getAggregateIssueStatsMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest,
+            com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse>
+        getAggregateIssueStatsMethod;
+    if ((getAggregateIssueStatsMethod = DatabaseCenterGrpc.getAggregateIssueStatsMethod) == null) {
+      synchronized (DatabaseCenterGrpc.class) {
+        if ((getAggregateIssueStatsMethod = DatabaseCenterGrpc.getAggregateIssueStatsMethod)
+            == null) {
+          DatabaseCenterGrpc.getAggregateIssueStatsMethod =
+              getAggregateIssueStatsMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(
+                          generateFullMethodName(SERVICE_NAME, "AggregateIssueStats"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse
+                                  .getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new DatabaseCenterMethodDescriptorSupplier("AggregateIssueStats"))
+                      .build();
+        }
+      }
+    }
+    return getAggregateIssueStatsMethod;
+  }
+
   /** Creates a new async stub that supports all call types for the service */
   public static DatabaseCenterStub newStub(io.grpc.Channel channel) {
     io.grpc.stub.AbstractStub.StubFactory factory =
@@ -291,6 +340,22 @@ default void queryDatabaseResourceGroups(
       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
           getQueryDatabaseResourceGroupsMethod(), responseObserver);
     }
+
+    /**
+     *
+     *
+     * 
+     * AggregateIssueStats provides database resource issues statistics.
+     * 
+ */ + default void aggregateIssueStats( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAggregateIssueStatsMethod(), responseObserver); + } } /** @@ -380,6 +445,24 @@ public void queryDatabaseResourceGroups( request, responseObserver); } + + /** + * + * + *
+     * AggregateIssueStats provides database resource issues statistics.
+     * 
+ */ + public void aggregateIssueStats( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAggregateIssueStatsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -445,6 +528,20 @@ public com.google.cloud.databasecenter.v1beta.AggregateFleetResponse aggregateFl return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getQueryDatabaseResourceGroupsMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * AggregateIssueStats provides database resource issues statistics.
+     * 
+ */ + public com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse aggregateIssueStats( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getAggregateIssueStatsMethod(), getCallOptions(), request); + } } /** @@ -507,6 +604,19 @@ public com.google.cloud.databasecenter.v1beta.AggregateFleetResponse aggregateFl return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getQueryDatabaseResourceGroupsMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * AggregateIssueStats provides database resource issues statistics.
+     * 
+ */ + public com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse aggregateIssueStats( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAggregateIssueStatsMethod(), getCallOptions(), request); + } } /** @@ -572,11 +682,27 @@ protected DatabaseCenterFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getQueryDatabaseResourceGroupsMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * AggregateIssueStats provides database resource issues statistics.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse> + aggregateIssueStats( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAggregateIssueStatsMethod(), getCallOptions()), request); + } } private static final int METHODID_QUERY_PRODUCTS = 0; private static final int METHODID_AGGREGATE_FLEET = 1; private static final int METHODID_QUERY_DATABASE_RESOURCE_GROUPS = 2; + private static final int METHODID_AGGREGATE_ISSUE_STATS = 3; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -616,6 +742,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsResponse>) responseObserver); break; + case METHODID_AGGREGATE_ISSUE_STATS: + serviceImpl.aggregateIssueStats( + (com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -655,6 +788,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest, com.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsResponse>( service, METHODID_QUERY_DATABASE_RESOURCE_GROUPS))) + .addMethod( + getAggregateIssueStatsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest, + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse>( + service, METHODID_AGGREGATE_ISSUE_STATS))) .build(); } @@ -709,6 +849,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getQueryProductsMethod()) .addMethod(getAggregateFleetMethod()) .addMethod(getQueryDatabaseResourceGroupsMethod()) + .addMethod(getAggregateIssueStatsMethod()) .build(); } } diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsRequest.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsRequest.java new file mode 100644 index 000000000000..eee468c3b4fa --- /dev/null +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsRequest.java @@ -0,0 +1,1891 @@ +/* + * Copyright 2026 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/databasecenter/v1beta/service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.databasecenter.v1beta; + +/** + * + * + *
+ * AggregateIssueStatsRequest represents the input to the AggregateIssueStats
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest} + */ +public final class AggregateIssueStatsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest) + AggregateIssueStatsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AggregateIssueStatsRequest.newBuilder() to construct. + private AggregateIssueStatsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AggregateIssueStatsRequest() { + parent_ = ""; + filter_ = ""; + signalTypeGroups_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AggregateIssueStatsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest.class, + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent can be a project, a folder, or an organization. The search
+   * is limited to the resources within the `scope`.
+   *
+   * The allowed values are:
+   *
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Parent can be a project, a folder, or an organization. The search
+   * is limited to the resources within the `scope`.
+   *
+   * The allowed values are:
+   *
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. The expression to filter resources.
+   *
+   * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+   *   `product.type`, `product.engine`, `product.version`, `location`,
+   *   `labels`, `issues`, fields of availability_info,
+   *   data_protection_info,'resource_name', etc.
+   *
+   * The expression is a list of zero or more restrictions combined via logical
+   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+   * expression, parentheses must be appropriately used to group the
+   * combinations.
+   *
+   * Example: location="us-east1"
+   * Example: container="projects/123" OR container="projects/456"
+   * Example: (container="projects/123" OR
+   *           container="projects/456") AND location="us-east1"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The expression to filter resources.
+   *
+   * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+   *   `product.type`, `product.engine`, `product.version`, `location`,
+   *   `labels`, `issues`, fields of availability_info,
+   *   data_protection_info,'resource_name', etc.
+   *
+   * The expression is a list of zero or more restrictions combined via logical
+   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+   * expression, parentheses must be appropriately used to group the
+   * combinations.
+   *
+   * Example: location="us-east1"
+   * Example: container="projects/123" OR container="projects/456"
+   * Example: (container="projects/123" OR
+   *           container="projects/456") AND location="us-east1"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNAL_TYPE_GROUPS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List signalTypeGroups_; + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSignalTypeGroupsList() { + return signalTypeGroups_; + } + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSignalTypeGroupsOrBuilderList() { + return signalTypeGroups_; + } + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getSignalTypeGroupsCount() { + return signalTypeGroups_.size(); + } + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.SignalTypeGroup getSignalTypeGroups(int index) { + return signalTypeGroups_.get(index); + } + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.SignalTypeGroupOrBuilder + getSignalTypeGroupsOrBuilder(int index) { + return signalTypeGroups_.get(index); + } + + public static final int BASELINE_DATE_FIELD_NUMBER = 4; + private com.google.type.Date baselineDate_; + + /** + * + * + *
+   * Optional. The baseline date w.r.t. which the delta counts are calculated.
+   * If not set, delta counts are not included in the response and the response
+   * indicates the current state of the fleet.
+   * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the baselineDate field is set. + */ + @java.lang.Override + public boolean hasBaselineDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The baseline date w.r.t. which the delta counts are calculated.
+   * If not set, delta counts are not included in the response and the response
+   * indicates the current state of the fleet.
+   * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The baselineDate. + */ + @java.lang.Override + public com.google.type.Date getBaselineDate() { + return baselineDate_ == null ? com.google.type.Date.getDefaultInstance() : baselineDate_; + } + + /** + * + * + *
+   * Optional. The baseline date w.r.t. which the delta counts are calculated.
+   * If not set, delta counts are not included in the response and the response
+   * indicates the current state of the fleet.
+   * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getBaselineDateOrBuilder() { + return baselineDate_ == null ? com.google.type.Date.getDefaultInstance() : baselineDate_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + for (int i = 0; i < signalTypeGroups_.size(); i++) { + output.writeMessage(3, signalTypeGroups_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getBaselineDate()); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + for (int i = 0; i < signalTypeGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, signalTypeGroups_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBaselineDate()); + } + 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.databasecenter.v1beta.AggregateIssueStatsRequest)) { + return super.equals(obj); + } + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest other = + (com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getSignalTypeGroupsList().equals(other.getSignalTypeGroupsList())) return false; + if (hasBaselineDate() != other.hasBaselineDate()) return false; + if (hasBaselineDate()) { + if (!getBaselineDate().equals(other.getBaselineDate())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + if (getSignalTypeGroupsCount() > 0) { + hash = (37 * hash) + SIGNAL_TYPE_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getSignalTypeGroupsList().hashCode(); + } + if (hasBaselineDate()) { + hash = (37 * hash) + BASELINE_DATE_FIELD_NUMBER; + hash = (53 * hash) + getBaselineDate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest 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.databasecenter.v1beta.AggregateIssueStatsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest 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.databasecenter.v1beta.AggregateIssueStatsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest 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.databasecenter.v1beta.AggregateIssueStatsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest + 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.databasecenter.v1beta.AggregateIssueStatsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest 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.databasecenter.v1beta.AggregateIssueStatsRequest 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; + } + + /** + * + * + *
+   * AggregateIssueStatsRequest represents the input to the AggregateIssueStats
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest) + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest.class, + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSignalTypeGroupsFieldBuilder(); + getBaselineDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + if (signalTypeGroupsBuilder_ == null) { + signalTypeGroups_ = java.util.Collections.emptyList(); + } else { + signalTypeGroups_ = null; + signalTypeGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + baselineDate_ = null; + if (baselineDateBuilder_ != null) { + baselineDateBuilder_.dispose(); + baselineDateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest + getDefaultInstanceForType() { + return com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest build() { + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest buildPartial() { + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest result = + new com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest result) { + if (signalTypeGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + signalTypeGroups_ = java.util.Collections.unmodifiableList(signalTypeGroups_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.signalTypeGroups_ = signalTypeGroups_; + } else { + result.signalTypeGroups_ = signalTypeGroupsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.baselineDate_ = + baselineDateBuilder_ == null ? baselineDate_ : baselineDateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.databasecenter.v1beta.AggregateIssueStatsRequest) { + return mergeFrom((com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest other) { + if (other + == com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (signalTypeGroupsBuilder_ == null) { + if (!other.signalTypeGroups_.isEmpty()) { + if (signalTypeGroups_.isEmpty()) { + signalTypeGroups_ = other.signalTypeGroups_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.addAll(other.signalTypeGroups_); + } + onChanged(); + } + } else { + if (!other.signalTypeGroups_.isEmpty()) { + if (signalTypeGroupsBuilder_.isEmpty()) { + signalTypeGroupsBuilder_.dispose(); + signalTypeGroupsBuilder_ = null; + signalTypeGroups_ = other.signalTypeGroups_; + bitField0_ = (bitField0_ & ~0x00000004); + signalTypeGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSignalTypeGroupsFieldBuilder() + : null; + } else { + signalTypeGroupsBuilder_.addAllMessages(other.signalTypeGroups_); + } + } + } + if (other.hasBaselineDate()) { + mergeBaselineDate(other.getBaselineDate()); + } + 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: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.databasecenter.v1beta.SignalTypeGroup m = + input.readMessage( + com.google.cloud.databasecenter.v1beta.SignalTypeGroup.parser(), + extensionRegistry); + if (signalTypeGroupsBuilder_ == null) { + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.add(m); + } else { + signalTypeGroupsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(getBaselineDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent can be a project, a folder, or an organization. The search
+     * is limited to the resources within the `scope`.
+     *
+     * The allowed values are:
+     *
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Parent can be a project, a folder, or an organization. The search
+     * is limited to the resources within the `scope`.
+     *
+     * The allowed values are:
+     *
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Parent can be a project, a folder, or an organization. The search
+     * is limited to the resources within the `scope`.
+     *
+     * The allowed values are:
+     *
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Parent can be a project, a folder, or an organization. The search
+     * is limited to the resources within the `scope`.
+     *
+     * The allowed values are:
+     *
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent can be a project, a folder, or an organization. The search
+     * is limited to the resources within the `scope`.
+     *
+     * The allowed values are:
+     *
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. The expression to filter resources.
+     *
+     * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+     *   `product.type`, `product.engine`, `product.version`, `location`,
+     *   `labels`, `issues`, fields of availability_info,
+     *   data_protection_info,'resource_name', etc.
+     *
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations.
+     *
+     * Example: location="us-east1"
+     * Example: container="projects/123" OR container="projects/456"
+     * Example: (container="projects/123" OR
+     *           container="projects/456") AND location="us-east1"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The expression to filter resources.
+     *
+     * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+     *   `product.type`, `product.engine`, `product.version`, `location`,
+     *   `labels`, `issues`, fields of availability_info,
+     *   data_protection_info,'resource_name', etc.
+     *
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations.
+     *
+     * Example: location="us-east1"
+     * Example: container="projects/123" OR container="projects/456"
+     * Example: (container="projects/123" OR
+     *           container="projects/456") AND location="us-east1"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The expression to filter resources.
+     *
+     * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+     *   `product.type`, `product.engine`, `product.version`, `location`,
+     *   `labels`, `issues`, fields of availability_info,
+     *   data_protection_info,'resource_name', etc.
+     *
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations.
+     *
+     * Example: location="us-east1"
+     * Example: container="projects/123" OR container="projects/456"
+     * Example: (container="projects/123" OR
+     *           container="projects/456") AND location="us-east1"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The expression to filter resources.
+     *
+     * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+     *   `product.type`, `product.engine`, `product.version`, `location`,
+     *   `labels`, `issues`, fields of availability_info,
+     *   data_protection_info,'resource_name', etc.
+     *
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations.
+     *
+     * Example: location="us-east1"
+     * Example: container="projects/123" OR container="projects/456"
+     * Example: (container="projects/123" OR
+     *           container="projects/456") AND location="us-east1"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The expression to filter resources.
+     *
+     * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+     *   `product.type`, `product.engine`, `product.version`, `location`,
+     *   `labels`, `issues`, fields of availability_info,
+     *   data_protection_info,'resource_name', etc.
+     *
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations.
+     *
+     * Example: location="us-east1"
+     * Example: container="projects/123" OR container="projects/456"
+     * Example: (container="projects/123" OR
+     *           container="projects/456") AND location="us-east1"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List + signalTypeGroups_ = java.util.Collections.emptyList(); + + private void ensureSignalTypeGroupsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + signalTypeGroups_ = + new java.util.ArrayList( + signalTypeGroups_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.SignalTypeGroup, + com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder, + com.google.cloud.databasecenter.v1beta.SignalTypeGroupOrBuilder> + signalTypeGroupsBuilder_; + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSignalTypeGroupsList() { + if (signalTypeGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(signalTypeGroups_); + } else { + return signalTypeGroupsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSignalTypeGroupsCount() { + if (signalTypeGroupsBuilder_ == null) { + return signalTypeGroups_.size(); + } else { + return signalTypeGroupsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.databasecenter.v1beta.SignalTypeGroup getSignalTypeGroups(int index) { + if (signalTypeGroupsBuilder_ == null) { + return signalTypeGroups_.get(index); + } else { + return signalTypeGroupsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSignalTypeGroups( + int index, com.google.cloud.databasecenter.v1beta.SignalTypeGroup value) { + if (signalTypeGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.set(index, value); + onChanged(); + } else { + signalTypeGroupsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSignalTypeGroups( + int index, com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder builderForValue) { + if (signalTypeGroupsBuilder_ == null) { + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + signalTypeGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSignalTypeGroups( + com.google.cloud.databasecenter.v1beta.SignalTypeGroup value) { + if (signalTypeGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.add(value); + onChanged(); + } else { + signalTypeGroupsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSignalTypeGroups( + int index, com.google.cloud.databasecenter.v1beta.SignalTypeGroup value) { + if (signalTypeGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.add(index, value); + onChanged(); + } else { + signalTypeGroupsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSignalTypeGroups( + com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder builderForValue) { + if (signalTypeGroupsBuilder_ == null) { + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.add(builderForValue.build()); + onChanged(); + } else { + signalTypeGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSignalTypeGroups( + int index, com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder builderForValue) { + if (signalTypeGroupsBuilder_ == null) { + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + signalTypeGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllSignalTypeGroups( + java.lang.Iterable + values) { + if (signalTypeGroupsBuilder_ == null) { + ensureSignalTypeGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, signalTypeGroups_); + onChanged(); + } else { + signalTypeGroupsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSignalTypeGroups() { + if (signalTypeGroupsBuilder_ == null) { + signalTypeGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + signalTypeGroupsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSignalTypeGroups(int index) { + if (signalTypeGroupsBuilder_ == null) { + ensureSignalTypeGroupsIsMutable(); + signalTypeGroups_.remove(index); + onChanged(); + } else { + signalTypeGroupsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder + getSignalTypeGroupsBuilder(int index) { + return getSignalTypeGroupsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.databasecenter.v1beta.SignalTypeGroupOrBuilder + getSignalTypeGroupsOrBuilder(int index) { + if (signalTypeGroupsBuilder_ == null) { + return signalTypeGroups_.get(index); + } else { + return signalTypeGroupsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSignalTypeGroupsOrBuilderList() { + if (signalTypeGroupsBuilder_ != null) { + return signalTypeGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(signalTypeGroups_); + } + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder + addSignalTypeGroupsBuilder() { + return getSignalTypeGroupsFieldBuilder() + .addBuilder(com.google.cloud.databasecenter.v1beta.SignalTypeGroup.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder + addSignalTypeGroupsBuilder(int index) { + return getSignalTypeGroupsFieldBuilder() + .addBuilder( + index, com.google.cloud.databasecenter.v1beta.SignalTypeGroup.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Lists of signal types that are issues.
+     * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSignalTypeGroupsBuilderList() { + return getSignalTypeGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.SignalTypeGroup, + com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder, + com.google.cloud.databasecenter.v1beta.SignalTypeGroupOrBuilder> + getSignalTypeGroupsFieldBuilder() { + if (signalTypeGroupsBuilder_ == null) { + signalTypeGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.SignalTypeGroup, + com.google.cloud.databasecenter.v1beta.SignalTypeGroup.Builder, + com.google.cloud.databasecenter.v1beta.SignalTypeGroupOrBuilder>( + signalTypeGroups_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + signalTypeGroups_ = null; + } + return signalTypeGroupsBuilder_; + } + + private com.google.type.Date baselineDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + baselineDateBuilder_; + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the baselineDate field is set. + */ + public boolean hasBaselineDate() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The baselineDate. + */ + public com.google.type.Date getBaselineDate() { + if (baselineDateBuilder_ == null) { + return baselineDate_ == null ? com.google.type.Date.getDefaultInstance() : baselineDate_; + } else { + return baselineDateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBaselineDate(com.google.type.Date value) { + if (baselineDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + baselineDate_ = value; + } else { + baselineDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBaselineDate(com.google.type.Date.Builder builderForValue) { + if (baselineDateBuilder_ == null) { + baselineDate_ = builderForValue.build(); + } else { + baselineDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBaselineDate(com.google.type.Date value) { + if (baselineDateBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && baselineDate_ != null + && baselineDate_ != com.google.type.Date.getDefaultInstance()) { + getBaselineDateBuilder().mergeFrom(value); + } else { + baselineDate_ = value; + } + } else { + baselineDateBuilder_.mergeFrom(value); + } + if (baselineDate_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBaselineDate() { + bitField0_ = (bitField0_ & ~0x00000008); + baselineDate_ = null; + if (baselineDateBuilder_ != null) { + baselineDateBuilder_.dispose(); + baselineDateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.Date.Builder getBaselineDateBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBaselineDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.DateOrBuilder getBaselineDateOrBuilder() { + if (baselineDateBuilder_ != null) { + return baselineDateBuilder_.getMessageOrBuilder(); + } else { + return baselineDate_ == null ? com.google.type.Date.getDefaultInstance() : baselineDate_; + } + } + + /** + * + * + *
+     * Optional. The baseline date w.r.t. which the delta counts are calculated.
+     * If not set, delta counts are not included in the response and the response
+     * indicates the current state of the fleet.
+     * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getBaselineDateFieldBuilder() { + if (baselineDateBuilder_ == null) { + baselineDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getBaselineDate(), getParentForChildren(), isClean()); + baselineDate_ = null; + } + return baselineDateBuilder_; + } + + @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.databasecenter.v1beta.AggregateIssueStatsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest) + private static final com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest(); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregateIssueStatsRequest 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.databasecenter.v1beta.AggregateIssueStatsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsRequestOrBuilder.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsRequestOrBuilder.java new file mode 100644 index 000000000000..3d84b719573e --- /dev/null +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsRequestOrBuilder.java @@ -0,0 +1,237 @@ +/* + * Copyright 2026 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/databasecenter/v1beta/service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.databasecenter.v1beta; + +public interface AggregateIssueStatsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent can be a project, a folder, or an organization. The search
+   * is limited to the resources within the `scope`.
+   *
+   * The allowed values are:
+   *
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent can be a project, a folder, or an organization. The search
+   * is limited to the resources within the `scope`.
+   *
+   * The allowed values are:
+   *
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The expression to filter resources.
+   *
+   * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+   *   `product.type`, `product.engine`, `product.version`, `location`,
+   *   `labels`, `issues`, fields of availability_info,
+   *   data_protection_info,'resource_name', etc.
+   *
+   * The expression is a list of zero or more restrictions combined via logical
+   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+   * expression, parentheses must be appropriately used to group the
+   * combinations.
+   *
+   * Example: location="us-east1"
+   * Example: container="projects/123" OR container="projects/456"
+   * Example: (container="projects/123" OR
+   *           container="projects/456") AND location="us-east1"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. The expression to filter resources.
+   *
+   * Supported fields are: `full_resource_name`, `resource_type`, `container`,
+   *   `product.type`, `product.engine`, `product.version`, `location`,
+   *   `labels`, `issues`, fields of availability_info,
+   *   data_protection_info,'resource_name', etc.
+   *
+   * The expression is a list of zero or more restrictions combined via logical
+   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+   * expression, parentheses must be appropriately used to group the
+   * combinations.
+   *
+   * Example: location="us-east1"
+   * Example: container="projects/123" OR container="projects/456"
+   * Example: (container="projects/123" OR
+   *           container="projects/456") AND location="us-east1"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getSignalTypeGroupsList(); + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.databasecenter.v1beta.SignalTypeGroup getSignalTypeGroups(int index); + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSignalTypeGroupsCount(); + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getSignalTypeGroupsOrBuilderList(); + + /** + * + * + *
+   * Optional. Lists of signal types that are issues.
+   * 
+ * + * + * repeated .google.cloud.databasecenter.v1beta.SignalTypeGroup signal_type_groups = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.databasecenter.v1beta.SignalTypeGroupOrBuilder getSignalTypeGroupsOrBuilder( + int index); + + /** + * + * + *
+   * Optional. The baseline date w.r.t. which the delta counts are calculated.
+   * If not set, delta counts are not included in the response and the response
+   * indicates the current state of the fleet.
+   * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the baselineDate field is set. + */ + boolean hasBaselineDate(); + + /** + * + * + *
+   * Optional. The baseline date w.r.t. which the delta counts are calculated.
+   * If not set, delta counts are not included in the response and the response
+   * indicates the current state of the fleet.
+   * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The baselineDate. + */ + com.google.type.Date getBaselineDate(); + + /** + * + * + *
+   * Optional. The baseline date w.r.t. which the delta counts are calculated.
+   * If not set, delta counts are not included in the response and the response
+   * indicates the current state of the fleet.
+   * 
+ * + * optional .google.type.Date baseline_date = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.type.DateOrBuilder getBaselineDateOrBuilder(); +} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsResponse.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsResponse.java new file mode 100644 index 000000000000..0803114febd7 --- /dev/null +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsResponse.java @@ -0,0 +1,1536 @@ +/* + * Copyright 2026 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/databasecenter/v1beta/service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.databasecenter.v1beta; + +/** + * + * + *
+ * The response message containing one of more group of relevant health issues
+ * for database resources.
+ * 
+ * + * Protobuf type {@code google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse} + */ +public final class AggregateIssueStatsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse) + AggregateIssueStatsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AggregateIssueStatsResponse.newBuilder() to construct. + private AggregateIssueStatsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AggregateIssueStatsResponse() { + issueGroupStats_ = java.util.Collections.emptyList(); + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AggregateIssueStatsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse.class, + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse.Builder.class); + } + + public static final int ISSUE_GROUP_STATS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List issueGroupStats_; + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + @java.lang.Override + public java.util.List + getIssueGroupStatsList() { + return issueGroupStats_; + } + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + @java.lang.Override + public java.util.List + getIssueGroupStatsOrBuilderList() { + return issueGroupStats_; + } + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + @java.lang.Override + public int getIssueGroupStatsCount() { + return issueGroupStats_.size(); + } + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueGroupStats getIssueGroupStats(int index) { + return issueGroupStats_.get(index); + } + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueGroupStatsOrBuilder + getIssueGroupStatsOrBuilder(int index) { + return issueGroupStats_.get(index); + } + + public static final int TOTAL_RESOURCES_COUNT_FIELD_NUMBER = 2; + private int totalResourcesCount_ = 0; + + /** + * + * + *
+   * Total count of the resources filtered in based on the user given filter.
+   * 
+ * + * int32 total_resources_count = 2; + * + * @return The totalResourcesCount. + */ + @java.lang.Override + public int getTotalResourcesCount() { + return totalResourcesCount_; + } + + public static final int TOTAL_RESOURCE_GROUPS_COUNT_FIELD_NUMBER = 3; + private int totalResourceGroupsCount_ = 0; + + /** + * + * + *
+   * Total count of the resource filtered in based on the user given filter.
+   * 
+ * + * int32 total_resource_groups_count = 3; + * + * @return The totalResourceGroupsCount. + */ + @java.lang.Override + public int getTotalResourceGroupsCount() { + return totalResourceGroupsCount_; + } + + public static final int UNREACHABLE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unordered list. List of unreachable regions from where data could not be
+   * retrieved.
+   * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. List of unreachable regions from where data could not be
+   * retrieved.
+   * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. List of unreachable regions from where data could not be
+   * retrieved.
+   * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Unordered list. List of unreachable regions from where data could not be
+   * retrieved.
+   * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < issueGroupStats_.size(); i++) { + output.writeMessage(1, issueGroupStats_.get(i)); + } + if (totalResourcesCount_ != 0) { + output.writeInt32(2, totalResourcesCount_); + } + if (totalResourceGroupsCount_ != 0) { + output.writeInt32(3, totalResourceGroupsCount_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < issueGroupStats_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, issueGroupStats_.get(i)); + } + if (totalResourcesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, totalResourcesCount_); + } + if (totalResourceGroupsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalResourceGroupsCount_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().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.databasecenter.v1beta.AggregateIssueStatsResponse)) { + return super.equals(obj); + } + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse other = + (com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse) obj; + + if (!getIssueGroupStatsList().equals(other.getIssueGroupStatsList())) return false; + if (getTotalResourcesCount() != other.getTotalResourcesCount()) return false; + if (getTotalResourceGroupsCount() != other.getTotalResourceGroupsCount()) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getIssueGroupStatsCount() > 0) { + hash = (37 * hash) + ISSUE_GROUP_STATS_FIELD_NUMBER; + hash = (53 * hash) + getIssueGroupStatsList().hashCode(); + } + hash = (37 * hash) + TOTAL_RESOURCES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalResourcesCount(); + hash = (37 * hash) + TOTAL_RESOURCE_GROUPS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalResourceGroupsCount(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse 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.databasecenter.v1beta.AggregateIssueStatsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse 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.databasecenter.v1beta.AggregateIssueStatsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse 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.databasecenter.v1beta.AggregateIssueStatsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse + 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.databasecenter.v1beta.AggregateIssueStatsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse 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.databasecenter.v1beta.AggregateIssueStatsResponse 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 containing one of more group of relevant health issues
+   * for database resources.
+   * 
+ * + * Protobuf type {@code google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse) + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse.class, + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (issueGroupStatsBuilder_ == null) { + issueGroupStats_ = java.util.Collections.emptyList(); + } else { + issueGroupStats_ = null; + issueGroupStatsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + totalResourcesCount_ = 0; + totalResourceGroupsCount_ = 0; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse + getDefaultInstanceForType() { + return com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse build() { + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse buildPartial() { + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse result = + new com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse result) { + if (issueGroupStatsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + issueGroupStats_ = java.util.Collections.unmodifiableList(issueGroupStats_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.issueGroupStats_ = issueGroupStats_; + } else { + result.issueGroupStats_ = issueGroupStatsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalResourcesCount_ = totalResourcesCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalResourceGroupsCount_ = totalResourceGroupsCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @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.databasecenter.v1beta.AggregateIssueStatsResponse) { + return mergeFrom( + (com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse other) { + if (other + == com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse + .getDefaultInstance()) return this; + if (issueGroupStatsBuilder_ == null) { + if (!other.issueGroupStats_.isEmpty()) { + if (issueGroupStats_.isEmpty()) { + issueGroupStats_ = other.issueGroupStats_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.addAll(other.issueGroupStats_); + } + onChanged(); + } + } else { + if (!other.issueGroupStats_.isEmpty()) { + if (issueGroupStatsBuilder_.isEmpty()) { + issueGroupStatsBuilder_.dispose(); + issueGroupStatsBuilder_ = null; + issueGroupStats_ = other.issueGroupStats_; + bitField0_ = (bitField0_ & ~0x00000001); + issueGroupStatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIssueGroupStatsFieldBuilder() + : null; + } else { + issueGroupStatsBuilder_.addAllMessages(other.issueGroupStats_); + } + } + } + if (other.getTotalResourcesCount() != 0) { + setTotalResourcesCount(other.getTotalResourcesCount()); + } + if (other.getTotalResourceGroupsCount() != 0) { + setTotalResourceGroupsCount(other.getTotalResourceGroupsCount()); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000008; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + 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: + { + com.google.cloud.databasecenter.v1beta.IssueGroupStats m = + input.readMessage( + com.google.cloud.databasecenter.v1beta.IssueGroupStats.parser(), + extensionRegistry); + if (issueGroupStatsBuilder_ == null) { + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.add(m); + } else { + issueGroupStatsBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + totalResourcesCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + totalResourceGroupsCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 34 + 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 java.util.List + issueGroupStats_ = java.util.Collections.emptyList(); + + private void ensureIssueGroupStatsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + issueGroupStats_ = + new java.util.ArrayList( + issueGroupStats_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.IssueGroupStats, + com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder, + com.google.cloud.databasecenter.v1beta.IssueGroupStatsOrBuilder> + issueGroupStatsBuilder_; + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public java.util.List + getIssueGroupStatsList() { + if (issueGroupStatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(issueGroupStats_); + } else { + return issueGroupStatsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public int getIssueGroupStatsCount() { + if (issueGroupStatsBuilder_ == null) { + return issueGroupStats_.size(); + } else { + return issueGroupStatsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public com.google.cloud.databasecenter.v1beta.IssueGroupStats getIssueGroupStats(int index) { + if (issueGroupStatsBuilder_ == null) { + return issueGroupStats_.get(index); + } else { + return issueGroupStatsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder setIssueGroupStats( + int index, com.google.cloud.databasecenter.v1beta.IssueGroupStats value) { + if (issueGroupStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.set(index, value); + onChanged(); + } else { + issueGroupStatsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder setIssueGroupStats( + int index, com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder builderForValue) { + if (issueGroupStatsBuilder_ == null) { + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.set(index, builderForValue.build()); + onChanged(); + } else { + issueGroupStatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder addIssueGroupStats( + com.google.cloud.databasecenter.v1beta.IssueGroupStats value) { + if (issueGroupStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.add(value); + onChanged(); + } else { + issueGroupStatsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder addIssueGroupStats( + int index, com.google.cloud.databasecenter.v1beta.IssueGroupStats value) { + if (issueGroupStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.add(index, value); + onChanged(); + } else { + issueGroupStatsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder addIssueGroupStats( + com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder builderForValue) { + if (issueGroupStatsBuilder_ == null) { + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.add(builderForValue.build()); + onChanged(); + } else { + issueGroupStatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder addIssueGroupStats( + int index, com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder builderForValue) { + if (issueGroupStatsBuilder_ == null) { + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.add(index, builderForValue.build()); + onChanged(); + } else { + issueGroupStatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder addAllIssueGroupStats( + java.lang.Iterable + values) { + if (issueGroupStatsBuilder_ == null) { + ensureIssueGroupStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, issueGroupStats_); + onChanged(); + } else { + issueGroupStatsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder clearIssueGroupStats() { + if (issueGroupStatsBuilder_ == null) { + issueGroupStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + issueGroupStatsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public Builder removeIssueGroupStats(int index) { + if (issueGroupStatsBuilder_ == null) { + ensureIssueGroupStatsIsMutable(); + issueGroupStats_.remove(index); + onChanged(); + } else { + issueGroupStatsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder getIssueGroupStatsBuilder( + int index) { + return getIssueGroupStatsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public com.google.cloud.databasecenter.v1beta.IssueGroupStatsOrBuilder + getIssueGroupStatsOrBuilder(int index) { + if (issueGroupStatsBuilder_ == null) { + return issueGroupStats_.get(index); + } else { + return issueGroupStatsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public java.util.List + getIssueGroupStatsOrBuilderList() { + if (issueGroupStatsBuilder_ != null) { + return issueGroupStatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(issueGroupStats_); + } + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder + addIssueGroupStatsBuilder() { + return getIssueGroupStatsFieldBuilder() + .addBuilder(com.google.cloud.databasecenter.v1beta.IssueGroupStats.getDefaultInstance()); + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder addIssueGroupStatsBuilder( + int index) { + return getIssueGroupStatsFieldBuilder() + .addBuilder( + index, com.google.cloud.databasecenter.v1beta.IssueGroupStats.getDefaultInstance()); + } + + /** + * + * + *
+     * List of issue group stats where each group contains stats for resources
+     * having a particular combination of relevant issues.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + public java.util.List + getIssueGroupStatsBuilderList() { + return getIssueGroupStatsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.IssueGroupStats, + com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder, + com.google.cloud.databasecenter.v1beta.IssueGroupStatsOrBuilder> + getIssueGroupStatsFieldBuilder() { + if (issueGroupStatsBuilder_ == null) { + issueGroupStatsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.IssueGroupStats, + com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder, + com.google.cloud.databasecenter.v1beta.IssueGroupStatsOrBuilder>( + issueGroupStats_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + issueGroupStats_ = null; + } + return issueGroupStatsBuilder_; + } + + private int totalResourcesCount_; + + /** + * + * + *
+     * Total count of the resources filtered in based on the user given filter.
+     * 
+ * + * int32 total_resources_count = 2; + * + * @return The totalResourcesCount. + */ + @java.lang.Override + public int getTotalResourcesCount() { + return totalResourcesCount_; + } + + /** + * + * + *
+     * Total count of the resources filtered in based on the user given filter.
+     * 
+ * + * int32 total_resources_count = 2; + * + * @param value The totalResourcesCount to set. + * @return This builder for chaining. + */ + public Builder setTotalResourcesCount(int value) { + + totalResourcesCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Total count of the resources filtered in based on the user given filter.
+     * 
+ * + * int32 total_resources_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearTotalResourcesCount() { + bitField0_ = (bitField0_ & ~0x00000002); + totalResourcesCount_ = 0; + onChanged(); + return this; + } + + private int totalResourceGroupsCount_; + + /** + * + * + *
+     * Total count of the resource filtered in based on the user given filter.
+     * 
+ * + * int32 total_resource_groups_count = 3; + * + * @return The totalResourceGroupsCount. + */ + @java.lang.Override + public int getTotalResourceGroupsCount() { + return totalResourceGroupsCount_; + } + + /** + * + * + *
+     * Total count of the resource filtered in based on the user given filter.
+     * 
+ * + * int32 total_resource_groups_count = 3; + * + * @param value The totalResourceGroupsCount to set. + * @return This builder for chaining. + */ + public Builder setTotalResourceGroupsCount(int value) { + + totalResourceGroupsCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Total count of the resource filtered in based on the user given filter.
+     * 
+ * + * int32 total_resource_groups_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearTotalResourceGroupsCount() { + bitField0_ = (bitField0_ & ~0x00000004); + totalResourceGroupsCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. List of unreachable regions from where data could not be
+     * retrieved.
+     * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000008; + 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.databasecenter.v1beta.AggregateIssueStatsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse) + private static final com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse(); + } + + public static com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregateIssueStatsResponse 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.databasecenter.v1beta.AggregateIssueStatsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsResponseOrBuilder.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsResponseOrBuilder.java new file mode 100644 index 000000000000..4a168826df2b --- /dev/null +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/AggregateIssueStatsResponseOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 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/databasecenter/v1beta/service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.databasecenter.v1beta; + +public interface AggregateIssueStatsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + java.util.List getIssueGroupStatsList(); + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + com.google.cloud.databasecenter.v1beta.IssueGroupStats getIssueGroupStats(int index); + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + int getIssueGroupStatsCount(); + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + java.util.List + getIssueGroupStatsOrBuilderList(); + + /** + * + * + *
+   * List of issue group stats where each group contains stats for resources
+   * having a particular combination of relevant issues.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueGroupStats issue_group_stats = 1; + * + */ + com.google.cloud.databasecenter.v1beta.IssueGroupStatsOrBuilder getIssueGroupStatsOrBuilder( + int index); + + /** + * + * + *
+   * Total count of the resources filtered in based on the user given filter.
+   * 
+ * + * int32 total_resources_count = 2; + * + * @return The totalResourcesCount. + */ + int getTotalResourcesCount(); + + /** + * + * + *
+   * Total count of the resource filtered in based on the user given filter.
+   * 
+ * + * int32 total_resource_groups_count = 3; + * + * @return The totalResourceGroupsCount. + */ + int getTotalResourceGroupsCount(); + + /** + * + * + *
+   * Unordered list. List of unreachable regions from where data could not be
+   * retrieved.
+   * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. List of unreachable regions from where data could not be
+   * retrieved.
+   * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. List of unreachable regions from where data could not be
+   * retrieved.
+   * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. List of unreachable regions from where data could not be
+   * retrieved.
+   * 
+ * + * repeated string unreachable = 4 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueGroupStats.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueGroupStats.java new file mode 100644 index 000000000000..b158c745e78b --- /dev/null +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueGroupStats.java @@ -0,0 +1,1605 @@ +/* + * Copyright 2026 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/databasecenter/v1beta/service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.databasecenter.v1beta; + +/** + * + * + *
+ * IssueGroupStats refers to stats for a particulare combination of relevant
+ * health issues of database resources.
+ * 
+ * + * Protobuf type {@code google.cloud.databasecenter.v1beta.IssueGroupStats} + */ +public final class IssueGroupStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.databasecenter.v1beta.IssueGroupStats) + IssueGroupStatsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use IssueGroupStats.newBuilder() to construct. + private IssueGroupStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IssueGroupStats() { + displayName_ = ""; + issueStats_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IssueGroupStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.databasecenter.v1beta.IssueGroupStats.class, + com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Database resource level health card name. This will corresponds to one of
+   * the requested input group names.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Database resource level health card name. This will corresponds to one of
+   * the requested input group names.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_GROUPS_COUNT_FIELD_NUMBER = 2; + private int resourceGroupsCount_ = 0; + + /** + * + * + *
+   * Total count of the groups of resources returned by the filter that
+   * also have one or more resources for which any of the specified issues
+   * are applicable.
+   * 
+ * + * int32 resource_groups_count = 2; + * + * @return The resourceGroupsCount. + */ + @java.lang.Override + public int getResourceGroupsCount() { + return resourceGroupsCount_; + } + + public static final int RESOURCES_COUNT_FIELD_NUMBER = 3; + private int resourcesCount_ = 0; + + /** + * + * + *
+   * Total count of resources returned by the filter for which any of the
+   * specified issues are applicable.
+   * 
+ * + * int32 resources_count = 3; + * + * @return The resourcesCount. + */ + @java.lang.Override + public int getResourcesCount() { + return resourcesCount_; + } + + public static final int HEALTHY_RESOURCE_GROUPS_COUNT_FIELD_NUMBER = 4; + private int healthyResourceGroupsCount_ = 0; + + /** + * + * + *
+   * The number of resource groups from the total groups as defined above
+   * that are healthy with respect to all of the specified issues.
+   * 
+ * + * int32 healthy_resource_groups_count = 4; + * + * @return The healthyResourceGroupsCount. + */ + @java.lang.Override + public int getHealthyResourceGroupsCount() { + return healthyResourceGroupsCount_; + } + + public static final int HEALTHY_RESOURCES_COUNT_FIELD_NUMBER = 5; + private int healthyResourcesCount_ = 0; + + /** + * + * + *
+   * The number of resources from the total defined above in field
+   * total_resources_count that are healthy with respect to all of the specified
+   * issues.
+   * 
+ * + * int32 healthy_resources_count = 5; + * + * @return The healthyResourcesCount. + */ + @java.lang.Override + public int getHealthyResourcesCount() { + return healthyResourcesCount_; + } + + public static final int ISSUE_STATS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List issueStats_; + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + @java.lang.Override + public java.util.List getIssueStatsList() { + return issueStats_; + } + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + @java.lang.Override + public java.util.List + getIssueStatsOrBuilderList() { + return issueStats_; + } + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + @java.lang.Override + public int getIssueStatsCount() { + return issueStats_.size(); + } + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueStats getIssueStats(int index) { + return issueStats_.get(index); + } + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueStatsOrBuilder getIssueStatsOrBuilder( + int index) { + return issueStats_.get(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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (resourceGroupsCount_ != 0) { + output.writeInt32(2, resourceGroupsCount_); + } + if (resourcesCount_ != 0) { + output.writeInt32(3, resourcesCount_); + } + if (healthyResourceGroupsCount_ != 0) { + output.writeInt32(4, healthyResourceGroupsCount_); + } + if (healthyResourcesCount_ != 0) { + output.writeInt32(5, healthyResourcesCount_); + } + for (int i = 0; i < issueStats_.size(); i++) { + output.writeMessage(6, issueStats_.get(i)); + } + 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(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (resourceGroupsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, resourceGroupsCount_); + } + if (resourcesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, resourcesCount_); + } + if (healthyResourceGroupsCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(4, healthyResourceGroupsCount_); + } + if (healthyResourcesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, healthyResourcesCount_); + } + for (int i = 0; i < issueStats_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, issueStats_.get(i)); + } + 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.databasecenter.v1beta.IssueGroupStats)) { + return super.equals(obj); + } + com.google.cloud.databasecenter.v1beta.IssueGroupStats other = + (com.google.cloud.databasecenter.v1beta.IssueGroupStats) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (getResourceGroupsCount() != other.getResourceGroupsCount()) return false; + if (getResourcesCount() != other.getResourcesCount()) return false; + if (getHealthyResourceGroupsCount() != other.getHealthyResourceGroupsCount()) return false; + if (getHealthyResourcesCount() != other.getHealthyResourcesCount()) return false; + if (!getIssueStatsList().equals(other.getIssueStatsList())) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + RESOURCE_GROUPS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getResourceGroupsCount(); + hash = (37 * hash) + RESOURCES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getResourcesCount(); + hash = (37 * hash) + HEALTHY_RESOURCE_GROUPS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getHealthyResourceGroupsCount(); + hash = (37 * hash) + HEALTHY_RESOURCES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getHealthyResourcesCount(); + if (getIssueStatsCount() > 0) { + hash = (37 * hash) + ISSUE_STATS_FIELD_NUMBER; + hash = (53 * hash) + getIssueStatsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats 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.databasecenter.v1beta.IssueGroupStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats 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.databasecenter.v1beta.IssueGroupStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats 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.databasecenter.v1beta.IssueGroupStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats 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.databasecenter.v1beta.IssueGroupStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats 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.databasecenter.v1beta.IssueGroupStats 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; + } + + /** + * + * + *
+   * IssueGroupStats refers to stats for a particulare combination of relevant
+   * health issues of database resources.
+   * 
+ * + * Protobuf type {@code google.cloud.databasecenter.v1beta.IssueGroupStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.databasecenter.v1beta.IssueGroupStats) + com.google.cloud.databasecenter.v1beta.IssueGroupStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.databasecenter.v1beta.IssueGroupStats.class, + com.google.cloud.databasecenter.v1beta.IssueGroupStats.Builder.class); + } + + // Construct using com.google.cloud.databasecenter.v1beta.IssueGroupStats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + resourceGroupsCount_ = 0; + resourcesCount_ = 0; + healthyResourceGroupsCount_ = 0; + healthyResourcesCount_ = 0; + if (issueStatsBuilder_ == null) { + issueStats_ = java.util.Collections.emptyList(); + } else { + issueStats_ = null; + issueStatsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueGroupStats getDefaultInstanceForType() { + return com.google.cloud.databasecenter.v1beta.IssueGroupStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueGroupStats build() { + com.google.cloud.databasecenter.v1beta.IssueGroupStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueGroupStats buildPartial() { + com.google.cloud.databasecenter.v1beta.IssueGroupStats result = + new com.google.cloud.databasecenter.v1beta.IssueGroupStats(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.databasecenter.v1beta.IssueGroupStats result) { + if (issueStatsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + issueStats_ = java.util.Collections.unmodifiableList(issueStats_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.issueStats_ = issueStats_; + } else { + result.issueStats_ = issueStatsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.databasecenter.v1beta.IssueGroupStats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceGroupsCount_ = resourceGroupsCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.resourcesCount_ = resourcesCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.healthyResourceGroupsCount_ = healthyResourceGroupsCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.healthyResourcesCount_ = healthyResourcesCount_; + } + } + + @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.databasecenter.v1beta.IssueGroupStats) { + return mergeFrom((com.google.cloud.databasecenter.v1beta.IssueGroupStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.databasecenter.v1beta.IssueGroupStats other) { + if (other == com.google.cloud.databasecenter.v1beta.IssueGroupStats.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getResourceGroupsCount() != 0) { + setResourceGroupsCount(other.getResourceGroupsCount()); + } + if (other.getResourcesCount() != 0) { + setResourcesCount(other.getResourcesCount()); + } + if (other.getHealthyResourceGroupsCount() != 0) { + setHealthyResourceGroupsCount(other.getHealthyResourceGroupsCount()); + } + if (other.getHealthyResourcesCount() != 0) { + setHealthyResourcesCount(other.getHealthyResourcesCount()); + } + if (issueStatsBuilder_ == null) { + if (!other.issueStats_.isEmpty()) { + if (issueStats_.isEmpty()) { + issueStats_ = other.issueStats_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureIssueStatsIsMutable(); + issueStats_.addAll(other.issueStats_); + } + onChanged(); + } + } else { + if (!other.issueStats_.isEmpty()) { + if (issueStatsBuilder_.isEmpty()) { + issueStatsBuilder_.dispose(); + issueStatsBuilder_ = null; + issueStats_ = other.issueStats_; + bitField0_ = (bitField0_ & ~0x00000020); + issueStatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIssueStatsFieldBuilder() + : null; + } else { + issueStatsBuilder_.addAllMessages(other.issueStats_); + } + } + } + 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: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + resourceGroupsCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + resourcesCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + healthyResourceGroupsCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + healthyResourcesCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + com.google.cloud.databasecenter.v1beta.IssueStats m = + input.readMessage( + com.google.cloud.databasecenter.v1beta.IssueStats.parser(), + extensionRegistry); + if (issueStatsBuilder_ == null) { + ensureIssueStatsIsMutable(); + issueStats_.add(m); + } else { + issueStatsBuilder_.addMessage(m); + } + break; + } // case 50 + 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 java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Database resource level health card name. This will corresponds to one of
+     * the requested input group names.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Database resource level health card name. This will corresponds to one of
+     * the requested input group names.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Database resource level health card name. This will corresponds to one of
+     * the requested input group names.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Database resource level health card name. This will corresponds to one of
+     * the requested input group names.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Database resource level health card name. This will corresponds to one of
+     * the requested input group names.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int resourceGroupsCount_; + + /** + * + * + *
+     * Total count of the groups of resources returned by the filter that
+     * also have one or more resources for which any of the specified issues
+     * are applicable.
+     * 
+ * + * int32 resource_groups_count = 2; + * + * @return The resourceGroupsCount. + */ + @java.lang.Override + public int getResourceGroupsCount() { + return resourceGroupsCount_; + } + + /** + * + * + *
+     * Total count of the groups of resources returned by the filter that
+     * also have one or more resources for which any of the specified issues
+     * are applicable.
+     * 
+ * + * int32 resource_groups_count = 2; + * + * @param value The resourceGroupsCount to set. + * @return This builder for chaining. + */ + public Builder setResourceGroupsCount(int value) { + + resourceGroupsCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Total count of the groups of resources returned by the filter that
+     * also have one or more resources for which any of the specified issues
+     * are applicable.
+     * 
+ * + * int32 resource_groups_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceGroupsCount() { + bitField0_ = (bitField0_ & ~0x00000002); + resourceGroupsCount_ = 0; + onChanged(); + return this; + } + + private int resourcesCount_; + + /** + * + * + *
+     * Total count of resources returned by the filter for which any of the
+     * specified issues are applicable.
+     * 
+ * + * int32 resources_count = 3; + * + * @return The resourcesCount. + */ + @java.lang.Override + public int getResourcesCount() { + return resourcesCount_; + } + + /** + * + * + *
+     * Total count of resources returned by the filter for which any of the
+     * specified issues are applicable.
+     * 
+ * + * int32 resources_count = 3; + * + * @param value The resourcesCount to set. + * @return This builder for chaining. + */ + public Builder setResourcesCount(int value) { + + resourcesCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Total count of resources returned by the filter for which any of the
+     * specified issues are applicable.
+     * 
+ * + * int32 resources_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearResourcesCount() { + bitField0_ = (bitField0_ & ~0x00000004); + resourcesCount_ = 0; + onChanged(); + return this; + } + + private int healthyResourceGroupsCount_; + + /** + * + * + *
+     * The number of resource groups from the total groups as defined above
+     * that are healthy with respect to all of the specified issues.
+     * 
+ * + * int32 healthy_resource_groups_count = 4; + * + * @return The healthyResourceGroupsCount. + */ + @java.lang.Override + public int getHealthyResourceGroupsCount() { + return healthyResourceGroupsCount_; + } + + /** + * + * + *
+     * The number of resource groups from the total groups as defined above
+     * that are healthy with respect to all of the specified issues.
+     * 
+ * + * int32 healthy_resource_groups_count = 4; + * + * @param value The healthyResourceGroupsCount to set. + * @return This builder for chaining. + */ + public Builder setHealthyResourceGroupsCount(int value) { + + healthyResourceGroupsCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The number of resource groups from the total groups as defined above
+     * that are healthy with respect to all of the specified issues.
+     * 
+ * + * int32 healthy_resource_groups_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearHealthyResourceGroupsCount() { + bitField0_ = (bitField0_ & ~0x00000008); + healthyResourceGroupsCount_ = 0; + onChanged(); + return this; + } + + private int healthyResourcesCount_; + + /** + * + * + *
+     * The number of resources from the total defined above in field
+     * total_resources_count that are healthy with respect to all of the specified
+     * issues.
+     * 
+ * + * int32 healthy_resources_count = 5; + * + * @return The healthyResourcesCount. + */ + @java.lang.Override + public int getHealthyResourcesCount() { + return healthyResourcesCount_; + } + + /** + * + * + *
+     * The number of resources from the total defined above in field
+     * total_resources_count that are healthy with respect to all of the specified
+     * issues.
+     * 
+ * + * int32 healthy_resources_count = 5; + * + * @param value The healthyResourcesCount to set. + * @return This builder for chaining. + */ + public Builder setHealthyResourcesCount(int value) { + + healthyResourcesCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The number of resources from the total defined above in field
+     * total_resources_count that are healthy with respect to all of the specified
+     * issues.
+     * 
+ * + * int32 healthy_resources_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearHealthyResourcesCount() { + bitField0_ = (bitField0_ & ~0x00000010); + healthyResourcesCount_ = 0; + onChanged(); + return this; + } + + private java.util.List issueStats_ = + java.util.Collections.emptyList(); + + private void ensureIssueStatsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + issueStats_ = + new java.util.ArrayList(issueStats_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.IssueStats, + com.google.cloud.databasecenter.v1beta.IssueStats.Builder, + com.google.cloud.databasecenter.v1beta.IssueStatsOrBuilder> + issueStatsBuilder_; + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public java.util.List getIssueStatsList() { + if (issueStatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(issueStats_); + } else { + return issueStatsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public int getIssueStatsCount() { + if (issueStatsBuilder_ == null) { + return issueStats_.size(); + } else { + return issueStatsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public com.google.cloud.databasecenter.v1beta.IssueStats getIssueStats(int index) { + if (issueStatsBuilder_ == null) { + return issueStats_.get(index); + } else { + return issueStatsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder setIssueStats( + int index, com.google.cloud.databasecenter.v1beta.IssueStats value) { + if (issueStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIssueStatsIsMutable(); + issueStats_.set(index, value); + onChanged(); + } else { + issueStatsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder setIssueStats( + int index, com.google.cloud.databasecenter.v1beta.IssueStats.Builder builderForValue) { + if (issueStatsBuilder_ == null) { + ensureIssueStatsIsMutable(); + issueStats_.set(index, builderForValue.build()); + onChanged(); + } else { + issueStatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder addIssueStats(com.google.cloud.databasecenter.v1beta.IssueStats value) { + if (issueStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIssueStatsIsMutable(); + issueStats_.add(value); + onChanged(); + } else { + issueStatsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder addIssueStats( + int index, com.google.cloud.databasecenter.v1beta.IssueStats value) { + if (issueStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIssueStatsIsMutable(); + issueStats_.add(index, value); + onChanged(); + } else { + issueStatsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder addIssueStats( + com.google.cloud.databasecenter.v1beta.IssueStats.Builder builderForValue) { + if (issueStatsBuilder_ == null) { + ensureIssueStatsIsMutable(); + issueStats_.add(builderForValue.build()); + onChanged(); + } else { + issueStatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder addIssueStats( + int index, com.google.cloud.databasecenter.v1beta.IssueStats.Builder builderForValue) { + if (issueStatsBuilder_ == null) { + ensureIssueStatsIsMutable(); + issueStats_.add(index, builderForValue.build()); + onChanged(); + } else { + issueStatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder addAllIssueStats( + java.lang.Iterable values) { + if (issueStatsBuilder_ == null) { + ensureIssueStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, issueStats_); + onChanged(); + } else { + issueStatsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder clearIssueStats() { + if (issueStatsBuilder_ == null) { + issueStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + issueStatsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public Builder removeIssueStats(int index) { + if (issueStatsBuilder_ == null) { + ensureIssueStatsIsMutable(); + issueStats_.remove(index); + onChanged(); + } else { + issueStatsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public com.google.cloud.databasecenter.v1beta.IssueStats.Builder getIssueStatsBuilder( + int index) { + return getIssueStatsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public com.google.cloud.databasecenter.v1beta.IssueStatsOrBuilder getIssueStatsOrBuilder( + int index) { + if (issueStatsBuilder_ == null) { + return issueStats_.get(index); + } else { + return issueStatsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public java.util.List + getIssueStatsOrBuilderList() { + if (issueStatsBuilder_ != null) { + return issueStatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(issueStats_); + } + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public com.google.cloud.databasecenter.v1beta.IssueStats.Builder addIssueStatsBuilder() { + return getIssueStatsFieldBuilder() + .addBuilder(com.google.cloud.databasecenter.v1beta.IssueStats.getDefaultInstance()); + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public com.google.cloud.databasecenter.v1beta.IssueStats.Builder addIssueStatsBuilder( + int index) { + return getIssueStatsFieldBuilder() + .addBuilder( + index, com.google.cloud.databasecenter.v1beta.IssueStats.getDefaultInstance()); + } + + /** + * + * + *
+     * List of issues stats containing count of resources having particular issue
+     * category.
+     * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + public java.util.List + getIssueStatsBuilderList() { + return getIssueStatsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.IssueStats, + com.google.cloud.databasecenter.v1beta.IssueStats.Builder, + com.google.cloud.databasecenter.v1beta.IssueStatsOrBuilder> + getIssueStatsFieldBuilder() { + if (issueStatsBuilder_ == null) { + issueStatsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.IssueStats, + com.google.cloud.databasecenter.v1beta.IssueStats.Builder, + com.google.cloud.databasecenter.v1beta.IssueStatsOrBuilder>( + issueStats_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + issueStats_ = null; + } + return issueStatsBuilder_; + } + + @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.databasecenter.v1beta.IssueGroupStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.databasecenter.v1beta.IssueGroupStats) + private static final com.google.cloud.databasecenter.v1beta.IssueGroupStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.databasecenter.v1beta.IssueGroupStats(); + } + + public static com.google.cloud.databasecenter.v1beta.IssueGroupStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IssueGroupStats 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.databasecenter.v1beta.IssueGroupStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueGroupStatsOrBuilder.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueGroupStatsOrBuilder.java new file mode 100644 index 000000000000..6b8a97518afa --- /dev/null +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueGroupStatsOrBuilder.java @@ -0,0 +1,173 @@ +/* + * Copyright 2026 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/databasecenter/v1beta/service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.databasecenter.v1beta; + +public interface IssueGroupStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.databasecenter.v1beta.IssueGroupStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Database resource level health card name. This will corresponds to one of
+   * the requested input group names.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Database resource level health card name. This will corresponds to one of
+   * the requested input group names.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Total count of the groups of resources returned by the filter that
+   * also have one or more resources for which any of the specified issues
+   * are applicable.
+   * 
+ * + * int32 resource_groups_count = 2; + * + * @return The resourceGroupsCount. + */ + int getResourceGroupsCount(); + + /** + * + * + *
+   * Total count of resources returned by the filter for which any of the
+   * specified issues are applicable.
+   * 
+ * + * int32 resources_count = 3; + * + * @return The resourcesCount. + */ + int getResourcesCount(); + + /** + * + * + *
+   * The number of resource groups from the total groups as defined above
+   * that are healthy with respect to all of the specified issues.
+   * 
+ * + * int32 healthy_resource_groups_count = 4; + * + * @return The healthyResourceGroupsCount. + */ + int getHealthyResourceGroupsCount(); + + /** + * + * + *
+   * The number of resources from the total defined above in field
+   * total_resources_count that are healthy with respect to all of the specified
+   * issues.
+   * 
+ * + * int32 healthy_resources_count = 5; + * + * @return The healthyResourcesCount. + */ + int getHealthyResourcesCount(); + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + java.util.List getIssueStatsList(); + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + com.google.cloud.databasecenter.v1beta.IssueStats getIssueStats(int index); + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + int getIssueStatsCount(); + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + java.util.List + getIssueStatsOrBuilderList(); + + /** + * + * + *
+   * List of issues stats containing count of resources having particular issue
+   * category.
+   * 
+ * + * repeated .google.cloud.databasecenter.v1beta.IssueStats issue_stats = 6; + */ + com.google.cloud.databasecenter.v1beta.IssueStatsOrBuilder getIssueStatsOrBuilder(int index); +} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueStats.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueStats.java new file mode 100644 index 000000000000..f963631b955d --- /dev/null +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueStats.java @@ -0,0 +1,1228 @@ +/* + * Copyright 2026 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/databasecenter/v1beta/service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.databasecenter.v1beta; + +/** + * + * + *
+ * IssueStats holds stats for a particular signal category.
+ * 
+ * + * Protobuf type {@code google.cloud.databasecenter.v1beta.IssueStats} + */ +public final class IssueStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.databasecenter.v1beta.IssueStats) + IssueStatsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use IssueStats.newBuilder() to construct. + private IssueStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IssueStats() { + signalType_ = 0; + issueSeverity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IssueStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.databasecenter.v1beta.IssueStats.class, + com.google.cloud.databasecenter.v1beta.IssueStats.Builder.class); + } + + private int bitField0_; + public static final int SIGNAL_TYPE_FIELD_NUMBER = 1; + private int signalType_ = 0; + + /** + * + * + *
+   * Type of signal which is an issue.
+   * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @return The enum numeric value on the wire for signalType. + */ + @java.lang.Override + public int getSignalTypeValue() { + return signalType_; + } + + /** + * + * + *
+   * Type of signal which is an issue.
+   * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @return The signalType. + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.SignalType getSignalType() { + com.google.cloud.databasecenter.v1beta.SignalType result = + com.google.cloud.databasecenter.v1beta.SignalType.forNumber(signalType_); + return result == null ? com.google.cloud.databasecenter.v1beta.SignalType.UNRECOGNIZED : result; + } + + public static final int RESOURCE_COUNT_FIELD_NUMBER = 2; + private int resourceCount_ = 0; + + /** + * + * + *
+   * Number of resources having issues of a given type.
+   * 
+ * + * int32 resource_count = 2; + * + * @return The resourceCount. + */ + @java.lang.Override + public int getResourceCount() { + return resourceCount_; + } + + public static final int DELTA_DETAILS_FIELD_NUMBER = 3; + private com.google.cloud.databasecenter.v1beta.DeltaDetails deltaDetails_; + + /** + * + * + *
+   * Optional. Delta counts and details of resources for which issue was raised
+   * or fixed.
+   * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deltaDetails field is set. + */ + @java.lang.Override + public boolean hasDeltaDetails() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Delta counts and details of resources for which issue was raised
+   * or fixed.
+   * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deltaDetails. + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.DeltaDetails getDeltaDetails() { + return deltaDetails_ == null + ? com.google.cloud.databasecenter.v1beta.DeltaDetails.getDefaultInstance() + : deltaDetails_; + } + + /** + * + * + *
+   * Optional. Delta counts and details of resources for which issue was raised
+   * or fixed.
+   * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.DeltaDetailsOrBuilder getDeltaDetailsOrBuilder() { + return deltaDetails_ == null + ? com.google.cloud.databasecenter.v1beta.DeltaDetails.getDefaultInstance() + : deltaDetails_; + } + + public static final int ISSUE_SEVERITY_FIELD_NUMBER = 4; + private int issueSeverity_ = 0; + + /** + * + * + *
+   * Severity of the issue.
+   * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return Whether the issueSeverity field is set. + */ + @java.lang.Override + public boolean hasIssueSeverity() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Severity of the issue.
+   * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return The enum numeric value on the wire for issueSeverity. + */ + @java.lang.Override + public int getIssueSeverityValue() { + return issueSeverity_; + } + + /** + * + * + *
+   * Severity of the issue.
+   * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return The issueSeverity. + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueSeverity getIssueSeverity() { + com.google.cloud.databasecenter.v1beta.IssueSeverity result = + com.google.cloud.databasecenter.v1beta.IssueSeverity.forNumber(issueSeverity_); + return result == null + ? com.google.cloud.databasecenter.v1beta.IssueSeverity.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 (signalType_ + != com.google.cloud.databasecenter.v1beta.SignalType.SIGNAL_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, signalType_); + } + if (resourceCount_ != 0) { + output.writeInt32(2, resourceCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDeltaDetails()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeEnum(4, issueSeverity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (signalType_ + != com.google.cloud.databasecenter.v1beta.SignalType.SIGNAL_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, signalType_); + } + if (resourceCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, resourceCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeltaDetails()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, issueSeverity_); + } + 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.databasecenter.v1beta.IssueStats)) { + return super.equals(obj); + } + com.google.cloud.databasecenter.v1beta.IssueStats other = + (com.google.cloud.databasecenter.v1beta.IssueStats) obj; + + if (signalType_ != other.signalType_) return false; + if (getResourceCount() != other.getResourceCount()) return false; + if (hasDeltaDetails() != other.hasDeltaDetails()) return false; + if (hasDeltaDetails()) { + if (!getDeltaDetails().equals(other.getDeltaDetails())) return false; + } + if (hasIssueSeverity() != other.hasIssueSeverity()) return false; + if (hasIssueSeverity()) { + if (issueSeverity_ != other.issueSeverity_) 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) + SIGNAL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + signalType_; + hash = (37 * hash) + RESOURCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getResourceCount(); + if (hasDeltaDetails()) { + hash = (37 * hash) + DELTA_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDeltaDetails().hashCode(); + } + if (hasIssueSeverity()) { + hash = (37 * hash) + ISSUE_SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + issueSeverity_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats 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.databasecenter.v1beta.IssueStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats 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.databasecenter.v1beta.IssueStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats 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.databasecenter.v1beta.IssueStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats 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.databasecenter.v1beta.IssueStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats 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.databasecenter.v1beta.IssueStats 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; + } + + /** + * + * + *
+   * IssueStats holds stats for a particular signal category.
+   * 
+ * + * Protobuf type {@code google.cloud.databasecenter.v1beta.IssueStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.databasecenter.v1beta.IssueStats) + com.google.cloud.databasecenter.v1beta.IssueStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.databasecenter.v1beta.IssueStats.class, + com.google.cloud.databasecenter.v1beta.IssueStats.Builder.class); + } + + // Construct using com.google.cloud.databasecenter.v1beta.IssueStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeltaDetailsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signalType_ = 0; + resourceCount_ = 0; + deltaDetails_ = null; + if (deltaDetailsBuilder_ != null) { + deltaDetailsBuilder_.dispose(); + deltaDetailsBuilder_ = null; + } + issueSeverity_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.databasecenter.v1beta.ServiceProto + .internal_static_google_cloud_databasecenter_v1beta_IssueStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueStats getDefaultInstanceForType() { + return com.google.cloud.databasecenter.v1beta.IssueStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueStats build() { + com.google.cloud.databasecenter.v1beta.IssueStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueStats buildPartial() { + com.google.cloud.databasecenter.v1beta.IssueStats result = + new com.google.cloud.databasecenter.v1beta.IssueStats(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.databasecenter.v1beta.IssueStats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signalType_ = signalType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceCount_ = resourceCount_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deltaDetails_ = + deltaDetailsBuilder_ == null ? deltaDetails_ : deltaDetailsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.issueSeverity_ = issueSeverity_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.databasecenter.v1beta.IssueStats) { + return mergeFrom((com.google.cloud.databasecenter.v1beta.IssueStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.databasecenter.v1beta.IssueStats other) { + if (other == com.google.cloud.databasecenter.v1beta.IssueStats.getDefaultInstance()) + return this; + if (other.signalType_ != 0) { + setSignalTypeValue(other.getSignalTypeValue()); + } + if (other.getResourceCount() != 0) { + setResourceCount(other.getResourceCount()); + } + if (other.hasDeltaDetails()) { + mergeDeltaDetails(other.getDeltaDetails()); + } + if (other.hasIssueSeverity()) { + setIssueSeverity(other.getIssueSeverity()); + } + 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: + { + signalType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + resourceCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getDeltaDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + issueSeverity_ = 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 bitField0_; + + private int signalType_ = 0; + + /** + * + * + *
+     * Type of signal which is an issue.
+     * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @return The enum numeric value on the wire for signalType. + */ + @java.lang.Override + public int getSignalTypeValue() { + return signalType_; + } + + /** + * + * + *
+     * Type of signal which is an issue.
+     * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @param value The enum numeric value on the wire for signalType to set. + * @return This builder for chaining. + */ + public Builder setSignalTypeValue(int value) { + signalType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Type of signal which is an issue.
+     * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @return The signalType. + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.SignalType getSignalType() { + com.google.cloud.databasecenter.v1beta.SignalType result = + com.google.cloud.databasecenter.v1beta.SignalType.forNumber(signalType_); + return result == null + ? com.google.cloud.databasecenter.v1beta.SignalType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Type of signal which is an issue.
+     * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @param value The signalType to set. + * @return This builder for chaining. + */ + public Builder setSignalType(com.google.cloud.databasecenter.v1beta.SignalType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + signalType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Type of signal which is an issue.
+     * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearSignalType() { + bitField0_ = (bitField0_ & ~0x00000001); + signalType_ = 0; + onChanged(); + return this; + } + + private int resourceCount_; + + /** + * + * + *
+     * Number of resources having issues of a given type.
+     * 
+ * + * int32 resource_count = 2; + * + * @return The resourceCount. + */ + @java.lang.Override + public int getResourceCount() { + return resourceCount_; + } + + /** + * + * + *
+     * Number of resources having issues of a given type.
+     * 
+ * + * int32 resource_count = 2; + * + * @param value The resourceCount to set. + * @return This builder for chaining. + */ + public Builder setResourceCount(int value) { + + resourceCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Number of resources having issues of a given type.
+     * 
+ * + * int32 resource_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceCount() { + bitField0_ = (bitField0_ & ~0x00000002); + resourceCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.databasecenter.v1beta.DeltaDetails deltaDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.DeltaDetails, + com.google.cloud.databasecenter.v1beta.DeltaDetails.Builder, + com.google.cloud.databasecenter.v1beta.DeltaDetailsOrBuilder> + deltaDetailsBuilder_; + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deltaDetails field is set. + */ + public boolean hasDeltaDetails() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deltaDetails. + */ + public com.google.cloud.databasecenter.v1beta.DeltaDetails getDeltaDetails() { + if (deltaDetailsBuilder_ == null) { + return deltaDetails_ == null + ? com.google.cloud.databasecenter.v1beta.DeltaDetails.getDefaultInstance() + : deltaDetails_; + } else { + return deltaDetailsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDeltaDetails(com.google.cloud.databasecenter.v1beta.DeltaDetails value) { + if (deltaDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deltaDetails_ = value; + } else { + deltaDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDeltaDetails( + com.google.cloud.databasecenter.v1beta.DeltaDetails.Builder builderForValue) { + if (deltaDetailsBuilder_ == null) { + deltaDetails_ = builderForValue.build(); + } else { + deltaDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDeltaDetails(com.google.cloud.databasecenter.v1beta.DeltaDetails value) { + if (deltaDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && deltaDetails_ != null + && deltaDetails_ + != com.google.cloud.databasecenter.v1beta.DeltaDetails.getDefaultInstance()) { + getDeltaDetailsBuilder().mergeFrom(value); + } else { + deltaDetails_ = value; + } + } else { + deltaDetailsBuilder_.mergeFrom(value); + } + if (deltaDetails_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDeltaDetails() { + bitField0_ = (bitField0_ & ~0x00000004); + deltaDetails_ = null; + if (deltaDetailsBuilder_ != null) { + deltaDetailsBuilder_.dispose(); + deltaDetailsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.databasecenter.v1beta.DeltaDetails.Builder getDeltaDetailsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDeltaDetailsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.databasecenter.v1beta.DeltaDetailsOrBuilder getDeltaDetailsOrBuilder() { + if (deltaDetailsBuilder_ != null) { + return deltaDetailsBuilder_.getMessageOrBuilder(); + } else { + return deltaDetails_ == null + ? com.google.cloud.databasecenter.v1beta.DeltaDetails.getDefaultInstance() + : deltaDetails_; + } + } + + /** + * + * + *
+     * Optional. Delta counts and details of resources for which issue was raised
+     * or fixed.
+     * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.DeltaDetails, + com.google.cloud.databasecenter.v1beta.DeltaDetails.Builder, + com.google.cloud.databasecenter.v1beta.DeltaDetailsOrBuilder> + getDeltaDetailsFieldBuilder() { + if (deltaDetailsBuilder_ == null) { + deltaDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.databasecenter.v1beta.DeltaDetails, + com.google.cloud.databasecenter.v1beta.DeltaDetails.Builder, + com.google.cloud.databasecenter.v1beta.DeltaDetailsOrBuilder>( + getDeltaDetails(), getParentForChildren(), isClean()); + deltaDetails_ = null; + } + return deltaDetailsBuilder_; + } + + private int issueSeverity_ = 0; + + /** + * + * + *
+     * Severity of the issue.
+     * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return Whether the issueSeverity field is set. + */ + @java.lang.Override + public boolean hasIssueSeverity() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Severity of the issue.
+     * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return The enum numeric value on the wire for issueSeverity. + */ + @java.lang.Override + public int getIssueSeverityValue() { + return issueSeverity_; + } + + /** + * + * + *
+     * Severity of the issue.
+     * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @param value The enum numeric value on the wire for issueSeverity to set. + * @return This builder for chaining. + */ + public Builder setIssueSeverityValue(int value) { + issueSeverity_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Severity of the issue.
+     * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return The issueSeverity. + */ + @java.lang.Override + public com.google.cloud.databasecenter.v1beta.IssueSeverity getIssueSeverity() { + com.google.cloud.databasecenter.v1beta.IssueSeverity result = + com.google.cloud.databasecenter.v1beta.IssueSeverity.forNumber(issueSeverity_); + return result == null + ? com.google.cloud.databasecenter.v1beta.IssueSeverity.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Severity of the issue.
+     * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @param value The issueSeverity to set. + * @return This builder for chaining. + */ + public Builder setIssueSeverity(com.google.cloud.databasecenter.v1beta.IssueSeverity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + issueSeverity_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Severity of the issue.
+     * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return This builder for chaining. + */ + public Builder clearIssueSeverity() { + bitField0_ = (bitField0_ & ~0x00000008); + issueSeverity_ = 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.databasecenter.v1beta.IssueStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.databasecenter.v1beta.IssueStats) + private static final com.google.cloud.databasecenter.v1beta.IssueStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.databasecenter.v1beta.IssueStats(); + } + + public static com.google.cloud.databasecenter.v1beta.IssueStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IssueStats 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.databasecenter.v1beta.IssueStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueStatsOrBuilder.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueStatsOrBuilder.java new file mode 100644 index 000000000000..c095591eec9e --- /dev/null +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/IssueStatsOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2026 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/databasecenter/v1beta/service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.databasecenter.v1beta; + +public interface IssueStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.databasecenter.v1beta.IssueStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of signal which is an issue.
+   * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @return The enum numeric value on the wire for signalType. + */ + int getSignalTypeValue(); + + /** + * + * + *
+   * Type of signal which is an issue.
+   * 
+ * + * .google.cloud.databasecenter.v1beta.SignalType signal_type = 1; + * + * @return The signalType. + */ + com.google.cloud.databasecenter.v1beta.SignalType getSignalType(); + + /** + * + * + *
+   * Number of resources having issues of a given type.
+   * 
+ * + * int32 resource_count = 2; + * + * @return The resourceCount. + */ + int getResourceCount(); + + /** + * + * + *
+   * Optional. Delta counts and details of resources for which issue was raised
+   * or fixed.
+   * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deltaDetails field is set. + */ + boolean hasDeltaDetails(); + + /** + * + * + *
+   * Optional. Delta counts and details of resources for which issue was raised
+   * or fixed.
+   * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deltaDetails. + */ + com.google.cloud.databasecenter.v1beta.DeltaDetails getDeltaDetails(); + + /** + * + * + *
+   * Optional. Delta counts and details of resources for which issue was raised
+   * or fixed.
+   * 
+ * + * + * optional .google.cloud.databasecenter.v1beta.DeltaDetails delta_details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.databasecenter.v1beta.DeltaDetailsOrBuilder getDeltaDetailsOrBuilder(); + + /** + * + * + *
+   * Severity of the issue.
+   * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return Whether the issueSeverity field is set. + */ + boolean hasIssueSeverity(); + + /** + * + * + *
+   * Severity of the issue.
+   * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return The enum numeric value on the wire for issueSeverity. + */ + int getIssueSeverityValue(); + + /** + * + * + *
+   * Severity of the issue.
+   * 
+ * + * optional .google.cloud.databasecenter.v1beta.IssueSeverity issue_severity = 4; + * + * @return The issueSeverity. + */ + com.google.cloud.databasecenter.v1beta.IssueSeverity getIssueSeverity(); +} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/MachineConfig.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/MachineConfig.java index 31944b8102de..082e94a01194 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/MachineConfig.java +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/MachineConfig.java @@ -25,7 +25,6 @@ *
  * MachineConfig describes the configuration of a machine specific to a Database
  * Resource.
- * NextID: 5
  * 
* * Protobuf type {@code google.cloud.databasecenter.v1beta.MachineConfig} @@ -352,7 +351,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * MachineConfig describes the configuration of a machine specific to a Database
    * Resource.
-   * NextID: 5
    * 
* * Protobuf type {@code google.cloud.databasecenter.v1beta.MachineConfig} diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/ServiceProto.java b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/ServiceProto.java index 350e7eb75837..2dcce61e53e9 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/ServiceProto.java +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/java/com/google/cloud/databasecenter/v1beta/ServiceProto.java @@ -52,6 +52,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_databasecenter_v1beta_DatabaseResource_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_databasecenter_v1beta_DatabaseResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_databasecenter_v1beta_IssueStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_databasecenter_v1beta_IssueStats_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_databasecenter_v1beta_Label_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -158,7 +174,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ud.databasecenter.v1beta.BackupDRConfigB\003\340A\001\022<\n" + "\007edition\030\022 \001(\0162+.google.cloud.databasecenter.v1beta.Edition\022R\n" + "\020maintenance_info\030\023" - + " \001(\01323.google.cloud.databasecenter.v1beta.MaintenanceInfoB\003\340A\001\"3\n" + + " \001(\01323.google.cloud.databasecenter.v1beta.MaintenanceInfoB\003\340A\001\"\342\001\n" + + "\032AggregateIssueStatsRequest\022\023\n" + + "\006parent\030\001 \001(\tB\003\340A\002\022\023\n" + + "\006filter\030\002 \001(\tB\003\340A\001\022T\n" + + "\022signal_type_groups\030\003" + + " \003(\01323.google.cloud.databasecenter.v1beta.SignalTypeGroupB\003\340A\001\0222\n\r" + + "baseline_date\030\004" + + " \001(\0132\021.google.type.DateB\003\340A\001H\000\210\001\001B\020\n" + + "\016_baseline_date\"\313\001\n" + + "\033AggregateIssueStatsResponse\022N\n" + + "\021issue_group_stats\030\001 \003(\01323" + + ".google.cloud.databasecenter.v1beta.IssueGroupStats\022\035\n" + + "\025total_resources_count\030\002 \001(\005\022#\n" + + "\033total_resource_groups_count\030\003 \001(\005\022\030\n" + + "\013unreachable\030\004 \003(\tB\003\340A\006\"\354\001\n" + + "\017IssueGroupStats\022\024\n" + + "\014display_name\030\001 \001(\t\022\035\n" + + "\025resource_groups_count\030\002 \001(\005\022\027\n" + + "\017resources_count\030\003 \001(\005\022%\n" + + "\035healthy_resource_groups_count\030\004 \001(\005\022\037\n" + + "\027healthy_resources_count\030\005 \001(\005\022C\n" + + "\013issue_stats\030\006" + + " \003(\0132..google.cloud.databasecenter.v1beta.IssueStats\"\261\002\n\n" + + "IssueStats\022C\n" + + "\013signal_type\030\001" + + " \001(\0162..google.cloud.databasecenter.v1beta.SignalType\022\026\n" + + "\016resource_count\030\002 \001(\005\022Q\n\r" + + "delta_details\030\003 \001(\01320.go" + + "ogle.cloud.databasecenter.v1beta.DeltaDetailsB\003\340A\001H\000\210\001\001\022N\n" + + "\016issue_severity\030\004 \001(\0162" + + "1.google.cloud.databasecenter.v1beta.IssueSeverityH\001\210\001\001B\020\n" + + "\016_delta_detailsB\021\n" + + "\017_issue_severity\"3\n" + "\005Label\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t\022\016\n" @@ -174,8 +222,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132\021.google.type.DateB\003\340A\001H\000\210\001\001B\020\n" + "\016_baseline_date\"\323\001\n" + "\026AggregateFleetResponse\022C\n" - + "\004rows\030\001 \003(\01325." - + "google.cloud.databasecenter.v1beta.AggregateFleetRow\022#\n" + + "\004rows\030\001" + + " \003(\01325.google.cloud.databasecenter.v1beta.AggregateFleetRow\022#\n" + "\033resource_groups_total_count\030\002 \001(\005\022\034\n" + "\024resource_total_count\030\003 \001(\005\022\027\n" + "\017next_page_token\030\004 \001(\t\022\030\n" @@ -184,22 +232,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tdimension\030\001 \003(\0132-.google.cloud.databasecenter.v1beta.Dimension\022\035\n" + "\025resource_groups_count\030\002 \001(\005\022\027\n" + "\017resources_count\030\003 \001(\005\022Q\n\r" - + "delta_details\030\004" - + " \001(\01320.google.cloud.databasecenter.v1beta.DeltaDetailsB\003\340A\001H\000\210\001\001B\020\n" + + "delta_details\030\004 \001(\0132" + + "0.google.cloud.databasecenter.v1beta.DeltaDetailsB\003\340A\001H\000\210\001\001B\020\n" + "\016_delta_details\"\241\006\n" + "\tDimension\022\023\n" + "\tcontainer\030\002 \001(\tH\000\022G\n" - + "\014product_type\030\003 \001(\0162/.googl" - + "e.cloud.databasecenter.v1beta.ProductTypeH\000\022D\n" + + "\014product_type\030\003" + + " \001(\0162/.google.cloud.databasecenter.v1beta.ProductTypeH\000\022D\n" + "\016product_engine\030\004" + " \001(\0162*.google.cloud.databasecenter.v1beta.EngineH\000\022\031\n" + "\017product_version\030\005 \001(\tH\000\022\022\n" + "\010location\030\006 \001(\tH\000\022\027\n\r" + "resource_type\030\007 \001(\tH\000\022P\n" - + "\021sub_resource_type\030\010" - + " \001(\01623.google.cloud.databasecenter.v1beta.SubResourceTypeH\000\022Q\n" - + "\021resource_category\030\t" - + " \001(\01624.google.cloud.databasecenter.v1beta.ResourceCategoryH\000\022M\n" + + "\021sub_resource_type\030\010 \001(\01623.goo" + + "gle.cloud.databasecenter.v1beta.SubResourceTypeH\000\022Q\n" + + "\021resource_category\030\t \001(\01624.g" + + "oogle.cloud.databasecenter.v1beta.ResourceCategoryH\000\022M\n" + "\017management_type\030\n" + " \001(\01622.google.cloud.databasecenter.v1beta.ManagementTypeH\000\022>\n" + "\007edition\030\013" @@ -229,10 +277,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\007product\030\003 \001(\0132+.google.cloud.databasecenter.v1beta.Product\022\020\n" + "\010location\030\004 \001(\t\"\262\001\n" + "\014DeltaDetails\022P\n" - + "\023increased_resources\030\001 \003(\01323.googl" - + "e.cloud.databasecenter.v1beta.ResourceDetails\022P\n" - + "\023decreased_resources\030\002 \003(\01323.goo" - + "gle.cloud.databasecenter.v1beta.ResourceDetails*^\n" + + "\023increased_resources\030\001" + + " \003(\01323.google.cloud.databasecenter.v1beta.ResourceDetails\022P\n" + + "\023decreased_resources\030\002" + + " \003(\01323.google.cloud.databasecenter.v1beta.ResourceDetails*^\n" + "\020ResourceCategory\022!\n" + "\035RESOURCE_CATEGORY_UNSPECIFIED\020\000\022\014\n" + "\010INSTANCE\020\001\022\013\n" @@ -253,25 +301,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016ManagementType\022\037\n" + "\033MANAGEMENT_TYPE_UNSPECIFIED\020\000\022\037\n" + "\033MANAGEMENT_TYPE_GCP_MANAGED\020\001\022 \n" - + "\034MANAGEMENT_TYPE_SELF_MANAGED\020\0022\224\005\n" + + "\034MANAGEMENT_TYPE_SELF_MANAGED\020\0022\325\006\n" + "\016DatabaseCenter\022\243\001\n\r" - + "QueryProducts\0228.google.cloud.databasecenter.v1beta.QueryProd" - + "uctsRequest\0329.google.cloud.databasecente" - + "r.v1beta.QueryProductsResponse\"\035\202\323\344\223\002\027\022\025/v1beta:queryProducts\022\247\001\n" - + "\016AggregateFleet\0229.google.cloud.databasecenter.v1beta.Ag" - + "gregateFleetRequest\032:.google.cloud.datab" - + "asecenter.v1beta.AggregateFleetResponse\"\036\202\323\344\223\002\030\022\026/v1beta:aggregateFleet\022\336\001\n" - + "\033QueryDatabaseResourceGroups\022F.google.cloud.d" - + "atabasecenter.v1beta.QueryDatabaseResourceGroupsRequest\032G.google.cloud.databasec" - + "enter.v1beta.QueryDatabaseResourceGroups" - + "Response\".\202\323\344\223\002(\"#/v1beta:queryDatabaseR" - + "esourceGroups:\001*\032Q\312A\035databasecenter.goog" - + "leapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\372\001\n" - + "&com.google.cloud.databasecenter.v1betaB\014ServiceProtoP\001ZN" - + "cloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb\252\002" - + "\"Google.Cloud.DatabaseCenter.V1Beta\312\002\"Go" - + "ogle\\Cloud\\DatabaseCenter\\V1beta\352\002%Googl" - + "e::Cloud::DatabaseCenter::V1betab\006proto3" + + "QueryProducts\0228.google.cloud.databasecenter.v1beta.QueryProductsRequest\0329.goog" + + "le.cloud.databasecenter.v1beta.QueryProd" + + "uctsResponse\"\035\202\323\344\223\002\027\022\025/v1beta:queryProducts\022\247\001\n" + + "\016AggregateFleet\0229.google.cloud.databasecenter.v1beta.AggregateFleetReques" + + "t\032:.google.cloud.databasecenter.v1beta.A" + + "ggregateFleetResponse\"\036\202\323\344\223\002\030\022\026/v1beta:aggregateFleet\022\336\001\n" + + "\033QueryDatabaseResourceGroups\022F.google.cloud.databasecenter.v1be" + + "ta.QueryDatabaseResourceGroupsRequest\032G.google.cloud.databasecenter.v1beta.Query" + + "DatabaseResourceGroupsResponse\".\202\323\344\223\002(\"#" + + "/v1beta:queryDatabaseResourceGroups:\001*\022\276\001\n" + + "\023AggregateIssueStats\022>.google.cloud.databasecenter.v1beta.AggregateIssueStatsR" + + "equest\032?.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse\"&\202\323\344\223\002" + + " \"\033/v1beta:aggregateIssueStats:\001*\032Q\312A\035data" + + "basecenter.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\372\001\n" + + "&com.google.cloud.databasecenter.v1betaB\014S" + + "erviceProtoP\001ZNcloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;dat" + + "abasecenterpb\252\002\"Google.Cloud.DatabaseCen" + + "ter.V1Beta\312\002\"Google\\Cloud\\DatabaseCenter" + + "\\V1beta\352\002%Google::Cloud::DatabaseCenter::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -357,8 +407,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Edition", "MaintenanceInfo", }); - internal_static_google_cloud_databasecenter_v1beta_Label_descriptor = + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "SignalTypeGroups", "BaselineDate", + }); + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_databasecenter_v1beta_AggregateIssueStatsResponse_descriptor, + new java.lang.String[] { + "IssueGroupStats", "TotalResourcesCount", "TotalResourceGroupsCount", "Unreachable", + }); + internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_databasecenter_v1beta_IssueGroupStats_descriptor, + new java.lang.String[] { + "DisplayName", + "ResourceGroupsCount", + "ResourcesCount", + "HealthyResourceGroupsCount", + "HealthyResourcesCount", + "IssueStats", + }); + internal_static_google_cloud_databasecenter_v1beta_IssueStats_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_databasecenter_v1beta_IssueStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_databasecenter_v1beta_IssueStats_descriptor, + new java.lang.String[] { + "SignalType", "ResourceCount", "DeltaDetails", "IssueSeverity", + }); + internal_static_google_cloud_databasecenter_v1beta_Label_descriptor = + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_databasecenter_v1beta_Label_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_Label_descriptor, @@ -366,7 +453,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", "Source", }); internal_static_google_cloud_databasecenter_v1beta_AggregateFleetRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_databasecenter_v1beta_AggregateFleetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_AggregateFleetRequest_descriptor, @@ -374,7 +461,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "GroupBy", "OrderBy", "PageSize", "PageToken", "BaselineDate", }); internal_static_google_cloud_databasecenter_v1beta_AggregateFleetResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_databasecenter_v1beta_AggregateFleetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_AggregateFleetResponse_descriptor, @@ -386,7 +473,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Unreachable", }); internal_static_google_cloud_databasecenter_v1beta_AggregateFleetRow_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_databasecenter_v1beta_AggregateFleetRow_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_AggregateFleetRow_descriptor, @@ -394,7 +481,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Dimension", "ResourceGroupsCount", "ResourcesCount", "DeltaDetails", }); internal_static_google_cloud_databasecenter_v1beta_Dimension_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_databasecenter_v1beta_Dimension_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_Dimension_descriptor, @@ -421,7 +508,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Dimension", }); internal_static_google_cloud_databasecenter_v1beta_BackupDRConfig_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_databasecenter_v1beta_BackupDRConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_BackupDRConfig_descriptor, @@ -429,7 +516,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BackupdrManaged", }); internal_static_google_cloud_databasecenter_v1beta_Tag_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_databasecenter_v1beta_Tag_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_Tag_descriptor, @@ -437,7 +524,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", "Source", "Inherited", }); internal_static_google_cloud_databasecenter_v1beta_ResourceDetails_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_databasecenter_v1beta_ResourceDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_ResourceDetails_descriptor, @@ -445,7 +532,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FullResourceName", "Container", "Product", "Location", }); internal_static_google_cloud_databasecenter_v1beta_DeltaDetails_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_databasecenter_v1beta_DeltaDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_databasecenter_v1beta_DeltaDetails_descriptor, diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/machine_config.proto b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/machine_config.proto index ec1dfef79213..994bce966f01 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/machine_config.proto +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/machine_config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -28,7 +28,6 @@ option ruby_package = "Google::Cloud::DatabaseCenter::V1beta"; // MachineConfig describes the configuration of a machine specific to a Database // Resource. -// NextID: 5 message MachineConfig { // Memory size in bytes. int64 memory_size_bytes = 2; diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/maintenance.proto b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/maintenance.proto index d4b5bec6802e..2ce4bb139da0 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/maintenance.proto +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/maintenance.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/metric_data.proto b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/metric_data.proto index bbab749f2092..366ca91854bd 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/metric_data.proto +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/metric_data.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/operation_error_type.proto b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/operation_error_type.proto index ca4daa9dffda..6503048dcb26 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/operation_error_type.proto +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/operation_error_type.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/product.proto b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/product.proto index f24f5cabcddb..06dc0c71a211 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/product.proto +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/product.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/service.proto b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/service.proto index 381944cb2af5..93d5e99a2e77 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/service.proto +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -64,6 +64,15 @@ service DatabaseCenter { body: "*" }; } + + // AggregateIssueStats provides database resource issues statistics. + rpc AggregateIssueStats(AggregateIssueStatsRequest) + returns (AggregateIssueStatsResponse) { + option (google.api.http) = { + post: "/v1beta:aggregateIssueStats" + body: "*" + }; + } } // The enum value corresponds to 'type' suffix in the resource_type field. @@ -405,6 +414,115 @@ message DatabaseResource { [(google.api.field_behavior) = OPTIONAL]; } +// AggregateIssueStatsRequest represents the input to the AggregateIssueStats +// method. +message AggregateIssueStatsRequest { + // Required. Parent can be a project, a folder, or an organization. The search + // is limited to the resources within the `scope`. + // + // The allowed values are: + // + // * projects/{PROJECT_ID} (e.g., "projects/foo-bar") + // * projects/{PROJECT_NUMBER} (e.g., "projects/12345678") + // * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") + // * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The expression to filter resources. + // + // Supported fields are: `full_resource_name`, `resource_type`, `container`, + // `product.type`, `product.engine`, `product.version`, `location`, + // `labels`, `issues`, fields of availability_info, + // data_protection_info,'resource_name', etc. + // + // The expression is a list of zero or more restrictions combined via logical + // operators `AND` and `OR`. When `AND` and `OR` are both used in the + // expression, parentheses must be appropriately used to group the + // combinations. + // + // Example: location="us-east1" + // Example: container="projects/123" OR container="projects/456" + // Example: (container="projects/123" OR + // container="projects/456") AND location="us-east1" + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists of signal types that are issues. + repeated SignalTypeGroup signal_type_groups = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The baseline date w.r.t. which the delta counts are calculated. + // If not set, delta counts are not included in the response and the response + // indicates the current state of the fleet. + optional google.type.Date baseline_date = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message containing one of more group of relevant health issues +// for database resources. +message AggregateIssueStatsResponse { + // List of issue group stats where each group contains stats for resources + // having a particular combination of relevant issues. + repeated IssueGroupStats issue_group_stats = 1; + + // Total count of the resources filtered in based on the user given filter. + int32 total_resources_count = 2; + + // Total count of the resource filtered in based on the user given filter. + int32 total_resource_groups_count = 3; + + // Unordered list. List of unreachable regions from where data could not be + // retrieved. + repeated string unreachable = 4 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// IssueGroupStats refers to stats for a particulare combination of relevant +// health issues of database resources. +message IssueGroupStats { + // Database resource level health card name. This will corresponds to one of + // the requested input group names. + string display_name = 1; + + // Total count of the groups of resources returned by the filter that + // also have one or more resources for which any of the specified issues + // are applicable. + int32 resource_groups_count = 2; + + // Total count of resources returned by the filter for which any of the + // specified issues are applicable. + int32 resources_count = 3; + + // The number of resource groups from the total groups as defined above + // that are healthy with respect to all of the specified issues. + int32 healthy_resource_groups_count = 4; + + // The number of resources from the total defined above in field + // total_resources_count that are healthy with respect to all of the specified + // issues. + int32 healthy_resources_count = 5; + + // List of issues stats containing count of resources having particular issue + // category. + repeated IssueStats issue_stats = 6; +} + +// IssueStats holds stats for a particular signal category. +message IssueStats { + // Type of signal which is an issue. + SignalType signal_type = 1; + + // Number of resources having issues of a given type. + int32 resource_count = 2; + + // Optional. Delta counts and details of resources for which issue was raised + // or fixed. + optional DeltaDetails delta_details = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Severity of the issue. + optional IssueSeverity issue_severity = 4; +} + // Label is a key value pair applied to a resource. message Label { // The key part of the label. diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/signals.proto b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/signals.proto index 72a74a8f8209..c922892fd192 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/signals.proto +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/signals.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/suspension_reason.proto b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/suspension_reason.proto index 7c2b9191d889..a47532a4602d 100644 --- a/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/suspension_reason.proto +++ b/java-databasecenter/proto-google-cloud-databasecenter-v1beta/src/main/proto/google/cloud/databasecenter/v1beta/suspension_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecenter/aggregateissuestats/AsyncAggregateIssueStats.java b/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecenter/aggregateissuestats/AsyncAggregateIssueStats.java new file mode 100644 index 000000000000..9d6c7721e62c --- /dev/null +++ b/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecenter/aggregateissuestats/AsyncAggregateIssueStats.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.databasecenter.v1beta.samples; + +// [START databasecenter_v1beta_generated_DatabaseCenter_AggregateIssueStats_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest; +import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse; +import com.google.cloud.databasecenter.v1beta.DatabaseCenterClient; +import com.google.cloud.databasecenter.v1beta.SignalTypeGroup; +import com.google.type.Date; +import java.util.ArrayList; + +public class AsyncAggregateIssueStats { + + public static void main(String[] args) throws Exception { + asyncAggregateIssueStats(); + } + + public static void asyncAggregateIssueStats() 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 (DatabaseCenterClient databaseCenterClient = DatabaseCenterClient.create()) { + AggregateIssueStatsRequest request = + AggregateIssueStatsRequest.newBuilder() + .setParent("parent-995424086") + .setFilter("filter-1274492040") + .addAllSignalTypeGroups(new ArrayList()) + .setBaselineDate(Date.newBuilder().build()) + .build(); + ApiFuture future = + databaseCenterClient.aggregateIssueStatsCallable().futureCall(request); + // Do something. + AggregateIssueStatsResponse response = future.get(); + } + } +} +// [END databasecenter_v1beta_generated_DatabaseCenter_AggregateIssueStats_async] diff --git a/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecenter/aggregateissuestats/SyncAggregateIssueStats.java b/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecenter/aggregateissuestats/SyncAggregateIssueStats.java new file mode 100644 index 000000000000..23dd4f11d555 --- /dev/null +++ b/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecenter/aggregateissuestats/SyncAggregateIssueStats.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.databasecenter.v1beta.samples; + +// [START databasecenter_v1beta_generated_DatabaseCenter_AggregateIssueStats_sync] +import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest; +import com.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse; +import com.google.cloud.databasecenter.v1beta.DatabaseCenterClient; +import com.google.cloud.databasecenter.v1beta.SignalTypeGroup; +import com.google.type.Date; +import java.util.ArrayList; + +public class SyncAggregateIssueStats { + + public static void main(String[] args) throws Exception { + syncAggregateIssueStats(); + } + + public static void syncAggregateIssueStats() 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 (DatabaseCenterClient databaseCenterClient = DatabaseCenterClient.create()) { + AggregateIssueStatsRequest request = + AggregateIssueStatsRequest.newBuilder() + .setParent("parent-995424086") + .setFilter("filter-1274492040") + .addAllSignalTypeGroups(new ArrayList()) + .setBaselineDate(Date.newBuilder().build()) + .build(); + AggregateIssueStatsResponse response = databaseCenterClient.aggregateIssueStats(request); + } + } +} +// [END databasecenter_v1beta_generated_DatabaseCenter_AggregateIssueStats_sync] diff --git a/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecentersettings/queryproducts/SyncQueryProducts.java b/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecentersettings/aggregateissuestats/SyncAggregateIssueStats.java similarity index 86% rename from java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecentersettings/queryproducts/SyncQueryProducts.java rename to java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecentersettings/aggregateissuestats/SyncAggregateIssueStats.java index 00fe05c7b96b..05b37e44d536 100644 --- a/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecentersettings/queryproducts/SyncQueryProducts.java +++ b/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/databasecentersettings/aggregateissuestats/SyncAggregateIssueStats.java @@ -16,17 +16,17 @@ package com.google.cloud.databasecenter.v1beta.samples; -// [START databasecenter_v1beta_generated_DatabaseCenterSettings_QueryProducts_sync] +// [START databasecenter_v1beta_generated_DatabaseCenterSettings_AggregateIssueStats_sync] import com.google.cloud.databasecenter.v1beta.DatabaseCenterSettings; import java.time.Duration; -public class SyncQueryProducts { +public class SyncAggregateIssueStats { public static void main(String[] args) throws Exception { - syncQueryProducts(); + syncAggregateIssueStats(); } - public static void syncQueryProducts() throws Exception { + public static void syncAggregateIssueStats() 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. @@ -35,10 +35,10 @@ public static void syncQueryProducts() throws Exception { DatabaseCenterSettings.Builder databaseCenterSettingsBuilder = DatabaseCenterSettings.newBuilder(); databaseCenterSettingsBuilder - .queryProductsSettings() + .aggregateIssueStatsSettings() .setRetrySettings( databaseCenterSettingsBuilder - .queryProductsSettings() + .aggregateIssueStatsSettings() .getRetrySettings() .toBuilder() .setInitialRetryDelayDuration(Duration.ofSeconds(1)) @@ -53,4 +53,4 @@ public static void syncQueryProducts() throws Exception { DatabaseCenterSettings databaseCenterSettings = databaseCenterSettingsBuilder.build(); } } -// [END databasecenter_v1beta_generated_DatabaseCenterSettings_QueryProducts_sync] +// [END databasecenter_v1beta_generated_DatabaseCenterSettings_AggregateIssueStats_sync] diff --git a/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/stub/databasecenterstubsettings/queryproducts/SyncQueryProducts.java b/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/stub/databasecenterstubsettings/aggregateissuestats/SyncAggregateIssueStats.java similarity index 88% rename from java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/stub/databasecenterstubsettings/queryproducts/SyncQueryProducts.java rename to java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/stub/databasecenterstubsettings/aggregateissuestats/SyncAggregateIssueStats.java index cdc07b9b13ce..b45e2a8112f1 100644 --- a/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/stub/databasecenterstubsettings/queryproducts/SyncQueryProducts.java +++ b/java-databasecenter/samples/snippets/generated/com/google/cloud/databasecenter/v1beta/stub/databasecenterstubsettings/aggregateissuestats/SyncAggregateIssueStats.java @@ -16,17 +16,17 @@ package com.google.cloud.databasecenter.v1beta.stub.samples; -// [START databasecenter_v1beta_generated_DatabaseCenterStubSettings_QueryProducts_sync] +// [START databasecenter_v1beta_generated_DatabaseCenterStubSettings_AggregateIssueStats_sync] import com.google.cloud.databasecenter.v1beta.stub.DatabaseCenterStubSettings; import java.time.Duration; -public class SyncQueryProducts { +public class SyncAggregateIssueStats { public static void main(String[] args) throws Exception { - syncQueryProducts(); + syncAggregateIssueStats(); } - public static void syncQueryProducts() throws Exception { + public static void syncAggregateIssueStats() 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. @@ -35,10 +35,10 @@ public static void syncQueryProducts() throws Exception { DatabaseCenterStubSettings.Builder databaseCenterSettingsBuilder = DatabaseCenterStubSettings.newBuilder(); databaseCenterSettingsBuilder - .queryProductsSettings() + .aggregateIssueStatsSettings() .setRetrySettings( databaseCenterSettingsBuilder - .queryProductsSettings() + .aggregateIssueStatsSettings() .getRetrySettings() .toBuilder() .setInitialRetryDelayDuration(Duration.ofSeconds(1)) @@ -53,4 +53,4 @@ public static void syncQueryProducts() throws Exception { DatabaseCenterStubSettings databaseCenterSettings = databaseCenterSettingsBuilder.build(); } } -// [END databasecenter_v1beta_generated_DatabaseCenterStubSettings_QueryProducts_sync] +// [END databasecenter_v1beta_generated_DatabaseCenterStubSettings_AggregateIssueStats_sync] diff --git a/java-dialogflow-cx/README.md b/java-dialogflow-cx/README.md index c160254af60f..210db57a22b0 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.92.0 + 0.93.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dialogflow-cx:0.92.0' +implementation 'com.google.cloud:google-cloud-dialogflow-cx:0.93.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow-cx" % "0.92.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow-cx" % "0.93.0" ``` ## Authentication @@ -181,7 +181,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-dialogflow-cx/latest/overview [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow-cx.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.92.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.93.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesClient.java new file mode 100644 index 000000000000..7b0a23a13828 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesClient.java @@ -0,0 +1,1245 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.stub.ExamplesStub; +import com.google.cloud.dialogflow.cx.v3.stub.ExamplesStubSettings; +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.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example]. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+ *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+ *   Example example = Example.newBuilder().build();
+ *   Example response = examplesClient.createExample(parent, example);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ExamplesClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateExample

Creates an example in the specified playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createExample(CreateExampleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createExample(PlaybookName parent, Example example) + *

  • createExample(String parent, Example example) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createExampleCallable() + *

+ *

DeleteExample

Deletes the specified example.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteExample(DeleteExampleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteExample(ExampleName name) + *

  • deleteExample(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteExampleCallable() + *

+ *

ListExamples

Returns a list of examples in the specified playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listExamples(ListExamplesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listExamples(PlaybookName parent) + *

  • listExamples(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listExamplesPagedCallable() + *

  • listExamplesCallable() + *

+ *

GetExample

Retrieves the specified example.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getExample(GetExampleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getExample(ExampleName name) + *

  • getExample(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getExampleCallable() + *

+ *

UpdateExample

Update the specified example.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateExample(UpdateExampleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateExample(Example example, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateExampleCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ExamplesSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@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
+ * ExamplesSettings examplesSettings =
+ *     ExamplesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ExamplesClient examplesClient = ExamplesClient.create(examplesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * ExamplesSettings examplesSettings =
+ *     ExamplesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ExamplesClient examplesClient = ExamplesClient.create(examplesSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * ExamplesSettings examplesSettings = ExamplesSettings.newHttpJsonBuilder().build();
+ * ExamplesClient examplesClient = ExamplesClient.create(examplesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ExamplesClient implements BackgroundResource { + private final ExamplesSettings settings; + private final ExamplesStub stub; + + /** Constructs an instance of ExamplesClient with default settings. */ + public static final ExamplesClient create() throws IOException { + return create(ExamplesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ExamplesClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ExamplesClient create(ExamplesSettings settings) throws IOException { + return new ExamplesClient(settings); + } + + /** + * Constructs an instance of ExamplesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ExamplesSettings). + */ + public static final ExamplesClient create(ExamplesStub stub) { + return new ExamplesClient(stub); + } + + /** + * Constructs an instance of ExamplesClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected ExamplesClient(ExamplesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ExamplesStubSettings) settings.getStubSettings()).createStub(); + } + + protected ExamplesClient(ExamplesStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ExamplesSettings getSettings() { + return settings; + } + + public ExamplesStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an example in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   Example example = Example.newBuilder().build();
+   *   Example response = examplesClient.createExample(parent, example);
+   * }
+   * }
+ * + * @param parent Required. The playbook to create an example for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @param example Required. The example to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example createExample(PlaybookName parent, Example example) { + CreateExampleRequest request = + CreateExampleRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setExample(example) + .build(); + return createExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an example in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   String parent =
+   *       PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   Example example = Example.newBuilder().build();
+   *   Example response = examplesClient.createExample(parent, example);
+   * }
+   * }
+ * + * @param parent Required. The playbook to create an example for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @param example Required. The example to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example createExample(String parent, Example example) { + CreateExampleRequest request = + CreateExampleRequest.newBuilder().setParent(parent).setExample(example).build(); + return createExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an example in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   CreateExampleRequest request =
+   *       CreateExampleRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setExample(Example.newBuilder().build())
+   *           .build();
+   *   Example response = examplesClient.createExample(request);
+   * }
+   * }
+ * + * @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 Example createExample(CreateExampleRequest request) { + return createExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an example in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   CreateExampleRequest request =
+   *       CreateExampleRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setExample(Example.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = examplesClient.createExampleCallable().futureCall(request);
+   *   // Do something.
+   *   Example response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createExampleCallable() { + return stub.createExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ExampleName name =
+   *       ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
+   *   examplesClient.deleteExample(name);
+   * }
+   * }
+ * + * @param name Required. The name of the example to delete. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExample(ExampleName name) { + DeleteExampleRequest request = + DeleteExampleRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   String name =
+   *       ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *           .toString();
+   *   examplesClient.deleteExample(name);
+   * }
+   * }
+ * + * @param name Required. The name of the example to delete. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExample(String name) { + DeleteExampleRequest request = DeleteExampleRequest.newBuilder().setName(name).build(); + deleteExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   DeleteExampleRequest request =
+   *       DeleteExampleRequest.newBuilder()
+   *           .setName(
+   *               ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *                   .toString())
+   *           .build();
+   *   examplesClient.deleteExample(request);
+   * }
+   * }
+ * + * @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 void deleteExample(DeleteExampleRequest request) { + deleteExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   DeleteExampleRequest request =
+   *       DeleteExampleRequest.newBuilder()
+   *           .setName(
+   *               ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = examplesClient.deleteExampleCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteExampleCallable() { + return stub.deleteExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   for (Example element : examplesClient.listExamples(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The playbook to list the examples from. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExamplesPagedResponse listExamples(PlaybookName parent) { + ListExamplesRequest request = + ListExamplesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExamples(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   String parent =
+   *       PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   for (Example element : examplesClient.listExamples(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The playbook to list the examples from. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExamplesPagedResponse listExamples(String parent) { + ListExamplesRequest request = ListExamplesRequest.newBuilder().setParent(parent).build(); + return listExamples(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListExamplesRequest request =
+   *       ListExamplesRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   for (Example element : examplesClient.listExamples(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListExamplesPagedResponse listExamples(ListExamplesRequest request) { + return listExamplesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListExamplesRequest request =
+   *       ListExamplesRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = examplesClient.listExamplesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Example element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listExamplesPagedCallable() { + return stub.listExamplesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListExamplesRequest request =
+   *       ListExamplesRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   while (true) {
+   *     ListExamplesResponse response = examplesClient.listExamplesCallable().call(request);
+   *     for (Example element : response.getExamplesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listExamplesCallable() { + return stub.listExamplesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ExampleName name =
+   *       ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
+   *   Example response = examplesClient.getExample(name);
+   * }
+   * }
+ * + * @param name Required. The name of the example. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example getExample(ExampleName name) { + GetExampleRequest request = + GetExampleRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   String name =
+   *       ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *           .toString();
+   *   Example response = examplesClient.getExample(name);
+   * }
+   * }
+ * + * @param name Required. The name of the example. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example getExample(String name) { + GetExampleRequest request = GetExampleRequest.newBuilder().setName(name).build(); + return getExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   GetExampleRequest request =
+   *       GetExampleRequest.newBuilder()
+   *           .setName(
+   *               ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *                   .toString())
+   *           .build();
+   *   Example response = examplesClient.getExample(request);
+   * }
+   * }
+ * + * @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 Example getExample(GetExampleRequest request) { + return getExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   GetExampleRequest request =
+   *       GetExampleRequest.newBuilder()
+   *           .setName(
+   *               ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = examplesClient.getExampleCallable().futureCall(request);
+   *   // Do something.
+   *   Example response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getExampleCallable() { + return stub.getExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   Example example = Example.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Example response = examplesClient.updateExample(example, updateMask);
+   * }
+   * }
+ * + * @param example Required. The example to update. + * @param updateMask Optional. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example updateExample(Example example, FieldMask updateMask) { + UpdateExampleRequest request = + UpdateExampleRequest.newBuilder().setExample(example).setUpdateMask(updateMask).build(); + return updateExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   UpdateExampleRequest request =
+   *       UpdateExampleRequest.newBuilder()
+   *           .setExample(Example.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Example response = examplesClient.updateExample(request);
+   * }
+   * }
+ * + * @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 Example updateExample(UpdateExampleRequest request) { + return updateExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   UpdateExampleRequest request =
+   *       UpdateExampleRequest.newBuilder()
+   *           .setExample(Example.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = examplesClient.updateExampleCallable().futureCall(request);
+   *   // Do something.
+   *   Example response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateExampleCallable() { + return stub.updateExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : examplesClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = examplesClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = examplesClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = examplesClient.getLocation(request);
+   * }
+   * }
+ * + * @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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = examplesClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListExamplesPagedResponse + extends AbstractPagedListResponse< + ListExamplesRequest, + ListExamplesResponse, + Example, + ListExamplesPage, + ListExamplesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListExamplesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListExamplesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListExamplesPagedResponse(ListExamplesPage page) { + super(page, ListExamplesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListExamplesPage + extends AbstractPage { + + private ListExamplesPage( + PageContext context, + ListExamplesResponse response) { + super(context, response); + } + + private static ListExamplesPage createEmptyPage() { + return new ListExamplesPage(null, null); + } + + @Override + protected ListExamplesPage createPage( + PageContext context, + ListExamplesResponse response) { + return new ListExamplesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListExamplesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListExamplesRequest, + ListExamplesResponse, + Example, + ListExamplesPage, + ListExamplesFixedSizeCollection> { + + private ListExamplesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListExamplesFixedSizeCollection createEmptyCollection() { + return new ListExamplesFixedSizeCollection(null, 0); + } + + @Override + protected ListExamplesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListExamplesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesSettings.java new file mode 100644 index 000000000000..4636cbbfab8c --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesSettings.java @@ -0,0 +1,288 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3.stub.ExamplesStubSettings; +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.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ExamplesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createExample: + * + *

{@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
+ * ExamplesSettings.Builder examplesSettingsBuilder = ExamplesSettings.newBuilder();
+ * examplesSettingsBuilder
+ *     .createExampleSettings()
+ *     .setRetrySettings(
+ *         examplesSettingsBuilder
+ *             .createExampleSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * ExamplesSettings examplesSettings = examplesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class ExamplesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createExample. */ + public UnaryCallSettings createExampleSettings() { + return ((ExamplesStubSettings) getStubSettings()).createExampleSettings(); + } + + /** Returns the object with the settings used for calls to deleteExample. */ + public UnaryCallSettings deleteExampleSettings() { + return ((ExamplesStubSettings) getStubSettings()).deleteExampleSettings(); + } + + /** Returns the object with the settings used for calls to listExamples. */ + public PagedCallSettings + listExamplesSettings() { + return ((ExamplesStubSettings) getStubSettings()).listExamplesSettings(); + } + + /** Returns the object with the settings used for calls to getExample. */ + public UnaryCallSettings getExampleSettings() { + return ((ExamplesStubSettings) getStubSettings()).getExampleSettings(); + } + + /** Returns the object with the settings used for calls to updateExample. */ + public UnaryCallSettings updateExampleSettings() { + return ((ExamplesStubSettings) getStubSettings()).updateExampleSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ExamplesStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ExamplesStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final ExamplesSettings create(ExamplesStubSettings stub) throws IOException { + return new ExamplesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ExamplesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ExamplesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ExamplesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ExamplesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ExamplesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ExamplesStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ExamplesStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ExamplesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ExamplesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ExamplesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ExamplesStubSettings.newBuilder(clientContext)); + } + + protected Builder(ExamplesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ExamplesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ExamplesStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(ExamplesStubSettings.newHttpJsonBuilder()); + } + + public ExamplesStubSettings.Builder getStubSettingsBuilder() { + return ((ExamplesStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createExample. */ + public UnaryCallSettings.Builder createExampleSettings() { + return getStubSettingsBuilder().createExampleSettings(); + } + + /** Returns the builder for the settings used for calls to deleteExample. */ + public UnaryCallSettings.Builder deleteExampleSettings() { + return getStubSettingsBuilder().deleteExampleSettings(); + } + + /** Returns the builder for the settings used for calls to listExamples. */ + public PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings() { + return getStubSettingsBuilder().listExamplesSettings(); + } + + /** Returns the builder for the settings used for calls to getExample. */ + public UnaryCallSettings.Builder getExampleSettings() { + return getStubSettingsBuilder().getExampleSettings(); + } + + /** Returns the builder for the settings used for calls to updateExample. */ + public UnaryCallSettings.Builder updateExampleSettings() { + return getStubSettingsBuilder().updateExampleSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public ExamplesSettings build() throws IOException { + return new ExamplesSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClient.java new file mode 100644 index 000000000000..b557a6dbb20f --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClient.java @@ -0,0 +1,2333 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.ApiFuture; +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.v3.stub.PlaybooksStub; +import com.google.cloud.dialogflow.cx.v3.stub.PlaybooksStubSettings; +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.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Struct; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook]. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Playbook playbook = Playbook.newBuilder().build();
+ *   Playbook response = playbooksClient.createPlaybook(parent, playbook);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PlaybooksClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreatePlaybook

Creates a playbook in a specified agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPlaybook(CreatePlaybookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createPlaybook(AgentName parent, Playbook playbook) + *

  • createPlaybook(String parent, Playbook playbook) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPlaybookCallable() + *

+ *

DeletePlaybook

Deletes a specified playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePlaybook(DeletePlaybookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deletePlaybook(PlaybookName name) + *

  • deletePlaybook(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePlaybookCallable() + *

+ *

ListPlaybooks

Returns a list of playbooks in the specified agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPlaybooks(ListPlaybooksRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPlaybooks(AgentName parent) + *

  • listPlaybooks(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPlaybooksPagedCallable() + *

  • listPlaybooksCallable() + *

+ *

GetPlaybook

Retrieves the specified Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPlaybook(GetPlaybookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPlaybook(PlaybookName name) + *

  • getPlaybook(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPlaybookCallable() + *

+ *

ExportPlaybook

Exports the specified playbook to a binary file. + *

Note that resources (e.g. examples, tools) that the playbook references will also be exported.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • exportPlaybookAsync(ExportPlaybookRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • exportPlaybookOperationCallable() + *

  • exportPlaybookCallable() + *

+ *

ImportPlaybook

Imports the specified playbook to the specified agent from a binary file.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • importPlaybookAsync(ImportPlaybookRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • importPlaybookOperationCallable() + *

  • importPlaybookCallable() + *

+ *

UpdatePlaybook

Updates the specified Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePlaybook(UpdatePlaybookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updatePlaybook(Playbook playbook, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePlaybookCallable() + *

+ *

CreatePlaybookVersion

Creates a version for the specified Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPlaybookVersion(CreatePlaybookVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createPlaybookVersion(PlaybookName parent, PlaybookVersion playbookVersion) + *

  • createPlaybookVersion(String parent, PlaybookVersion playbookVersion) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPlaybookVersionCallable() + *

+ *

GetPlaybookVersion

Retrieves the specified version of the Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPlaybookVersion(GetPlaybookVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPlaybookVersion(PlaybookVersionName name) + *

  • getPlaybookVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPlaybookVersionCallable() + *

+ *

RestorePlaybookVersion

Retrieves the specified version of the Playbook and stores it as the current playbook draft, returning the playbook with resources updated.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • restorePlaybookVersion(RestorePlaybookVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • restorePlaybookVersion(PlaybookVersionName name) + *

  • restorePlaybookVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • restorePlaybookVersionCallable() + *

+ *

ListPlaybookVersions

Lists versions for the specified Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPlaybookVersions(ListPlaybookVersionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPlaybookVersions(PlaybookName parent) + *

  • listPlaybookVersions(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPlaybookVersionsPagedCallable() + *

  • listPlaybookVersionsCallable() + *

+ *

DeletePlaybookVersion

Deletes the specified version of the Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePlaybookVersion(DeletePlaybookVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deletePlaybookVersion(PlaybookVersionName name) + *

  • deletePlaybookVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePlaybookVersionCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of PlaybooksSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@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
+ * PlaybooksSettings playbooksSettings =
+ *     PlaybooksSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * PlaybooksSettings playbooksSettings =
+ *     PlaybooksSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * PlaybooksSettings playbooksSettings = PlaybooksSettings.newHttpJsonBuilder().build();
+ * PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class PlaybooksClient implements BackgroundResource { + private final PlaybooksSettings settings; + private final PlaybooksStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of PlaybooksClient with default settings. */ + public static final PlaybooksClient create() throws IOException { + return create(PlaybooksSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PlaybooksClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PlaybooksClient create(PlaybooksSettings settings) throws IOException { + return new PlaybooksClient(settings); + } + + /** + * Constructs an instance of PlaybooksClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(PlaybooksSettings). + */ + public static final PlaybooksClient create(PlaybooksStub stub) { + return new PlaybooksClient(stub); + } + + /** + * Constructs an instance of PlaybooksClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected PlaybooksClient(PlaybooksSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PlaybooksStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected PlaybooksClient(PlaybooksStub 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 PlaybooksSettings getSettings() { + return settings; + } + + public PlaybooksStub 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. + /** + * Creates a playbook in a specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Playbook playbook = Playbook.newBuilder().build();
+   *   Playbook response = playbooksClient.createPlaybook(parent, playbook);
+   * }
+   * }
+ * + * @param parent Required. The agent to create a playbook for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. + * @param playbook Required. The playbook to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook createPlaybook(AgentName parent, Playbook playbook) { + CreatePlaybookRequest request = + CreatePlaybookRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPlaybook(playbook) + .build(); + return createPlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a playbook in a specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Playbook playbook = Playbook.newBuilder().build();
+   *   Playbook response = playbooksClient.createPlaybook(parent, playbook);
+   * }
+   * }
+ * + * @param parent Required. The agent to create a playbook for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. + * @param playbook Required. The playbook to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook createPlaybook(String parent, Playbook playbook) { + CreatePlaybookRequest request = + CreatePlaybookRequest.newBuilder().setParent(parent).setPlaybook(playbook).build(); + return createPlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a playbook in a specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   CreatePlaybookRequest request =
+   *       CreatePlaybookRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPlaybook(Playbook.newBuilder().build())
+   *           .build();
+   *   Playbook response = playbooksClient.createPlaybook(request);
+   * }
+   * }
+ * + * @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 Playbook createPlaybook(CreatePlaybookRequest request) { + return createPlaybookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a playbook in a specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   CreatePlaybookRequest request =
+   *       CreatePlaybookRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPlaybook(Playbook.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = playbooksClient.createPlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   Playbook response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createPlaybookCallable() { + return stub.createPlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   playbooksClient.deletePlaybook(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook to delete. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePlaybook(PlaybookName name) { + DeletePlaybookRequest request = + DeletePlaybookRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deletePlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   playbooksClient.deletePlaybook(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook to delete. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePlaybook(String name) { + DeletePlaybookRequest request = DeletePlaybookRequest.newBuilder().setName(name).build(); + deletePlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   DeletePlaybookRequest request =
+   *       DeletePlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .build();
+   *   playbooksClient.deletePlaybook(request);
+   * }
+   * }
+ * + * @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 void deletePlaybook(DeletePlaybookRequest request) { + deletePlaybookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   DeletePlaybookRequest request =
+   *       DeletePlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .build();
+   *   ApiFuture future = playbooksClient.deletePlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePlaybookCallable() { + return stub.deletePlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Playbook element : playbooksClient.listPlaybooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list playbooks from. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPlaybooksPagedResponse listPlaybooks(AgentName parent) { + ListPlaybooksRequest request = + ListPlaybooksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPlaybooks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   for (Playbook element : playbooksClient.listPlaybooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list playbooks from. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPlaybooksPagedResponse listPlaybooks(String parent) { + ListPlaybooksRequest request = ListPlaybooksRequest.newBuilder().setParent(parent).build(); + return listPlaybooks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybooksRequest request =
+   *       ListPlaybooksRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Playbook element : playbooksClient.listPlaybooks(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListPlaybooksPagedResponse listPlaybooks(ListPlaybooksRequest request) { + return listPlaybooksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybooksRequest request =
+   *       ListPlaybooksRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = playbooksClient.listPlaybooksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Playbook element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPlaybooksPagedCallable() { + return stub.listPlaybooksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybooksRequest request =
+   *       ListPlaybooksRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPlaybooksResponse response = playbooksClient.listPlaybooksCallable().call(request);
+   *     for (Playbook element : response.getPlaybooksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listPlaybooksCallable() { + return stub.listPlaybooksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   Playbook response = playbooksClient.getPlaybook(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook getPlaybook(PlaybookName name) { + GetPlaybookRequest request = + GetPlaybookRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   Playbook response = playbooksClient.getPlaybook(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook getPlaybook(String name) { + GetPlaybookRequest request = GetPlaybookRequest.newBuilder().setName(name).build(); + return getPlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetPlaybookRequest request =
+   *       GetPlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .build();
+   *   Playbook response = playbooksClient.getPlaybook(request);
+   * }
+   * }
+ * + * @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 Playbook getPlaybook(GetPlaybookRequest request) { + return getPlaybookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetPlaybookRequest request =
+   *       GetPlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .build();
+   *   ApiFuture future = playbooksClient.getPlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   Playbook response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPlaybookCallable() { + return stub.getPlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the specified playbook to a binary file. + * + *

Note that resources (e.g. examples, tools) that the playbook references will also be + * exported. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ExportPlaybookRequest request =
+   *       ExportPlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPlaybookUri("playbookUri2118184975")
+   *           .build();
+   *   ExportPlaybookResponse response = playbooksClient.exportPlaybookAsync(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 exportPlaybookAsync( + ExportPlaybookRequest request) { + return exportPlaybookOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the specified playbook to a binary file. + * + *

Note that resources (e.g. examples, tools) that the playbook references will also be + * exported. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ExportPlaybookRequest request =
+   *       ExportPlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPlaybookUri("playbookUri2118184975")
+   *           .build();
+   *   OperationFuture future =
+   *       playbooksClient.exportPlaybookOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportPlaybookResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportPlaybookOperationCallable() { + return stub.exportPlaybookOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the specified playbook to a binary file. + * + *

Note that resources (e.g. examples, tools) that the playbook references will also be + * exported. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ExportPlaybookRequest request =
+   *       ExportPlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPlaybookUri("playbookUri2118184975")
+   *           .build();
+   *   ApiFuture future = playbooksClient.exportPlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportPlaybookCallable() { + return stub.exportPlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified playbook to the specified agent from a binary file. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ImportPlaybookRequest request =
+   *       ImportPlaybookRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setImportStrategy(PlaybookImportStrategy.newBuilder().build())
+   *           .build();
+   *   ImportPlaybookResponse response = playbooksClient.importPlaybookAsync(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 importPlaybookAsync( + ImportPlaybookRequest request) { + return importPlaybookOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified playbook to the specified agent from a binary file. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ImportPlaybookRequest request =
+   *       ImportPlaybookRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setImportStrategy(PlaybookImportStrategy.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       playbooksClient.importPlaybookOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportPlaybookResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + importPlaybookOperationCallable() { + return stub.importPlaybookOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified playbook to the specified agent from a binary file. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ImportPlaybookRequest request =
+   *       ImportPlaybookRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setImportStrategy(PlaybookImportStrategy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = playbooksClient.importPlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importPlaybookCallable() { + return stub.importPlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   Playbook playbook = Playbook.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Playbook response = playbooksClient.updatePlaybook(playbook, updateMask);
+   * }
+   * }
+ * + * @param playbook Required. The playbook to update. + * @param updateMask The mask to control which fields get updated. If the mask is not present, all + * fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook updatePlaybook(Playbook playbook, FieldMask updateMask) { + UpdatePlaybookRequest request = + UpdatePlaybookRequest.newBuilder().setPlaybook(playbook).setUpdateMask(updateMask).build(); + return updatePlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   UpdatePlaybookRequest request =
+   *       UpdatePlaybookRequest.newBuilder()
+   *           .setPlaybook(Playbook.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Playbook response = playbooksClient.updatePlaybook(request);
+   * }
+   * }
+ * + * @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 Playbook updatePlaybook(UpdatePlaybookRequest request) { + return updatePlaybookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   UpdatePlaybookRequest request =
+   *       UpdatePlaybookRequest.newBuilder()
+   *           .setPlaybook(Playbook.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = playbooksClient.updatePlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   Playbook response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePlaybookCallable() { + return stub.updatePlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build();
+   *   PlaybookVersion response = playbooksClient.createPlaybookVersion(parent, playbookVersion);
+   * }
+   * }
+ * + * @param parent Required. The playbook to create a version for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @param playbookVersion Required. The playbook version to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PlaybookVersion createPlaybookVersion( + PlaybookName parent, PlaybookVersion playbookVersion) { + CreatePlaybookVersionRequest request = + CreatePlaybookVersionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPlaybookVersion(playbookVersion) + .build(); + return createPlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String parent =
+   *       PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build();
+   *   PlaybookVersion response = playbooksClient.createPlaybookVersion(parent, playbookVersion);
+   * }
+   * }
+ * + * @param parent Required. The playbook to create a version for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @param playbookVersion Required. The playbook version to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PlaybookVersion createPlaybookVersion( + String parent, PlaybookVersion playbookVersion) { + CreatePlaybookVersionRequest request = + CreatePlaybookVersionRequest.newBuilder() + .setParent(parent) + .setPlaybookVersion(playbookVersion) + .build(); + return createPlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   CreatePlaybookVersionRequest request =
+   *       CreatePlaybookVersionRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPlaybookVersion(PlaybookVersion.newBuilder().build())
+   *           .build();
+   *   PlaybookVersion response = playbooksClient.createPlaybookVersion(request);
+   * }
+   * }
+ * + * @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 PlaybookVersion createPlaybookVersion(CreatePlaybookVersionRequest request) { + return createPlaybookVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   CreatePlaybookVersionRequest request =
+   *       CreatePlaybookVersionRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPlaybookVersion(PlaybookVersion.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       playbooksClient.createPlaybookVersionCallable().futureCall(request);
+   *   // Do something.
+   *   PlaybookVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createPlaybookVersionCallable() { + return stub.createPlaybookVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookVersionName name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]");
+   *   PlaybookVersion response = playbooksClient.getPlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PlaybookVersion getPlaybookVersion(PlaybookVersionName name) { + GetPlaybookVersionRequest request = + GetPlaybookVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getPlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *           .toString();
+   *   PlaybookVersion response = playbooksClient.getPlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PlaybookVersion getPlaybookVersion(String name) { + GetPlaybookVersionRequest request = + GetPlaybookVersionRequest.newBuilder().setName(name).build(); + return getPlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetPlaybookVersionRequest request =
+   *       GetPlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   PlaybookVersion response = playbooksClient.getPlaybookVersion(request);
+   * }
+   * }
+ * + * @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 PlaybookVersion getPlaybookVersion(GetPlaybookVersionRequest request) { + return getPlaybookVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetPlaybookVersionRequest request =
+   *       GetPlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       playbooksClient.getPlaybookVersionCallable().futureCall(request);
+   *   // Do something.
+   *   PlaybookVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getPlaybookVersionCallable() { + return stub.getPlaybookVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook and stores it as the current playbook draft, + * returning the playbook with resources updated. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookVersionName name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]");
+   *   RestorePlaybookVersionResponse response = playbooksClient.restorePlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RestorePlaybookVersionResponse restorePlaybookVersion(PlaybookVersionName name) { + RestorePlaybookVersionRequest request = + RestorePlaybookVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return restorePlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook and stores it as the current playbook draft, + * returning the playbook with resources updated. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *           .toString();
+   *   RestorePlaybookVersionResponse response = playbooksClient.restorePlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RestorePlaybookVersionResponse restorePlaybookVersion(String name) { + RestorePlaybookVersionRequest request = + RestorePlaybookVersionRequest.newBuilder().setName(name).build(); + return restorePlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook and stores it as the current playbook draft, + * returning the playbook with resources updated. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   RestorePlaybookVersionRequest request =
+   *       RestorePlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   RestorePlaybookVersionResponse response = playbooksClient.restorePlaybookVersion(request);
+   * }
+   * }
+ * + * @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 RestorePlaybookVersionResponse restorePlaybookVersion( + RestorePlaybookVersionRequest request) { + return restorePlaybookVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook and stores it as the current playbook draft, + * returning the playbook with resources updated. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   RestorePlaybookVersionRequest request =
+   *       RestorePlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       playbooksClient.restorePlaybookVersionCallable().futureCall(request);
+   *   // Do something.
+   *   RestorePlaybookVersionResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + restorePlaybookVersionCallable() { + return stub.restorePlaybookVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   for (PlaybookVersion element : playbooksClient.listPlaybookVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The playbook to list versions for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPlaybookVersionsPagedResponse listPlaybookVersions(PlaybookName parent) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPlaybookVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String parent =
+   *       PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   for (PlaybookVersion element : playbooksClient.listPlaybookVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The playbook to list versions for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPlaybookVersionsPagedResponse listPlaybookVersions(String parent) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder().setParent(parent).build(); + return listPlaybookVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybookVersionsRequest request =
+   *       ListPlaybookVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (PlaybookVersion element : playbooksClient.listPlaybookVersions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListPlaybookVersionsPagedResponse listPlaybookVersions( + ListPlaybookVersionsRequest request) { + return listPlaybookVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybookVersionsRequest request =
+   *       ListPlaybookVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       playbooksClient.listPlaybookVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PlaybookVersion element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPlaybookVersionsPagedCallable() { + return stub.listPlaybookVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybookVersionsRequest request =
+   *       ListPlaybookVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPlaybookVersionsResponse response =
+   *         playbooksClient.listPlaybookVersionsCallable().call(request);
+   *     for (PlaybookVersion element : response.getPlaybookVersionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPlaybookVersionsCallable() { + return stub.listPlaybookVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookVersionName name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]");
+   *   playbooksClient.deletePlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version to delete. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePlaybookVersion(PlaybookVersionName name) { + DeletePlaybookVersionRequest request = + DeletePlaybookVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deletePlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *           .toString();
+   *   playbooksClient.deletePlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version to delete. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePlaybookVersion(String name) { + DeletePlaybookVersionRequest request = + DeletePlaybookVersionRequest.newBuilder().setName(name).build(); + deletePlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   DeletePlaybookVersionRequest request =
+   *       DeletePlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   playbooksClient.deletePlaybookVersion(request);
+   * }
+   * }
+ * + * @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 void deletePlaybookVersion(DeletePlaybookVersionRequest request) { + deletePlaybookVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   DeletePlaybookVersionRequest request =
+   *       DeletePlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = playbooksClient.deletePlaybookVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePlaybookVersionCallable() { + return stub.deletePlaybookVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : playbooksClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = playbooksClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = playbooksClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = playbooksClient.getLocation(request);
+   * }
+   * }
+ * + * @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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = playbooksClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPlaybooksPagedResponse + extends AbstractPagedListResponse< + ListPlaybooksRequest, + ListPlaybooksResponse, + Playbook, + ListPlaybooksPage, + ListPlaybooksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPlaybooksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPlaybooksPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPlaybooksPagedResponse(ListPlaybooksPage page) { + super(page, ListPlaybooksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPlaybooksPage + extends AbstractPage< + ListPlaybooksRequest, ListPlaybooksResponse, Playbook, ListPlaybooksPage> { + + private ListPlaybooksPage( + PageContext context, + ListPlaybooksResponse response) { + super(context, response); + } + + private static ListPlaybooksPage createEmptyPage() { + return new ListPlaybooksPage(null, null); + } + + @Override + protected ListPlaybooksPage createPage( + PageContext context, + ListPlaybooksResponse response) { + return new ListPlaybooksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPlaybooksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPlaybooksRequest, + ListPlaybooksResponse, + Playbook, + ListPlaybooksPage, + ListPlaybooksFixedSizeCollection> { + + private ListPlaybooksFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPlaybooksFixedSizeCollection createEmptyCollection() { + return new ListPlaybooksFixedSizeCollection(null, 0); + } + + @Override + protected ListPlaybooksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPlaybooksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPlaybookVersionsPagedResponse + extends AbstractPagedListResponse< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + PlaybookVersion, + ListPlaybookVersionsPage, + ListPlaybookVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPlaybookVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPlaybookVersionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPlaybookVersionsPagedResponse(ListPlaybookVersionsPage page) { + super(page, ListPlaybookVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPlaybookVersionsPage + extends AbstractPage< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + PlaybookVersion, + ListPlaybookVersionsPage> { + + private ListPlaybookVersionsPage( + PageContext + context, + ListPlaybookVersionsResponse response) { + super(context, response); + } + + private static ListPlaybookVersionsPage createEmptyPage() { + return new ListPlaybookVersionsPage(null, null); + } + + @Override + protected ListPlaybookVersionsPage createPage( + PageContext + context, + ListPlaybookVersionsResponse response) { + return new ListPlaybookVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPlaybookVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + PlaybookVersion, + ListPlaybookVersionsPage, + ListPlaybookVersionsFixedSizeCollection> { + + private ListPlaybookVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPlaybookVersionsFixedSizeCollection createEmptyCollection() { + return new ListPlaybookVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListPlaybookVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPlaybookVersionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksSettings.java new file mode 100644 index 000000000000..03dd9629c0c7 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksSettings.java @@ -0,0 +1,426 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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; +import com.google.cloud.dialogflow.cx.v3.stub.PlaybooksStubSettings; +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.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.Struct; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PlaybooksClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createPlaybook: + * + *

{@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
+ * PlaybooksSettings.Builder playbooksSettingsBuilder = PlaybooksSettings.newBuilder();
+ * playbooksSettingsBuilder
+ *     .createPlaybookSettings()
+ *     .setRetrySettings(
+ *         playbooksSettingsBuilder
+ *             .createPlaybookSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PlaybooksSettings playbooksSettings = playbooksSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for exportPlaybook: + * + *

{@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
+ * PlaybooksSettings.Builder playbooksSettingsBuilder = PlaybooksSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * playbooksSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PlaybooksSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createPlaybook. */ + public UnaryCallSettings createPlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).createPlaybookSettings(); + } + + /** Returns the object with the settings used for calls to deletePlaybook. */ + public UnaryCallSettings deletePlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).deletePlaybookSettings(); + } + + /** Returns the object with the settings used for calls to listPlaybooks. */ + public PagedCallSettings + listPlaybooksSettings() { + return ((PlaybooksStubSettings) getStubSettings()).listPlaybooksSettings(); + } + + /** Returns the object with the settings used for calls to getPlaybook. */ + public UnaryCallSettings getPlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).getPlaybookSettings(); + } + + /** Returns the object with the settings used for calls to exportPlaybook. */ + public UnaryCallSettings exportPlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).exportPlaybookSettings(); + } + + /** Returns the object with the settings used for calls to exportPlaybook. */ + public OperationCallSettings + exportPlaybookOperationSettings() { + return ((PlaybooksStubSettings) getStubSettings()).exportPlaybookOperationSettings(); + } + + /** Returns the object with the settings used for calls to importPlaybook. */ + public UnaryCallSettings importPlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).importPlaybookSettings(); + } + + /** Returns the object with the settings used for calls to importPlaybook. */ + public OperationCallSettings + importPlaybookOperationSettings() { + return ((PlaybooksStubSettings) getStubSettings()).importPlaybookOperationSettings(); + } + + /** Returns the object with the settings used for calls to updatePlaybook. */ + public UnaryCallSettings updatePlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).updatePlaybookSettings(); + } + + /** Returns the object with the settings used for calls to createPlaybookVersion. */ + public UnaryCallSettings + createPlaybookVersionSettings() { + return ((PlaybooksStubSettings) getStubSettings()).createPlaybookVersionSettings(); + } + + /** Returns the object with the settings used for calls to getPlaybookVersion. */ + public UnaryCallSettings + getPlaybookVersionSettings() { + return ((PlaybooksStubSettings) getStubSettings()).getPlaybookVersionSettings(); + } + + /** Returns the object with the settings used for calls to restorePlaybookVersion. */ + public UnaryCallSettings + restorePlaybookVersionSettings() { + return ((PlaybooksStubSettings) getStubSettings()).restorePlaybookVersionSettings(); + } + + /** Returns the object with the settings used for calls to listPlaybookVersions. */ + public PagedCallSettings< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings() { + return ((PlaybooksStubSettings) getStubSettings()).listPlaybookVersionsSettings(); + } + + /** Returns the object with the settings used for calls to deletePlaybookVersion. */ + public UnaryCallSettings deletePlaybookVersionSettings() { + return ((PlaybooksStubSettings) getStubSettings()).deletePlaybookVersionSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((PlaybooksStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((PlaybooksStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final PlaybooksSettings create(PlaybooksStubSettings stub) throws IOException { + return new PlaybooksSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PlaybooksStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PlaybooksStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PlaybooksStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PlaybooksStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PlaybooksStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PlaybooksStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PlaybooksStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PlaybooksStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PlaybooksSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PlaybooksSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PlaybooksStubSettings.newBuilder(clientContext)); + } + + protected Builder(PlaybooksSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PlaybooksStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PlaybooksStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(PlaybooksStubSettings.newHttpJsonBuilder()); + } + + public PlaybooksStubSettings.Builder getStubSettingsBuilder() { + return ((PlaybooksStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createPlaybook. */ + public UnaryCallSettings.Builder createPlaybookSettings() { + return getStubSettingsBuilder().createPlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to deletePlaybook. */ + public UnaryCallSettings.Builder deletePlaybookSettings() { + return getStubSettingsBuilder().deletePlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to listPlaybooks. */ + public PagedCallSettings.Builder< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + listPlaybooksSettings() { + return getStubSettingsBuilder().listPlaybooksSettings(); + } + + /** Returns the builder for the settings used for calls to getPlaybook. */ + public UnaryCallSettings.Builder getPlaybookSettings() { + return getStubSettingsBuilder().getPlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to exportPlaybook. */ + public UnaryCallSettings.Builder exportPlaybookSettings() { + return getStubSettingsBuilder().exportPlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to exportPlaybook. */ + public OperationCallSettings.Builder + exportPlaybookOperationSettings() { + return getStubSettingsBuilder().exportPlaybookOperationSettings(); + } + + /** Returns the builder for the settings used for calls to importPlaybook. */ + public UnaryCallSettings.Builder importPlaybookSettings() { + return getStubSettingsBuilder().importPlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to importPlaybook. */ + public OperationCallSettings.Builder + importPlaybookOperationSettings() { + return getStubSettingsBuilder().importPlaybookOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updatePlaybook. */ + public UnaryCallSettings.Builder updatePlaybookSettings() { + return getStubSettingsBuilder().updatePlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to createPlaybookVersion. */ + public UnaryCallSettings.Builder + createPlaybookVersionSettings() { + return getStubSettingsBuilder().createPlaybookVersionSettings(); + } + + /** Returns the builder for the settings used for calls to getPlaybookVersion. */ + public UnaryCallSettings.Builder + getPlaybookVersionSettings() { + return getStubSettingsBuilder().getPlaybookVersionSettings(); + } + + /** Returns the builder for the settings used for calls to restorePlaybookVersion. */ + public UnaryCallSettings.Builder + restorePlaybookVersionSettings() { + return getStubSettingsBuilder().restorePlaybookVersionSettings(); + } + + /** Returns the builder for the settings used for calls to listPlaybookVersions. */ + public PagedCallSettings.Builder< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings() { + return getStubSettingsBuilder().listPlaybookVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to deletePlaybookVersion. */ + public UnaryCallSettings.Builder + deletePlaybookVersionSettings() { + return getStubSettingsBuilder().deletePlaybookVersionSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public PlaybooksSettings build() throws IOException { + return new PlaybooksSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java index 7d05f319520a..f7b1e0e55e5c 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java @@ -63,6 +63,7 @@ * .setQueryParams(QueryParameters.newBuilder().build()) * .setQueryInput(QueryInput.newBuilder().build()) * .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + * .setResponseView(DetectIntentResponseView.forNumber(0)) * .build(); * DetectIntentResponse response = sessionsClient.detectIntent(request); * } @@ -314,6 +315,7 @@ public SessionsStub getStub() { * .setQueryParams(QueryParameters.newBuilder().build()) * .setQueryInput(QueryInput.newBuilder().build()) * .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + * .setResponseView(DetectIntentResponseView.forNumber(0)) * .build(); * DetectIntentResponse response = sessionsClient.detectIntent(request); * } @@ -353,6 +355,7 @@ public final DetectIntentResponse detectIntent(DetectIntentRequest request) { * .setQueryParams(QueryParameters.newBuilder().build()) * .setQueryInput(QueryInput.newBuilder().build()) * .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + * .setResponseView(DetectIntentResponseView.forNumber(0)) * .build(); * ApiFuture future = * sessionsClient.detectIntentCallable().futureCall(request); @@ -390,6 +393,7 @@ public final UnaryCallable detectInte * .setQueryParams(QueryParameters.newBuilder().build()) * .setQueryInput(QueryInput.newBuilder().build()) * .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + * .setResponseView(DetectIntentResponseView.forNumber(0)) * .build(); * ServerStream stream = * sessionsClient.serverStreamingDetectIntentCallable().call(request); @@ -435,6 +439,7 @@ public final UnaryCallable detectInte * .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) * .setEnablePartialResponse(true) * .setEnableDebuggingInfo(true) + * .setResponseView(DetectIntentResponseView.forNumber(0)) * .build(); * bidiStream.send(request); * for (StreamingDetectIntentResponse response : bidiStream) { diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsClient.java new file mode 100644 index 000000000000..2bb686962c8f --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsClient.java @@ -0,0 +1,2032 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.stub.ToolsStub; +import com.google.cloud.dialogflow.cx.v3.stub.ToolsStubSettings; +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.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool]. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (ToolsClient toolsClient = ToolsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Tool tool = Tool.newBuilder().build();
+ *   Tool response = toolsClient.createTool(parent, tool);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ToolsClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateTool

Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTool(CreateToolRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTool(AgentName parent, Tool tool) + *

  • createTool(String parent, Tool tool) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createToolCallable() + *

+ *

ListTools

Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the specified agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTools(ListToolsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTools(AgentName parent) + *

  • listTools(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listToolsPagedCallable() + *

  • listToolsCallable() + *

+ *

GetTool

Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTool(GetToolRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTool(ToolName name) + *

  • getTool(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getToolCallable() + *

+ *

UpdateTool

Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateTool(UpdateToolRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateTool(Tool tool, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateToolCallable() + *

+ *

DeleteTool

Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteTool(DeleteToolRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteTool(ToolName name) + *

  • deleteTool(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteToolCallable() + *

+ *

ListToolVersions

List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listToolVersions(ListToolVersionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listToolVersions(ToolName parent) + *

  • listToolVersions(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listToolVersionsPagedCallable() + *

  • listToolVersionsCallable() + *

+ *

CreateToolVersion

Creates a version for the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createToolVersion(CreateToolVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createToolVersion(ToolName parent, ToolVersion toolVersion) + *

  • createToolVersion(String parent, ToolVersion toolVersion) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createToolVersionCallable() + *

+ *

GetToolVersion

Retrieves the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getToolVersion(GetToolVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getToolVersion(ToolVersionName name) + *

  • getToolVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getToolVersionCallable() + *

+ *

DeleteToolVersion

Deletes the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteToolVersion(DeleteToolVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteToolVersion(ToolVersionName name) + *

  • deleteToolVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteToolVersionCallable() + *

+ *

RestoreToolVersion

Retrieves the specified version of the Tool and stores it as the current tool draft, returning the tool with resources updated.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • restoreToolVersion(RestoreToolVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • restoreToolVersion(ToolVersionName name) + *

  • restoreToolVersion(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • restoreToolVersionCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ToolsSettings to create(). For + * example: + * + *

To customize credentials: + * + *

{@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
+ * ToolsSettings toolsSettings =
+ *     ToolsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ToolsClient toolsClient = ToolsClient.create(toolsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * ToolsSettings toolsSettings = ToolsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ToolsClient toolsClient = ToolsClient.create(toolsSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * ToolsSettings toolsSettings = ToolsSettings.newHttpJsonBuilder().build();
+ * ToolsClient toolsClient = ToolsClient.create(toolsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ToolsClient implements BackgroundResource { + private final ToolsSettings settings; + private final ToolsStub stub; + + /** Constructs an instance of ToolsClient with default settings. */ + public static final ToolsClient create() throws IOException { + return create(ToolsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ToolsClient, using the given settings. The channels are created based + * on the settings passed in, or defaults for any settings that are not set. + */ + public static final ToolsClient create(ToolsSettings settings) throws IOException { + return new ToolsClient(settings); + } + + /** + * Constructs an instance of ToolsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ToolsSettings). + */ + public static final ToolsClient create(ToolsStub stub) { + return new ToolsClient(stub); + } + + /** + * Constructs an instance of ToolsClient, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected ToolsClient(ToolsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ToolsStubSettings) settings.getStubSettings()).createStub(); + } + + protected ToolsClient(ToolsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ToolsSettings getSettings() { + return settings; + } + + public ToolsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Tool tool = Tool.newBuilder().build();
+   *   Tool response = toolsClient.createTool(parent, tool);
+   * }
+   * }
+ * + * @param parent Required. The agent to create a Tool for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. + * @param tool Required. The Tool to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool createTool(AgentName parent, Tool tool) { + CreateToolRequest request = + CreateToolRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTool(tool) + .build(); + return createTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Tool tool = Tool.newBuilder().build();
+   *   Tool response = toolsClient.createTool(parent, tool);
+   * }
+   * }
+ * + * @param parent Required. The agent to create a Tool for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. + * @param tool Required. The Tool to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool createTool(String parent, Tool tool) { + CreateToolRequest request = + CreateToolRequest.newBuilder().setParent(parent).setTool(tool).build(); + return createTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   CreateToolRequest request =
+   *       CreateToolRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTool(Tool.newBuilder().build())
+   *           .build();
+   *   Tool response = toolsClient.createTool(request);
+   * }
+   * }
+ * + * @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 Tool createTool(CreateToolRequest request) { + return createToolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   CreateToolRequest request =
+   *       CreateToolRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTool(Tool.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = toolsClient.createToolCallable().futureCall(request);
+   *   // Do something.
+   *   Tool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createToolCallable() { + return stub.createToolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Tool element : toolsClient.listTools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list the Tools from. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListToolsPagedResponse listTools(AgentName parent) { + ListToolsRequest request = + ListToolsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listTools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   for (Tool element : toolsClient.listTools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list the Tools from. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListToolsPagedResponse listTools(String parent) { + ListToolsRequest request = ListToolsRequest.newBuilder().setParent(parent).build(); + return listTools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolsRequest request =
+   *       ListToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Tool element : toolsClient.listTools(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListToolsPagedResponse listTools(ListToolsRequest request) { + return listToolsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolsRequest request =
+   *       ListToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = toolsClient.listToolsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Tool element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listToolsPagedCallable() { + return stub.listToolsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolsRequest request =
+   *       ListToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListToolsResponse response = toolsClient.listToolsCallable().call(request);
+   *     for (Tool element : response.getToolsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listToolsCallable() { + return stub.listToolsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]");
+   *   Tool response = toolsClient.getTool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Tool. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool getTool(ToolName name) { + GetToolRequest request = + GetToolRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString();
+   *   Tool response = toolsClient.getTool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Tool. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool getTool(String name) { + GetToolRequest request = GetToolRequest.newBuilder().setName(name).build(); + return getTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetToolRequest request =
+   *       GetToolRequest.newBuilder()
+   *           .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .build();
+   *   Tool response = toolsClient.getTool(request);
+   * }
+   * }
+ * + * @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 Tool getTool(GetToolRequest request) { + return getToolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetToolRequest request =
+   *       GetToolRequest.newBuilder()
+   *           .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .build();
+   *   ApiFuture future = toolsClient.getToolCallable().futureCall(request);
+   *   // Do something.
+   *   Tool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getToolCallable() { + return stub.getToolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   Tool tool = Tool.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Tool response = toolsClient.updateTool(tool, updateMask);
+   * }
+   * }
+ * + * @param tool Required. The Tool to be updated. + * @param updateMask The mask to control which fields get updated. If the mask is not present, all + * fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool updateTool(Tool tool, FieldMask updateMask) { + UpdateToolRequest request = + UpdateToolRequest.newBuilder().setTool(tool).setUpdateMask(updateMask).build(); + return updateTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   UpdateToolRequest request =
+   *       UpdateToolRequest.newBuilder()
+   *           .setTool(Tool.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Tool response = toolsClient.updateTool(request);
+   * }
+   * }
+ * + * @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 Tool updateTool(UpdateToolRequest request) { + return updateToolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   UpdateToolRequest request =
+   *       UpdateToolRequest.newBuilder()
+   *           .setTool(Tool.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = toolsClient.updateToolCallable().futureCall(request);
+   *   // Do something.
+   *   Tool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateToolCallable() { + return stub.updateToolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]");
+   *   toolsClient.deleteTool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Tool to be deleted. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTool(ToolName name) { + DeleteToolRequest request = + DeleteToolRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString();
+   *   toolsClient.deleteTool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Tool to be deleted. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTool(String name) { + DeleteToolRequest request = DeleteToolRequest.newBuilder().setName(name).build(); + deleteTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   DeleteToolRequest request =
+   *       DeleteToolRequest.newBuilder()
+   *           .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   toolsClient.deleteTool(request);
+   * }
+   * }
+ * + * @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 void deleteTool(DeleteToolRequest request) { + deleteToolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   DeleteToolRequest request =
+   *       DeleteToolRequest.newBuilder()
+   *           .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = toolsClient.deleteToolCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteToolCallable() { + return stub.deleteToolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]");
+   *   for (ToolVersion element : toolsClient.listToolVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent of the tool versions. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListToolVersionsPagedResponse listToolVersions(ToolName parent) { + ListToolVersionsRequest request = + ListToolVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listToolVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString();
+   *   for (ToolVersion element : toolsClient.listToolVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent of the tool versions. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListToolVersionsPagedResponse listToolVersions(String parent) { + ListToolVersionsRequest request = + ListToolVersionsRequest.newBuilder().setParent(parent).build(); + return listToolVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolVersionsRequest request =
+   *       ListToolVersionsRequest.newBuilder()
+   *           .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ToolVersion element : toolsClient.listToolVersions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListToolVersionsPagedResponse listToolVersions(ListToolVersionsRequest request) { + return listToolVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolVersionsRequest request =
+   *       ListToolVersionsRequest.newBuilder()
+   *           .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       toolsClient.listToolVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ToolVersion element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listToolVersionsPagedCallable() { + return stub.listToolVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolVersionsRequest request =
+   *       ListToolVersionsRequest.newBuilder()
+   *           .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListToolVersionsResponse response = toolsClient.listToolVersionsCallable().call(request);
+   *     for (ToolVersion element : response.getToolVersionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listToolVersionsCallable() { + return stub.listToolVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]");
+   *   ToolVersion toolVersion = ToolVersion.newBuilder().build();
+   *   ToolVersion response = toolsClient.createToolVersion(parent, toolVersion);
+   * }
+   * }
+ * + * @param parent Required. The tool to create a version for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. + * @param toolVersion Required. The tool version to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ToolVersion createToolVersion(ToolName parent, ToolVersion toolVersion) { + CreateToolVersionRequest request = + CreateToolVersionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setToolVersion(toolVersion) + .build(); + return createToolVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString();
+   *   ToolVersion toolVersion = ToolVersion.newBuilder().build();
+   *   ToolVersion response = toolsClient.createToolVersion(parent, toolVersion);
+   * }
+   * }
+ * + * @param parent Required. The tool to create a version for. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. + * @param toolVersion Required. The tool version to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ToolVersion createToolVersion(String parent, ToolVersion toolVersion) { + CreateToolVersionRequest request = + CreateToolVersionRequest.newBuilder().setParent(parent).setToolVersion(toolVersion).build(); + return createToolVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   CreateToolVersionRequest request =
+   *       CreateToolVersionRequest.newBuilder()
+   *           .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setToolVersion(ToolVersion.newBuilder().build())
+   *           .build();
+   *   ToolVersion response = toolsClient.createToolVersion(request);
+   * }
+   * }
+ * + * @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 ToolVersion createToolVersion(CreateToolVersionRequest request) { + return createToolVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   CreateToolVersionRequest request =
+   *       CreateToolVersionRequest.newBuilder()
+   *           .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setToolVersion(ToolVersion.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = toolsClient.createToolVersionCallable().futureCall(request);
+   *   // Do something.
+   *   ToolVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createToolVersionCallable() { + return stub.createToolVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolVersionName name =
+   *       ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]");
+   *   ToolVersion response = toolsClient.getToolVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the tool version. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ToolVersion getToolVersion(ToolVersionName name) { + GetToolVersionRequest request = + GetToolVersionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getToolVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String name =
+   *       ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *           .toString();
+   *   ToolVersion response = toolsClient.getToolVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the tool version. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ToolVersion getToolVersion(String name) { + GetToolVersionRequest request = GetToolVersionRequest.newBuilder().setName(name).build(); + return getToolVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetToolVersionRequest request =
+   *       GetToolVersionRequest.newBuilder()
+   *           .setName(
+   *               ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ToolVersion response = toolsClient.getToolVersion(request);
+   * }
+   * }
+ * + * @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 ToolVersion getToolVersion(GetToolVersionRequest request) { + return getToolVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetToolVersionRequest request =
+   *       GetToolVersionRequest.newBuilder()
+   *           .setName(
+   *               ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = toolsClient.getToolVersionCallable().futureCall(request);
+   *   // Do something.
+   *   ToolVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getToolVersionCallable() { + return stub.getToolVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolVersionName name =
+   *       ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]");
+   *   toolsClient.deleteToolVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the tool version to delete. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteToolVersion(ToolVersionName name) { + DeleteToolVersionRequest request = + DeleteToolVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteToolVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String name =
+   *       ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *           .toString();
+   *   toolsClient.deleteToolVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the tool version to delete. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteToolVersion(String name) { + DeleteToolVersionRequest request = DeleteToolVersionRequest.newBuilder().setName(name).build(); + deleteToolVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   DeleteToolVersionRequest request =
+   *       DeleteToolVersionRequest.newBuilder()
+   *           .setName(
+   *               ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   toolsClient.deleteToolVersion(request);
+   * }
+   * }
+ * + * @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 void deleteToolVersion(DeleteToolVersionRequest request) { + deleteToolVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   DeleteToolVersionRequest request =
+   *       DeleteToolVersionRequest.newBuilder()
+   *           .setName(
+   *               ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = toolsClient.deleteToolVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteToolVersionCallable() { + return stub.deleteToolVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Tool and stores it as the current tool draft, returning + * the tool with resources updated. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolVersionName name =
+   *       ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]");
+   *   RestoreToolVersionResponse response = toolsClient.restoreToolVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the tool version. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RestoreToolVersionResponse restoreToolVersion(ToolVersionName name) { + RestoreToolVersionRequest request = + RestoreToolVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return restoreToolVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Tool and stores it as the current tool draft, returning + * the tool with resources updated. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String name =
+   *       ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *           .toString();
+   *   RestoreToolVersionResponse response = toolsClient.restoreToolVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the tool version. Format: + * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RestoreToolVersionResponse restoreToolVersion(String name) { + RestoreToolVersionRequest request = + RestoreToolVersionRequest.newBuilder().setName(name).build(); + return restoreToolVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Tool and stores it as the current tool draft, returning + * the tool with resources updated. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   RestoreToolVersionRequest request =
+   *       RestoreToolVersionRequest.newBuilder()
+   *           .setName(
+   *               ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   RestoreToolVersionResponse response = toolsClient.restoreToolVersion(request);
+   * }
+   * }
+ * + * @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 RestoreToolVersionResponse restoreToolVersion(RestoreToolVersionRequest request) { + return restoreToolVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Tool and stores it as the current tool draft, returning + * the tool with resources updated. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   RestoreToolVersionRequest request =
+   *       RestoreToolVersionRequest.newBuilder()
+   *           .setName(
+   *               ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       toolsClient.restoreToolVersionCallable().futureCall(request);
+   *   // Do something.
+   *   RestoreToolVersionResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + restoreToolVersionCallable() { + return stub.restoreToolVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : toolsClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = toolsClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = toolsClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = toolsClient.getLocation(request);
+   * }
+   * }
+ * + * @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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = toolsClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListToolsPagedResponse + extends AbstractPagedListResponse< + ListToolsRequest, ListToolsResponse, Tool, ListToolsPage, ListToolsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListToolsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListToolsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListToolsPagedResponse(ListToolsPage page) { + super(page, ListToolsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListToolsPage + extends AbstractPage { + + private ListToolsPage( + PageContext context, + ListToolsResponse response) { + super(context, response); + } + + private static ListToolsPage createEmptyPage() { + return new ListToolsPage(null, null); + } + + @Override + protected ListToolsPage createPage( + PageContext context, + ListToolsResponse response) { + return new ListToolsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListToolsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListToolsRequest, ListToolsResponse, Tool, ListToolsPage, ListToolsFixedSizeCollection> { + + private ListToolsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListToolsFixedSizeCollection createEmptyCollection() { + return new ListToolsFixedSizeCollection(null, 0); + } + + @Override + protected ListToolsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListToolsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListToolVersionsPagedResponse + extends AbstractPagedListResponse< + ListToolVersionsRequest, + ListToolVersionsResponse, + ToolVersion, + ListToolVersionsPage, + ListToolVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListToolVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListToolVersionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListToolVersionsPagedResponse(ListToolVersionsPage page) { + super(page, ListToolVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListToolVersionsPage + extends AbstractPage< + ListToolVersionsRequest, ListToolVersionsResponse, ToolVersion, ListToolVersionsPage> { + + private ListToolVersionsPage( + PageContext context, + ListToolVersionsResponse response) { + super(context, response); + } + + private static ListToolVersionsPage createEmptyPage() { + return new ListToolVersionsPage(null, null); + } + + @Override + protected ListToolVersionsPage createPage( + PageContext context, + ListToolVersionsResponse response) { + return new ListToolVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListToolVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListToolVersionsRequest, + ListToolVersionsResponse, + ToolVersion, + ListToolVersionsPage, + ListToolVersionsFixedSizeCollection> { + + private ListToolVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListToolVersionsFixedSizeCollection createEmptyCollection() { + return new ListToolVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListToolVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListToolVersionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsSettings.java new file mode 100644 index 000000000000..f69e256a030d --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsSettings.java @@ -0,0 +1,345 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3.stub.ToolsStubSettings; +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.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ToolsClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createTool: + * + *

{@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
+ * ToolsSettings.Builder toolsSettingsBuilder = ToolsSettings.newBuilder();
+ * toolsSettingsBuilder
+ *     .createToolSettings()
+ *     .setRetrySettings(
+ *         toolsSettingsBuilder
+ *             .createToolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * ToolsSettings toolsSettings = toolsSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class ToolsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTool. */ + public UnaryCallSettings createToolSettings() { + return ((ToolsStubSettings) getStubSettings()).createToolSettings(); + } + + /** Returns the object with the settings used for calls to listTools. */ + public PagedCallSettings + listToolsSettings() { + return ((ToolsStubSettings) getStubSettings()).listToolsSettings(); + } + + /** Returns the object with the settings used for calls to getTool. */ + public UnaryCallSettings getToolSettings() { + return ((ToolsStubSettings) getStubSettings()).getToolSettings(); + } + + /** Returns the object with the settings used for calls to updateTool. */ + public UnaryCallSettings updateToolSettings() { + return ((ToolsStubSettings) getStubSettings()).updateToolSettings(); + } + + /** Returns the object with the settings used for calls to deleteTool. */ + public UnaryCallSettings deleteToolSettings() { + return ((ToolsStubSettings) getStubSettings()).deleteToolSettings(); + } + + /** Returns the object with the settings used for calls to listToolVersions. */ + public PagedCallSettings< + ListToolVersionsRequest, ListToolVersionsResponse, ListToolVersionsPagedResponse> + listToolVersionsSettings() { + return ((ToolsStubSettings) getStubSettings()).listToolVersionsSettings(); + } + + /** Returns the object with the settings used for calls to createToolVersion. */ + public UnaryCallSettings createToolVersionSettings() { + return ((ToolsStubSettings) getStubSettings()).createToolVersionSettings(); + } + + /** Returns the object with the settings used for calls to getToolVersion. */ + public UnaryCallSettings getToolVersionSettings() { + return ((ToolsStubSettings) getStubSettings()).getToolVersionSettings(); + } + + /** Returns the object with the settings used for calls to deleteToolVersion. */ + public UnaryCallSettings deleteToolVersionSettings() { + return ((ToolsStubSettings) getStubSettings()).deleteToolVersionSettings(); + } + + /** Returns the object with the settings used for calls to restoreToolVersion. */ + public UnaryCallSettings + restoreToolVersionSettings() { + return ((ToolsStubSettings) getStubSettings()).restoreToolVersionSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ToolsStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ToolsStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final ToolsSettings create(ToolsStubSettings stub) throws IOException { + return new ToolsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ToolsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ToolsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ToolsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ToolsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ToolsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ToolsStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ToolsStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ToolsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ToolsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ToolsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ToolsStubSettings.newBuilder(clientContext)); + } + + protected Builder(ToolsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ToolsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ToolsStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(ToolsStubSettings.newHttpJsonBuilder()); + } + + public ToolsStubSettings.Builder getStubSettingsBuilder() { + return ((ToolsStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createTool. */ + public UnaryCallSettings.Builder createToolSettings() { + return getStubSettingsBuilder().createToolSettings(); + } + + /** Returns the builder for the settings used for calls to listTools. */ + public PagedCallSettings.Builder + listToolsSettings() { + return getStubSettingsBuilder().listToolsSettings(); + } + + /** Returns the builder for the settings used for calls to getTool. */ + public UnaryCallSettings.Builder getToolSettings() { + return getStubSettingsBuilder().getToolSettings(); + } + + /** Returns the builder for the settings used for calls to updateTool. */ + public UnaryCallSettings.Builder updateToolSettings() { + return getStubSettingsBuilder().updateToolSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTool. */ + public UnaryCallSettings.Builder deleteToolSettings() { + return getStubSettingsBuilder().deleteToolSettings(); + } + + /** Returns the builder for the settings used for calls to listToolVersions. */ + public PagedCallSettings.Builder< + ListToolVersionsRequest, ListToolVersionsResponse, ListToolVersionsPagedResponse> + listToolVersionsSettings() { + return getStubSettingsBuilder().listToolVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to createToolVersion. */ + public UnaryCallSettings.Builder + createToolVersionSettings() { + return getStubSettingsBuilder().createToolVersionSettings(); + } + + /** Returns the builder for the settings used for calls to getToolVersion. */ + public UnaryCallSettings.Builder getToolVersionSettings() { + return getStubSettingsBuilder().getToolVersionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteToolVersion. */ + public UnaryCallSettings.Builder deleteToolVersionSettings() { + return getStubSettingsBuilder().deleteToolVersionSettings(); + } + + /** Returns the builder for the settings used for calls to restoreToolVersion. */ + public UnaryCallSettings.Builder + restoreToolVersionSettings() { + return getStubSettingsBuilder().restoreToolVersionSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public ToolsSettings build() throws IOException { + return new ToolsSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json index e9bdb3e3a0ab..5c7af506dabd 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json @@ -173,6 +173,36 @@ } } }, + "Examples": { + "clients": { + "grpc": { + "libraryClient": "ExamplesClient", + "rpcs": { + "CreateExample": { + "methods": ["createExample", "createExample", "createExample", "createExampleCallable"] + }, + "DeleteExample": { + "methods": ["deleteExample", "deleteExample", "deleteExample", "deleteExampleCallable"] + }, + "GetExample": { + "methods": ["getExample", "getExample", "getExample", "getExampleCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListExamples": { + "methods": ["listExamples", "listExamples", "listExamples", "listExamplesPagedCallable", "listExamplesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "UpdateExample": { + "methods": ["updateExample", "updateExample", "updateExampleCallable"] + } + } + } + } + }, "Experiments": { "clients": { "grpc": { @@ -350,6 +380,57 @@ } } }, + "Playbooks": { + "clients": { + "grpc": { + "libraryClient": "PlaybooksClient", + "rpcs": { + "CreatePlaybook": { + "methods": ["createPlaybook", "createPlaybook", "createPlaybook", "createPlaybookCallable"] + }, + "CreatePlaybookVersion": { + "methods": ["createPlaybookVersion", "createPlaybookVersion", "createPlaybookVersion", "createPlaybookVersionCallable"] + }, + "DeletePlaybook": { + "methods": ["deletePlaybook", "deletePlaybook", "deletePlaybook", "deletePlaybookCallable"] + }, + "DeletePlaybookVersion": { + "methods": ["deletePlaybookVersion", "deletePlaybookVersion", "deletePlaybookVersion", "deletePlaybookVersionCallable"] + }, + "ExportPlaybook": { + "methods": ["exportPlaybookAsync", "exportPlaybookOperationCallable", "exportPlaybookCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetPlaybook": { + "methods": ["getPlaybook", "getPlaybook", "getPlaybook", "getPlaybookCallable"] + }, + "GetPlaybookVersion": { + "methods": ["getPlaybookVersion", "getPlaybookVersion", "getPlaybookVersion", "getPlaybookVersionCallable"] + }, + "ImportPlaybook": { + "methods": ["importPlaybookAsync", "importPlaybookOperationCallable", "importPlaybookCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListPlaybookVersions": { + "methods": ["listPlaybookVersions", "listPlaybookVersions", "listPlaybookVersions", "listPlaybookVersionsPagedCallable", "listPlaybookVersionsCallable"] + }, + "ListPlaybooks": { + "methods": ["listPlaybooks", "listPlaybooks", "listPlaybooks", "listPlaybooksPagedCallable", "listPlaybooksCallable"] + }, + "RestorePlaybookVersion": { + "methods": ["restorePlaybookVersion", "restorePlaybookVersion", "restorePlaybookVersion", "restorePlaybookVersionCallable"] + }, + "UpdatePlaybook": { + "methods": ["updatePlaybook", "updatePlaybook", "updatePlaybookCallable"] + } + } + } + } + }, "SecuritySettingsService": { "clients": { "grpc": { @@ -494,6 +575,51 @@ } } }, + "Tools": { + "clients": { + "grpc": { + "libraryClient": "ToolsClient", + "rpcs": { + "CreateTool": { + "methods": ["createTool", "createTool", "createTool", "createToolCallable"] + }, + "CreateToolVersion": { + "methods": ["createToolVersion", "createToolVersion", "createToolVersion", "createToolVersionCallable"] + }, + "DeleteTool": { + "methods": ["deleteTool", "deleteTool", "deleteTool", "deleteToolCallable"] + }, + "DeleteToolVersion": { + "methods": ["deleteToolVersion", "deleteToolVersion", "deleteToolVersion", "deleteToolVersionCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetTool": { + "methods": ["getTool", "getTool", "getTool", "getToolCallable"] + }, + "GetToolVersion": { + "methods": ["getToolVersion", "getToolVersion", "getToolVersion", "getToolVersionCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListToolVersions": { + "methods": ["listToolVersions", "listToolVersions", "listToolVersions", "listToolVersionsPagedCallable", "listToolVersionsCallable"] + }, + "ListTools": { + "methods": ["listTools", "listTools", "listTools", "listToolsPagedCallable", "listToolsCallable"] + }, + "RestoreToolVersion": { + "methods": ["restoreToolVersion", "restoreToolVersion", "restoreToolVersion", "restoreToolVersionCallable"] + }, + "UpdateTool": { + "methods": ["updateTool", "updateTool", "updateToolCallable"] + } + } + } + } + }, "TransitionRouteGroups": { "clients": { "grpc": { diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java index 28805998f372..8c476140fb1b 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java @@ -116,6 +116,25 @@ * } * }

* + *

======================= ExamplesClient ======================= + * + *

Service Description: Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example]. + * + *

Sample for ExamplesClient: + * + *

{@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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+ *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+ *   Example example = Example.newBuilder().build();
+ *   Example response = examplesClient.createExample(parent, example);
+ * }
+ * }
+ * *

======================= ExperimentsClient ======================= * *

Service Description: Service for managing @@ -210,6 +229,25 @@ * } * } * + *

======================= PlaybooksClient ======================= + * + *

Service Description: Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook]. + * + *

Sample for PlaybooksClient: + * + *

{@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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Playbook playbook = Playbook.newBuilder().build();
+ *   Playbook response = playbooksClient.createPlaybook(parent, playbook);
+ * }
+ * }
+ * *

======================= SecuritySettingsServiceClient ======================= * *

Service Description: Service for managing security settings for Dialogflow. @@ -255,6 +293,7 @@ * .setQueryParams(QueryParameters.newBuilder().build()) * .setQueryInput(QueryInput.newBuilder().build()) * .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + * .setResponseView(DetectIntentResponseView.forNumber(0)) * .build(); * DetectIntentResponse response = sessionsClient.detectIntent(request); * } @@ -300,6 +339,25 @@ * } * } * + *

======================= ToolsClient ======================= + * + *

Service Description: Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool]. + * + *

Sample for ToolsClient: + * + *

{@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 (ToolsClient toolsClient = ToolsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Tool tool = Tool.newBuilder().build();
+ *   Tool response = toolsClient.createTool(parent, tool);
+ * }
+ * }
+ * *

======================= TransitionRouteGroupsClient ======================= * *

Service Description: Service for managing diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExamplesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExamplesStub.java new file mode 100644 index 000000000000..df6e14637a70 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExamplesStub.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.GetExampleRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest; +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.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Examples service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ExamplesStub implements BackgroundResource { + + public UnaryCallable createExampleCallable() { + throw new UnsupportedOperationException("Not implemented: createExampleCallable()"); + } + + public UnaryCallable deleteExampleCallable() { + throw new UnsupportedOperationException("Not implemented: deleteExampleCallable()"); + } + + public UnaryCallable listExamplesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listExamplesPagedCallable()"); + } + + public UnaryCallable listExamplesCallable() { + throw new UnsupportedOperationException("Not implemented: listExamplesCallable()"); + } + + public UnaryCallable getExampleCallable() { + throw new UnsupportedOperationException("Not implemented: getExampleCallable()"); + } + + public UnaryCallable updateExampleCallable() { + throw new UnsupportedOperationException("Not implemented: updateExampleCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExamplesStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExamplesStubSettings.java new file mode 100644 index 000000000000..92c0c65dbb12 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExamplesStubSettings.java @@ -0,0 +1,612 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.GetExampleRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest; +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.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ExamplesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createExample: + * + *

{@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
+ * ExamplesStubSettings.Builder examplesSettingsBuilder = ExamplesStubSettings.newBuilder();
+ * examplesSettingsBuilder
+ *     .createExampleSettings()
+ *     .setRetrySettings(
+ *         examplesSettingsBuilder
+ *             .createExampleSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * ExamplesStubSettings examplesSettings = examplesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class ExamplesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final UnaryCallSettings createExampleSettings; + private final UnaryCallSettings deleteExampleSettings; + private final PagedCallSettings< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings; + private final UnaryCallSettings getExampleSettings; + private final UnaryCallSettings updateExampleSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_EXAMPLES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListExamplesRequest injectToken(ListExamplesRequest payload, String token) { + return ListExamplesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListExamplesRequest injectPageSize(ListExamplesRequest payload, int pageSize) { + return ListExamplesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListExamplesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListExamplesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListExamplesResponse payload) { + return payload.getExamplesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + LIST_EXAMPLES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListExamplesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_EXAMPLES_PAGE_STR_DESC, request, context); + return ListExamplesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createExample. */ + public UnaryCallSettings createExampleSettings() { + return createExampleSettings; + } + + /** Returns the object with the settings used for calls to deleteExample. */ + public UnaryCallSettings deleteExampleSettings() { + return deleteExampleSettings; + } + + /** Returns the object with the settings used for calls to listExamples. */ + public PagedCallSettings + listExamplesSettings() { + return listExamplesSettings; + } + + /** Returns the object with the settings used for calls to getExample. */ + public UnaryCallSettings getExampleSettings() { + return getExampleSettings; + } + + /** Returns the object with the settings used for calls to updateExample. */ + public UnaryCallSettings updateExampleSettings() { + return updateExampleSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public ExamplesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcExamplesStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonExamplesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "dialogflow"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dialogflow.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(ExamplesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(ExamplesStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ExamplesStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ExamplesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createExampleSettings = settingsBuilder.createExampleSettings().build(); + deleteExampleSettings = settingsBuilder.deleteExampleSettings().build(); + listExamplesSettings = settingsBuilder.listExamplesSettings().build(); + getExampleSettings = settingsBuilder.getExampleSettings().build(); + updateExampleSettings = settingsBuilder.updateExampleSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for ExamplesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createExampleSettings; + private final UnaryCallSettings.Builder deleteExampleSettings; + private final PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings; + private final UnaryCallSettings.Builder getExampleSettings; + private final UnaryCallSettings.Builder updateExampleSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listExamplesSettings = PagedCallSettings.newBuilder(LIST_EXAMPLES_PAGE_STR_FACT); + getExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createExampleSettings, + deleteExampleSettings, + listExamplesSettings, + getExampleSettings, + updateExampleSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(ExamplesStubSettings settings) { + super(settings); + + createExampleSettings = settings.createExampleSettings.toBuilder(); + deleteExampleSettings = settings.deleteExampleSettings.toBuilder(); + listExamplesSettings = settings.listExamplesSettings.toBuilder(); + getExampleSettings = settings.getExampleSettings.toBuilder(); + updateExampleSettings = settings.updateExampleSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createExampleSettings, + deleteExampleSettings, + listExamplesSettings, + getExampleSettings, + updateExampleSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createExampleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteExampleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listExamplesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getExampleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateExampleSettings() + .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")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createExample. */ + public UnaryCallSettings.Builder createExampleSettings() { + return createExampleSettings; + } + + /** Returns the builder for the settings used for calls to deleteExample. */ + public UnaryCallSettings.Builder deleteExampleSettings() { + return deleteExampleSettings; + } + + /** Returns the builder for the settings used for calls to listExamples. */ + public PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings() { + return listExamplesSettings; + } + + /** Returns the builder for the settings used for calls to getExample. */ + public UnaryCallSettings.Builder getExampleSettings() { + return getExampleSettings; + } + + /** Returns the builder for the settings used for calls to updateExample. */ + public UnaryCallSettings.Builder updateExampleSettings() { + return updateExampleSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public ExamplesStubSettings build() throws IOException { + return new ExamplesStubSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExamplesCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExamplesCallableFactory.java new file mode 100644 index 000000000000..ba37ec94a81a --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExamplesCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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.v3.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Examples service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcExamplesCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExamplesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExamplesStub.java new file mode 100644 index 000000000000..774d9050cde9 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExamplesStub.java @@ -0,0 +1,367 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.GetExampleRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest; +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.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Examples service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcExamplesStub extends ExamplesStub { + private static final MethodDescriptor + createExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/CreateExample") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Example.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor deleteExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/DeleteExample") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listExamplesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/ListExamples") + .setRequestMarshaller(ProtoUtils.marshaller(ListExamplesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListExamplesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/GetExample") + .setRequestMarshaller(ProtoUtils.marshaller(GetExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Example.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/UpdateExample") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Example.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable createExampleCallable; + private final UnaryCallable deleteExampleCallable; + private final UnaryCallable listExamplesCallable; + private final UnaryCallable + listExamplesPagedCallable; + private final UnaryCallable getExampleCallable; + private final UnaryCallable updateExampleCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcExamplesStub create(ExamplesStubSettings settings) throws IOException { + return new GrpcExamplesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcExamplesStub create(ClientContext clientContext) throws IOException { + return new GrpcExamplesStub(ExamplesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcExamplesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcExamplesStub( + ExamplesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcExamplesStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcExamplesStub(ExamplesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcExamplesCallableFactory()); + } + + /** + * Constructs an instance of GrpcExamplesStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcExamplesStub( + ExamplesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createExampleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteExampleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listExamplesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listExamplesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getExampleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateExampleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("example.name", String.valueOf(request.getExample().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createExampleCallable = + callableFactory.createUnaryCallable( + createExampleTransportSettings, settings.createExampleSettings(), clientContext); + this.deleteExampleCallable = + callableFactory.createUnaryCallable( + deleteExampleTransportSettings, settings.deleteExampleSettings(), clientContext); + this.listExamplesCallable = + callableFactory.createUnaryCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.listExamplesPagedCallable = + callableFactory.createPagedCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.getExampleCallable = + callableFactory.createUnaryCallable( + getExampleTransportSettings, settings.getExampleSettings(), clientContext); + this.updateExampleCallable = + callableFactory.createUnaryCallable( + updateExampleTransportSettings, settings.updateExampleSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createExampleCallable() { + return createExampleCallable; + } + + @Override + public UnaryCallable deleteExampleCallable() { + return deleteExampleCallable; + } + + @Override + public UnaryCallable listExamplesCallable() { + return listExamplesCallable; + } + + @Override + public UnaryCallable listExamplesPagedCallable() { + return listExamplesPagedCallable; + } + + @Override + public UnaryCallable getExampleCallable() { + return getExampleCallable; + } + + @Override + public UnaryCallable updateExampleCallable() { + return updateExampleCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPlaybooksCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPlaybooksCallableFactory.java new file mode 100644 index 000000000000..2e80ec41245d --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPlaybooksCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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.v3.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Playbooks service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPlaybooksCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPlaybooksStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPlaybooksStub.java new file mode 100644 index 000000000000..9ff5ca0a531b --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPlaybooksStub.java @@ -0,0 +1,666 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +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.v3.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; +import com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest; +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.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import com.google.protobuf.Struct; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Playbooks service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPlaybooksStub extends PlaybooksStub { + private static final MethodDescriptor + createPlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/CreatePlaybook") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Playbook.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/DeletePlaybook") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listPlaybooksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/ListPlaybooks") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPlaybooksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPlaybooksResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getPlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/GetPlaybook") + .setRequestMarshaller(ProtoUtils.marshaller(GetPlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Playbook.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + exportPlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/ExportPlaybook") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportPlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + importPlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/ImportPlaybook") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportPlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updatePlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/UpdatePlaybook") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdatePlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Playbook.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createPlaybookVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/CreatePlaybookVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePlaybookVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PlaybookVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getPlaybookVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/GetPlaybookVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPlaybookVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PlaybookVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + RestorePlaybookVersionRequest, RestorePlaybookVersionResponse> + restorePlaybookVersionMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/RestorePlaybookVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(RestorePlaybookVersionRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RestorePlaybookVersionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listPlaybookVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/ListPlaybookVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPlaybookVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPlaybookVersionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePlaybookVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/DeletePlaybookVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePlaybookVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable createPlaybookCallable; + private final UnaryCallable deletePlaybookCallable; + private final UnaryCallable listPlaybooksCallable; + private final UnaryCallable + listPlaybooksPagedCallable; + private final UnaryCallable getPlaybookCallable; + private final UnaryCallable exportPlaybookCallable; + private final OperationCallable + exportPlaybookOperationCallable; + private final UnaryCallable importPlaybookCallable; + private final OperationCallable + importPlaybookOperationCallable; + private final UnaryCallable updatePlaybookCallable; + private final UnaryCallable + createPlaybookVersionCallable; + private final UnaryCallable + getPlaybookVersionCallable; + private final UnaryCallable + restorePlaybookVersionCallable; + private final UnaryCallable + listPlaybookVersionsCallable; + private final UnaryCallable + listPlaybookVersionsPagedCallable; + private final UnaryCallable deletePlaybookVersionCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPlaybooksStub create(PlaybooksStubSettings settings) throws IOException { + return new GrpcPlaybooksStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPlaybooksStub create(ClientContext clientContext) throws IOException { + return new GrpcPlaybooksStub(PlaybooksStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPlaybooksStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPlaybooksStub( + PlaybooksStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPlaybooksStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPlaybooksStub(PlaybooksStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPlaybooksCallableFactory()); + } + + /** + * Constructs an instance of GrpcPlaybooksStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPlaybooksStub( + PlaybooksStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createPlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listPlaybooksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPlaybooksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getPlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings exportPlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportPlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings importPlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importPlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updatePlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("playbook.name", String.valueOf(request.getPlaybook().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createPlaybookVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPlaybookVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getPlaybookVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPlaybookVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + restorePlaybookVersionTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(restorePlaybookVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listPlaybookVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPlaybookVersionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePlaybookVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePlaybookVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createPlaybookCallable = + callableFactory.createUnaryCallable( + createPlaybookTransportSettings, settings.createPlaybookSettings(), clientContext); + this.deletePlaybookCallable = + callableFactory.createUnaryCallable( + deletePlaybookTransportSettings, settings.deletePlaybookSettings(), clientContext); + this.listPlaybooksCallable = + callableFactory.createUnaryCallable( + listPlaybooksTransportSettings, settings.listPlaybooksSettings(), clientContext); + this.listPlaybooksPagedCallable = + callableFactory.createPagedCallable( + listPlaybooksTransportSettings, settings.listPlaybooksSettings(), clientContext); + this.getPlaybookCallable = + callableFactory.createUnaryCallable( + getPlaybookTransportSettings, settings.getPlaybookSettings(), clientContext); + this.exportPlaybookCallable = + callableFactory.createUnaryCallable( + exportPlaybookTransportSettings, settings.exportPlaybookSettings(), clientContext); + this.exportPlaybookOperationCallable = + callableFactory.createOperationCallable( + exportPlaybookTransportSettings, + settings.exportPlaybookOperationSettings(), + clientContext, + operationsStub); + this.importPlaybookCallable = + callableFactory.createUnaryCallable( + importPlaybookTransportSettings, settings.importPlaybookSettings(), clientContext); + this.importPlaybookOperationCallable = + callableFactory.createOperationCallable( + importPlaybookTransportSettings, + settings.importPlaybookOperationSettings(), + clientContext, + operationsStub); + this.updatePlaybookCallable = + callableFactory.createUnaryCallable( + updatePlaybookTransportSettings, settings.updatePlaybookSettings(), clientContext); + this.createPlaybookVersionCallable = + callableFactory.createUnaryCallable( + createPlaybookVersionTransportSettings, + settings.createPlaybookVersionSettings(), + clientContext); + this.getPlaybookVersionCallable = + callableFactory.createUnaryCallable( + getPlaybookVersionTransportSettings, + settings.getPlaybookVersionSettings(), + clientContext); + this.restorePlaybookVersionCallable = + callableFactory.createUnaryCallable( + restorePlaybookVersionTransportSettings, + settings.restorePlaybookVersionSettings(), + clientContext); + this.listPlaybookVersionsCallable = + callableFactory.createUnaryCallable( + listPlaybookVersionsTransportSettings, + settings.listPlaybookVersionsSettings(), + clientContext); + this.listPlaybookVersionsPagedCallable = + callableFactory.createPagedCallable( + listPlaybookVersionsTransportSettings, + settings.listPlaybookVersionsSettings(), + clientContext); + this.deletePlaybookVersionCallable = + callableFactory.createUnaryCallable( + deletePlaybookVersionTransportSettings, + settings.deletePlaybookVersionSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createPlaybookCallable() { + return createPlaybookCallable; + } + + @Override + public UnaryCallable deletePlaybookCallable() { + return deletePlaybookCallable; + } + + @Override + public UnaryCallable listPlaybooksCallable() { + return listPlaybooksCallable; + } + + @Override + public UnaryCallable + listPlaybooksPagedCallable() { + return listPlaybooksPagedCallable; + } + + @Override + public UnaryCallable getPlaybookCallable() { + return getPlaybookCallable; + } + + @Override + public UnaryCallable exportPlaybookCallable() { + return exportPlaybookCallable; + } + + @Override + public OperationCallable + exportPlaybookOperationCallable() { + return exportPlaybookOperationCallable; + } + + @Override + public UnaryCallable importPlaybookCallable() { + return importPlaybookCallable; + } + + @Override + public OperationCallable + importPlaybookOperationCallable() { + return importPlaybookOperationCallable; + } + + @Override + public UnaryCallable updatePlaybookCallable() { + return updatePlaybookCallable; + } + + @Override + public UnaryCallable + createPlaybookVersionCallable() { + return createPlaybookVersionCallable; + } + + @Override + public UnaryCallable getPlaybookVersionCallable() { + return getPlaybookVersionCallable; + } + + @Override + public UnaryCallable + restorePlaybookVersionCallable() { + return restorePlaybookVersionCallable; + } + + @Override + public UnaryCallable + listPlaybookVersionsCallable() { + return listPlaybookVersionsCallable; + } + + @Override + public UnaryCallable + listPlaybookVersionsPagedCallable() { + return listPlaybookVersionsPagedCallable; + } + + @Override + public UnaryCallable deletePlaybookVersionCallable() { + return deletePlaybookVersionCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcToolsCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcToolsCallableFactory.java new file mode 100644 index 000000000000..7bfa113fd44b --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcToolsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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.v3.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Tools service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcToolsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcToolsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcToolsStub.java new file mode 100644 index 000000000000..ca931f15216c --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcToolsStub.java @@ -0,0 +1,545 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.UpdateToolRequest; +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.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Tools service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcToolsStub extends ToolsStub { + private static final MethodDescriptor createToolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/CreateTool") + .setRequestMarshaller(ProtoUtils.marshaller(CreateToolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tool.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listToolsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/ListTools") + .setRequestMarshaller(ProtoUtils.marshaller(ListToolsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListToolsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getToolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/GetTool") + .setRequestMarshaller(ProtoUtils.marshaller(GetToolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tool.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor updateToolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/UpdateTool") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateToolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tool.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor deleteToolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/DeleteTool") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteToolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listToolVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/ListToolVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListToolVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListToolVersionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createToolVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/CreateToolVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateToolVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ToolVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getToolVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/GetToolVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(GetToolVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ToolVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteToolVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/DeleteToolVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteToolVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + restoreToolVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/RestoreToolVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(RestoreToolVersionRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RestoreToolVersionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable createToolCallable; + private final UnaryCallable listToolsCallable; + private final UnaryCallable listToolsPagedCallable; + private final UnaryCallable getToolCallable; + private final UnaryCallable updateToolCallable; + private final UnaryCallable deleteToolCallable; + private final UnaryCallable + listToolVersionsCallable; + private final UnaryCallable + listToolVersionsPagedCallable; + private final UnaryCallable createToolVersionCallable; + private final UnaryCallable getToolVersionCallable; + private final UnaryCallable deleteToolVersionCallable; + private final UnaryCallable + restoreToolVersionCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcToolsStub create(ToolsStubSettings settings) throws IOException { + return new GrpcToolsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcToolsStub create(ClientContext clientContext) throws IOException { + return new GrpcToolsStub(ToolsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcToolsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcToolsStub( + ToolsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcToolsStub, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcToolsStub(ToolsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcToolsCallableFactory()); + } + + /** + * Constructs an instance of GrpcToolsStub, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcToolsStub( + ToolsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createToolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createToolMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listToolsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listToolsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getToolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getToolMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateToolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateToolMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("tool.name", String.valueOf(request.getTool().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteToolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteToolMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listToolVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listToolVersionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createToolVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createToolVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getToolVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getToolVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteToolVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteToolVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + restoreToolVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restoreToolVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createToolCallable = + callableFactory.createUnaryCallable( + createToolTransportSettings, settings.createToolSettings(), clientContext); + this.listToolsCallable = + callableFactory.createUnaryCallable( + listToolsTransportSettings, settings.listToolsSettings(), clientContext); + this.listToolsPagedCallable = + callableFactory.createPagedCallable( + listToolsTransportSettings, settings.listToolsSettings(), clientContext); + this.getToolCallable = + callableFactory.createUnaryCallable( + getToolTransportSettings, settings.getToolSettings(), clientContext); + this.updateToolCallable = + callableFactory.createUnaryCallable( + updateToolTransportSettings, settings.updateToolSettings(), clientContext); + this.deleteToolCallable = + callableFactory.createUnaryCallable( + deleteToolTransportSettings, settings.deleteToolSettings(), clientContext); + this.listToolVersionsCallable = + callableFactory.createUnaryCallable( + listToolVersionsTransportSettings, settings.listToolVersionsSettings(), clientContext); + this.listToolVersionsPagedCallable = + callableFactory.createPagedCallable( + listToolVersionsTransportSettings, settings.listToolVersionsSettings(), clientContext); + this.createToolVersionCallable = + callableFactory.createUnaryCallable( + createToolVersionTransportSettings, + settings.createToolVersionSettings(), + clientContext); + this.getToolVersionCallable = + callableFactory.createUnaryCallable( + getToolVersionTransportSettings, settings.getToolVersionSettings(), clientContext); + this.deleteToolVersionCallable = + callableFactory.createUnaryCallable( + deleteToolVersionTransportSettings, + settings.deleteToolVersionSettings(), + clientContext); + this.restoreToolVersionCallable = + callableFactory.createUnaryCallable( + restoreToolVersionTransportSettings, + settings.restoreToolVersionSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createToolCallable() { + return createToolCallable; + } + + @Override + public UnaryCallable listToolsCallable() { + return listToolsCallable; + } + + @Override + public UnaryCallable listToolsPagedCallable() { + return listToolsPagedCallable; + } + + @Override + public UnaryCallable getToolCallable() { + return getToolCallable; + } + + @Override + public UnaryCallable updateToolCallable() { + return updateToolCallable; + } + + @Override + public UnaryCallable deleteToolCallable() { + return deleteToolCallable; + } + + @Override + public UnaryCallable + listToolVersionsCallable() { + return listToolVersionsCallable; + } + + @Override + public UnaryCallable + listToolVersionsPagedCallable() { + return listToolVersionsPagedCallable; + } + + @Override + public UnaryCallable createToolVersionCallable() { + return createToolVersionCallable; + } + + @Override + public UnaryCallable getToolVersionCallable() { + return getToolVersionCallable; + } + + @Override + public UnaryCallable deleteToolVersionCallable() { + return deleteToolVersionCallable; + } + + @Override + public UnaryCallable + restoreToolVersionCallable() { + return restoreToolVersionCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonExamplesCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonExamplesCallableFactory.java new file mode 100644 index 000000000000..e065cf8d628b --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonExamplesCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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.v3.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Examples service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonExamplesCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonExamplesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonExamplesStub.java new file mode 100644 index 000000000000..29ad421e2e93 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonExamplesStub.java @@ -0,0 +1,572 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListLocationsPagedResponse; + +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.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.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.GetExampleRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest; +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.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Examples service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonExamplesStub extends ExamplesStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + createExampleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/CreateExample") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples", + 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("example", request.getExample(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Example.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteExampleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/DeleteExample") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listExamplesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/ListExamples") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples", + 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, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListExamplesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getExampleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/GetExample") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Example.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateExampleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Examples/UpdateExample") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "example.name", request.getExample().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("example", request.getExample(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Example.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createExampleCallable; + private final UnaryCallable deleteExampleCallable; + private final UnaryCallable listExamplesCallable; + private final UnaryCallable + listExamplesPagedCallable; + private final UnaryCallable getExampleCallable; + private final UnaryCallable updateExampleCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonExamplesStub create(ExamplesStubSettings settings) + throws IOException { + return new HttpJsonExamplesStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonExamplesStub create(ClientContext clientContext) throws IOException { + return new HttpJsonExamplesStub( + ExamplesStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonExamplesStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonExamplesStub( + ExamplesStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonExamplesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonExamplesStub(ExamplesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonExamplesCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonExamplesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonExamplesStub( + ExamplesStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings createExampleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createExampleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteExampleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteExampleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listExamplesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listExamplesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getExampleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getExampleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateExampleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateExampleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("example.name", String.valueOf(request.getExample().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createExampleCallable = + callableFactory.createUnaryCallable( + createExampleTransportSettings, settings.createExampleSettings(), clientContext); + this.deleteExampleCallable = + callableFactory.createUnaryCallable( + deleteExampleTransportSettings, settings.deleteExampleSettings(), clientContext); + this.listExamplesCallable = + callableFactory.createUnaryCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.listExamplesPagedCallable = + callableFactory.createPagedCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.getExampleCallable = + callableFactory.createUnaryCallable( + getExampleTransportSettings, settings.getExampleSettings(), clientContext); + this.updateExampleCallable = + callableFactory.createUnaryCallable( + updateExampleTransportSettings, settings.updateExampleSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createExampleMethodDescriptor); + methodDescriptors.add(deleteExampleMethodDescriptor); + methodDescriptors.add(listExamplesMethodDescriptor); + methodDescriptors.add(getExampleMethodDescriptor); + methodDescriptors.add(updateExampleMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createExampleCallable() { + return createExampleCallable; + } + + @Override + public UnaryCallable deleteExampleCallable() { + return deleteExampleCallable; + } + + @Override + public UnaryCallable listExamplesCallable() { + return listExamplesCallable; + } + + @Override + public UnaryCallable listExamplesPagedCallable() { + return listExamplesPagedCallable; + } + + @Override + public UnaryCallable getExampleCallable() { + return getExampleCallable; + } + + @Override + public UnaryCallable updateExampleCallable() { + return updateExampleCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonPlaybooksCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonPlaybooksCallableFactory.java new file mode 100644 index 000000000000..5c193b3e38f0 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonPlaybooksCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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.v3.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Playbooks service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonPlaybooksCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonPlaybooksStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonPlaybooksStub.java new file mode 100644 index 000000000000..643bc878b538 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonPlaybooksStub.java @@ -0,0 +1,1111 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.HttpRule; +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.v3.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; +import com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest; +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.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.Struct; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Playbooks service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonPlaybooksStub extends PlaybooksStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ExportPlaybookResponse.getDescriptor()) + .add(ImportPlaybookResponse.getDescriptor()) + .add(Struct.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createPlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/CreatePlaybook") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*}/playbooks", + 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("playbook", request.getPlaybook(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Playbook.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deletePlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/DeletePlaybook") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listPlaybooksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/ListPlaybooks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*}/playbooks", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPlaybooksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getPlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/GetPlaybook") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Playbook.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + exportPlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/ExportPlaybook") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}:export", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + 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().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportPlaybookRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + importPlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/ImportPlaybook") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*}/playbooks: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( + (ImportPlaybookRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updatePlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/UpdatePlaybook") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{playbook.name=projects/*/locations/*/agents/*/playbooks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "playbook.name", request.getPlaybook().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("playbook", request.getPlaybook(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Playbook.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createPlaybookVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/CreatePlaybookVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions", + 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("playbookVersion", request.getPlaybookVersion(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PlaybookVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getPlaybookVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/GetPlaybookVersion") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PlaybookVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + RestorePlaybookVersionRequest, RestorePlaybookVersionResponse> + restorePlaybookVersionMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/RestorePlaybookVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}:restore", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + 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().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RestorePlaybookVersionResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListPlaybookVersionsRequest, ListPlaybookVersionsResponse> + listPlaybookVersionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/ListPlaybookVersions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPlaybookVersionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deletePlaybookVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Playbooks/DeletePlaybookVersion") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createPlaybookCallable; + private final UnaryCallable deletePlaybookCallable; + private final UnaryCallable listPlaybooksCallable; + private final UnaryCallable + listPlaybooksPagedCallable; + private final UnaryCallable getPlaybookCallable; + private final UnaryCallable exportPlaybookCallable; + private final OperationCallable + exportPlaybookOperationCallable; + private final UnaryCallable importPlaybookCallable; + private final OperationCallable + importPlaybookOperationCallable; + private final UnaryCallable updatePlaybookCallable; + private final UnaryCallable + createPlaybookVersionCallable; + private final UnaryCallable + getPlaybookVersionCallable; + private final UnaryCallable + restorePlaybookVersionCallable; + private final UnaryCallable + listPlaybookVersionsCallable; + private final UnaryCallable + listPlaybookVersionsPagedCallable; + private final UnaryCallable deletePlaybookVersionCallable; + 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 HttpJsonPlaybooksStub create(PlaybooksStubSettings settings) + throws IOException { + return new HttpJsonPlaybooksStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonPlaybooksStub create(ClientContext clientContext) throws IOException { + return new HttpJsonPlaybooksStub( + PlaybooksStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPlaybooksStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPlaybooksStub( + PlaybooksStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonPlaybooksStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonPlaybooksStub(PlaybooksStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonPlaybooksCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPlaybooksStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonPlaybooksStub( + PlaybooksStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v3/{name=projects/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost("/v3/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*/locations/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*/locations/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings createPlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deletePlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listPlaybooksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPlaybooksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getPlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings exportPlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportPlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings importPlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importPlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updatePlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("playbook.name", String.valueOf(request.getPlaybook().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createPlaybookVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPlaybookVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getPlaybookVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPlaybookVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + restorePlaybookVersionTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(restorePlaybookVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listPlaybookVersionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listPlaybookVersionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deletePlaybookVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePlaybookVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createPlaybookCallable = + callableFactory.createUnaryCallable( + createPlaybookTransportSettings, settings.createPlaybookSettings(), clientContext); + this.deletePlaybookCallable = + callableFactory.createUnaryCallable( + deletePlaybookTransportSettings, settings.deletePlaybookSettings(), clientContext); + this.listPlaybooksCallable = + callableFactory.createUnaryCallable( + listPlaybooksTransportSettings, settings.listPlaybooksSettings(), clientContext); + this.listPlaybooksPagedCallable = + callableFactory.createPagedCallable( + listPlaybooksTransportSettings, settings.listPlaybooksSettings(), clientContext); + this.getPlaybookCallable = + callableFactory.createUnaryCallable( + getPlaybookTransportSettings, settings.getPlaybookSettings(), clientContext); + this.exportPlaybookCallable = + callableFactory.createUnaryCallable( + exportPlaybookTransportSettings, settings.exportPlaybookSettings(), clientContext); + this.exportPlaybookOperationCallable = + callableFactory.createOperationCallable( + exportPlaybookTransportSettings, + settings.exportPlaybookOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.importPlaybookCallable = + callableFactory.createUnaryCallable( + importPlaybookTransportSettings, settings.importPlaybookSettings(), clientContext); + this.importPlaybookOperationCallable = + callableFactory.createOperationCallable( + importPlaybookTransportSettings, + settings.importPlaybookOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updatePlaybookCallable = + callableFactory.createUnaryCallable( + updatePlaybookTransportSettings, settings.updatePlaybookSettings(), clientContext); + this.createPlaybookVersionCallable = + callableFactory.createUnaryCallable( + createPlaybookVersionTransportSettings, + settings.createPlaybookVersionSettings(), + clientContext); + this.getPlaybookVersionCallable = + callableFactory.createUnaryCallable( + getPlaybookVersionTransportSettings, + settings.getPlaybookVersionSettings(), + clientContext); + this.restorePlaybookVersionCallable = + callableFactory.createUnaryCallable( + restorePlaybookVersionTransportSettings, + settings.restorePlaybookVersionSettings(), + clientContext); + this.listPlaybookVersionsCallable = + callableFactory.createUnaryCallable( + listPlaybookVersionsTransportSettings, + settings.listPlaybookVersionsSettings(), + clientContext); + this.listPlaybookVersionsPagedCallable = + callableFactory.createPagedCallable( + listPlaybookVersionsTransportSettings, + settings.listPlaybookVersionsSettings(), + clientContext); + this.deletePlaybookVersionCallable = + callableFactory.createUnaryCallable( + deletePlaybookVersionTransportSettings, + settings.deletePlaybookVersionSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createPlaybookMethodDescriptor); + methodDescriptors.add(deletePlaybookMethodDescriptor); + methodDescriptors.add(listPlaybooksMethodDescriptor); + methodDescriptors.add(getPlaybookMethodDescriptor); + methodDescriptors.add(exportPlaybookMethodDescriptor); + methodDescriptors.add(importPlaybookMethodDescriptor); + methodDescriptors.add(updatePlaybookMethodDescriptor); + methodDescriptors.add(createPlaybookVersionMethodDescriptor); + methodDescriptors.add(getPlaybookVersionMethodDescriptor); + methodDescriptors.add(restorePlaybookVersionMethodDescriptor); + methodDescriptors.add(listPlaybookVersionsMethodDescriptor); + methodDescriptors.add(deletePlaybookVersionMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createPlaybookCallable() { + return createPlaybookCallable; + } + + @Override + public UnaryCallable deletePlaybookCallable() { + return deletePlaybookCallable; + } + + @Override + public UnaryCallable listPlaybooksCallable() { + return listPlaybooksCallable; + } + + @Override + public UnaryCallable + listPlaybooksPagedCallable() { + return listPlaybooksPagedCallable; + } + + @Override + public UnaryCallable getPlaybookCallable() { + return getPlaybookCallable; + } + + @Override + public UnaryCallable exportPlaybookCallable() { + return exportPlaybookCallable; + } + + @Override + public OperationCallable + exportPlaybookOperationCallable() { + return exportPlaybookOperationCallable; + } + + @Override + public UnaryCallable importPlaybookCallable() { + return importPlaybookCallable; + } + + @Override + public OperationCallable + importPlaybookOperationCallable() { + return importPlaybookOperationCallable; + } + + @Override + public UnaryCallable updatePlaybookCallable() { + return updatePlaybookCallable; + } + + @Override + public UnaryCallable + createPlaybookVersionCallable() { + return createPlaybookVersionCallable; + } + + @Override + public UnaryCallable getPlaybookVersionCallable() { + return getPlaybookVersionCallable; + } + + @Override + public UnaryCallable + restorePlaybookVersionCallable() { + return restorePlaybookVersionCallable; + } + + @Override + public UnaryCallable + listPlaybookVersionsCallable() { + return listPlaybookVersionsCallable; + } + + @Override + public UnaryCallable + listPlaybookVersionsPagedCallable() { + return listPlaybookVersionsPagedCallable; + } + + @Override + public UnaryCallable deletePlaybookVersionCallable() { + return deletePlaybookVersionCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonToolsCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonToolsCallableFactory.java new file mode 100644 index 000000000000..8fc1b40f0a3b --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonToolsCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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.v3.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Tools service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonToolsCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonToolsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonToolsStub.java new file mode 100644 index 000000000000..b6dbd9829e94 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonToolsStub.java @@ -0,0 +1,878 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolsPagedResponse; + +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.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.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.UpdateToolRequest; +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.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Tools service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonToolsStub extends ToolsStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor createToolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/CreateTool") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*}/tools", + 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("tool", request.getTool(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Tool.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listToolsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/ListTools") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*}/tools", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListToolsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getToolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/GetTool") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/tools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Tool.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateToolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/UpdateTool") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{tool.name=projects/*/locations/*/agents/*/tools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "tool.name", request.getTool().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("tool", request.getTool(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Tool.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteToolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/DeleteTool") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/tools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listToolVersionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/ListToolVersions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListToolVersionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createToolVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/CreateToolVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions", + 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("toolVersion", request.getToolVersion(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ToolVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getToolVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/GetToolVersion") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ToolVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteToolVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/DeleteToolVersion") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + restoreToolVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.Tools/RestoreToolVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}:restore", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + 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().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RestoreToolVersionResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createToolCallable; + private final UnaryCallable listToolsCallable; + private final UnaryCallable listToolsPagedCallable; + private final UnaryCallable getToolCallable; + private final UnaryCallable updateToolCallable; + private final UnaryCallable deleteToolCallable; + private final UnaryCallable + listToolVersionsCallable; + private final UnaryCallable + listToolVersionsPagedCallable; + private final UnaryCallable createToolVersionCallable; + private final UnaryCallable getToolVersionCallable; + private final UnaryCallable deleteToolVersionCallable; + private final UnaryCallable + restoreToolVersionCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonToolsStub create(ToolsStubSettings settings) throws IOException { + return new HttpJsonToolsStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonToolsStub create(ClientContext clientContext) throws IOException { + return new HttpJsonToolsStub(ToolsStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonToolsStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonToolsStub( + ToolsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonToolsStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonToolsStub(ToolsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonToolsCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonToolsStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonToolsStub( + ToolsStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings createToolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createToolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listToolsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listToolsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getToolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getToolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateToolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateToolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("tool.name", String.valueOf(request.getTool().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteToolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteToolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listToolVersionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listToolVersionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createToolVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createToolVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getToolVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getToolVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteToolVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteToolVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + restoreToolVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(restoreToolVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createToolCallable = + callableFactory.createUnaryCallable( + createToolTransportSettings, settings.createToolSettings(), clientContext); + this.listToolsCallable = + callableFactory.createUnaryCallable( + listToolsTransportSettings, settings.listToolsSettings(), clientContext); + this.listToolsPagedCallable = + callableFactory.createPagedCallable( + listToolsTransportSettings, settings.listToolsSettings(), clientContext); + this.getToolCallable = + callableFactory.createUnaryCallable( + getToolTransportSettings, settings.getToolSettings(), clientContext); + this.updateToolCallable = + callableFactory.createUnaryCallable( + updateToolTransportSettings, settings.updateToolSettings(), clientContext); + this.deleteToolCallable = + callableFactory.createUnaryCallable( + deleteToolTransportSettings, settings.deleteToolSettings(), clientContext); + this.listToolVersionsCallable = + callableFactory.createUnaryCallable( + listToolVersionsTransportSettings, settings.listToolVersionsSettings(), clientContext); + this.listToolVersionsPagedCallable = + callableFactory.createPagedCallable( + listToolVersionsTransportSettings, settings.listToolVersionsSettings(), clientContext); + this.createToolVersionCallable = + callableFactory.createUnaryCallable( + createToolVersionTransportSettings, + settings.createToolVersionSettings(), + clientContext); + this.getToolVersionCallable = + callableFactory.createUnaryCallable( + getToolVersionTransportSettings, settings.getToolVersionSettings(), clientContext); + this.deleteToolVersionCallable = + callableFactory.createUnaryCallable( + deleteToolVersionTransportSettings, + settings.deleteToolVersionSettings(), + clientContext); + this.restoreToolVersionCallable = + callableFactory.createUnaryCallable( + restoreToolVersionTransportSettings, + settings.restoreToolVersionSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createToolMethodDescriptor); + methodDescriptors.add(listToolsMethodDescriptor); + methodDescriptors.add(getToolMethodDescriptor); + methodDescriptors.add(updateToolMethodDescriptor); + methodDescriptors.add(deleteToolMethodDescriptor); + methodDescriptors.add(listToolVersionsMethodDescriptor); + methodDescriptors.add(createToolVersionMethodDescriptor); + methodDescriptors.add(getToolVersionMethodDescriptor); + methodDescriptors.add(deleteToolVersionMethodDescriptor); + methodDescriptors.add(restoreToolVersionMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createToolCallable() { + return createToolCallable; + } + + @Override + public UnaryCallable listToolsCallable() { + return listToolsCallable; + } + + @Override + public UnaryCallable listToolsPagedCallable() { + return listToolsPagedCallable; + } + + @Override + public UnaryCallable getToolCallable() { + return getToolCallable; + } + + @Override + public UnaryCallable updateToolCallable() { + return updateToolCallable; + } + + @Override + public UnaryCallable deleteToolCallable() { + return deleteToolCallable; + } + + @Override + public UnaryCallable + listToolVersionsCallable() { + return listToolVersionsCallable; + } + + @Override + public UnaryCallable + listToolVersionsPagedCallable() { + return listToolVersionsPagedCallable; + } + + @Override + public UnaryCallable createToolVersionCallable() { + return createToolVersionCallable; + } + + @Override + public UnaryCallable getToolVersionCallable() { + return getToolVersionCallable; + } + + @Override + public UnaryCallable deleteToolVersionCallable() { + return deleteToolVersionCallable; + } + + @Override + public UnaryCallable + restoreToolVersionCallable() { + return restoreToolVersionCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PlaybooksStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PlaybooksStub.java new file mode 100644 index 000000000000..34e22bbe4dc8 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PlaybooksStub.java @@ -0,0 +1,158 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybooksPagedResponse; + +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.v3.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; +import com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest; +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.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import com.google.protobuf.Struct; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Playbooks service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PlaybooksStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable createPlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: createPlaybookCallable()"); + } + + public UnaryCallable deletePlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: deletePlaybookCallable()"); + } + + public UnaryCallable + listPlaybooksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPlaybooksPagedCallable()"); + } + + public UnaryCallable listPlaybooksCallable() { + throw new UnsupportedOperationException("Not implemented: listPlaybooksCallable()"); + } + + public UnaryCallable getPlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: getPlaybookCallable()"); + } + + public OperationCallable + exportPlaybookOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportPlaybookOperationCallable()"); + } + + public UnaryCallable exportPlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: exportPlaybookCallable()"); + } + + public OperationCallable + importPlaybookOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importPlaybookOperationCallable()"); + } + + public UnaryCallable importPlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: importPlaybookCallable()"); + } + + public UnaryCallable updatePlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: updatePlaybookCallable()"); + } + + public UnaryCallable + createPlaybookVersionCallable() { + throw new UnsupportedOperationException("Not implemented: createPlaybookVersionCallable()"); + } + + public UnaryCallable getPlaybookVersionCallable() { + throw new UnsupportedOperationException("Not implemented: getPlaybookVersionCallable()"); + } + + public UnaryCallable + restorePlaybookVersionCallable() { + throw new UnsupportedOperationException("Not implemented: restorePlaybookVersionCallable()"); + } + + public UnaryCallable + listPlaybookVersionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPlaybookVersionsPagedCallable()"); + } + + public UnaryCallable + listPlaybookVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listPlaybookVersionsCallable()"); + } + + public UnaryCallable deletePlaybookVersionCallable() { + throw new UnsupportedOperationException("Not implemented: deletePlaybookVersionCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PlaybooksStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PlaybooksStubSettings.java new file mode 100644 index 000000000000..175f749d2dcd --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PlaybooksStubSettings.java @@ -0,0 +1,996 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; +import com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest; +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.ImmutableList; +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 com.google.protobuf.Struct; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PlaybooksStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createPlaybook: + * + *

{@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
+ * PlaybooksStubSettings.Builder playbooksSettingsBuilder = PlaybooksStubSettings.newBuilder();
+ * playbooksSettingsBuilder
+ *     .createPlaybookSettings()
+ *     .setRetrySettings(
+ *         playbooksSettingsBuilder
+ *             .createPlaybookSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PlaybooksStubSettings playbooksSettings = playbooksSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for exportPlaybook: + * + *

{@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
+ * PlaybooksStubSettings.Builder playbooksSettingsBuilder = PlaybooksStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * playbooksSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PlaybooksStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final UnaryCallSettings createPlaybookSettings; + private final UnaryCallSettings deletePlaybookSettings; + private final PagedCallSettings< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + listPlaybooksSettings; + private final UnaryCallSettings getPlaybookSettings; + private final UnaryCallSettings exportPlaybookSettings; + private final OperationCallSettings + exportPlaybookOperationSettings; + private final UnaryCallSettings importPlaybookSettings; + private final OperationCallSettings + importPlaybookOperationSettings; + private final UnaryCallSettings updatePlaybookSettings; + private final UnaryCallSettings + createPlaybookVersionSettings; + private final UnaryCallSettings + getPlaybookVersionSettings; + private final UnaryCallSettings + restorePlaybookVersionSettings; + private final PagedCallSettings< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings; + private final UnaryCallSettings + deletePlaybookVersionSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_PLAYBOOKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPlaybooksRequest injectToken(ListPlaybooksRequest payload, String token) { + return ListPlaybooksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPlaybooksRequest injectPageSize(ListPlaybooksRequest payload, int pageSize) { + return ListPlaybooksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPlaybooksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPlaybooksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPlaybooksResponse payload) { + return payload.getPlaybooksList(); + } + }; + + private static final PagedListDescriptor< + ListPlaybookVersionsRequest, ListPlaybookVersionsResponse, PlaybookVersion> + LIST_PLAYBOOK_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListPlaybookVersionsRequest, ListPlaybookVersionsResponse, PlaybookVersion>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPlaybookVersionsRequest injectToken( + ListPlaybookVersionsRequest payload, String token) { + return ListPlaybookVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPlaybookVersionsRequest injectPageSize( + ListPlaybookVersionsRequest payload, int pageSize) { + return ListPlaybookVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPlaybookVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPlaybookVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListPlaybookVersionsResponse payload) { + return payload.getPlaybookVersionsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + LIST_PLAYBOOKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPlaybooksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PLAYBOOKS_PAGE_STR_DESC, request, context); + return ListPlaybooksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + LIST_PLAYBOOK_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPlaybookVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListPlaybookVersionsRequest, ListPlaybookVersionsResponse, PlaybookVersion> + pageContext = + PageContext.create( + callable, LIST_PLAYBOOK_VERSIONS_PAGE_STR_DESC, request, context); + return ListPlaybookVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createPlaybook. */ + public UnaryCallSettings createPlaybookSettings() { + return createPlaybookSettings; + } + + /** Returns the object with the settings used for calls to deletePlaybook. */ + public UnaryCallSettings deletePlaybookSettings() { + return deletePlaybookSettings; + } + + /** Returns the object with the settings used for calls to listPlaybooks. */ + public PagedCallSettings + listPlaybooksSettings() { + return listPlaybooksSettings; + } + + /** Returns the object with the settings used for calls to getPlaybook. */ + public UnaryCallSettings getPlaybookSettings() { + return getPlaybookSettings; + } + + /** Returns the object with the settings used for calls to exportPlaybook. */ + public UnaryCallSettings exportPlaybookSettings() { + return exportPlaybookSettings; + } + + /** Returns the object with the settings used for calls to exportPlaybook. */ + public OperationCallSettings + exportPlaybookOperationSettings() { + return exportPlaybookOperationSettings; + } + + /** Returns the object with the settings used for calls to importPlaybook. */ + public UnaryCallSettings importPlaybookSettings() { + return importPlaybookSettings; + } + + /** Returns the object with the settings used for calls to importPlaybook. */ + public OperationCallSettings + importPlaybookOperationSettings() { + return importPlaybookOperationSettings; + } + + /** Returns the object with the settings used for calls to updatePlaybook. */ + public UnaryCallSettings updatePlaybookSettings() { + return updatePlaybookSettings; + } + + /** Returns the object with the settings used for calls to createPlaybookVersion. */ + public UnaryCallSettings + createPlaybookVersionSettings() { + return createPlaybookVersionSettings; + } + + /** Returns the object with the settings used for calls to getPlaybookVersion. */ + public UnaryCallSettings + getPlaybookVersionSettings() { + return getPlaybookVersionSettings; + } + + /** Returns the object with the settings used for calls to restorePlaybookVersion. */ + public UnaryCallSettings + restorePlaybookVersionSettings() { + return restorePlaybookVersionSettings; + } + + /** Returns the object with the settings used for calls to listPlaybookVersions. */ + public PagedCallSettings< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings() { + return listPlaybookVersionsSettings; + } + + /** Returns the object with the settings used for calls to deletePlaybookVersion. */ + public UnaryCallSettings deletePlaybookVersionSettings() { + return deletePlaybookVersionSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public PlaybooksStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPlaybooksStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPlaybooksStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "dialogflow"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dialogflow.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PlaybooksStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PlaybooksStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PlaybooksStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PlaybooksStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createPlaybookSettings = settingsBuilder.createPlaybookSettings().build(); + deletePlaybookSettings = settingsBuilder.deletePlaybookSettings().build(); + listPlaybooksSettings = settingsBuilder.listPlaybooksSettings().build(); + getPlaybookSettings = settingsBuilder.getPlaybookSettings().build(); + exportPlaybookSettings = settingsBuilder.exportPlaybookSettings().build(); + exportPlaybookOperationSettings = settingsBuilder.exportPlaybookOperationSettings().build(); + importPlaybookSettings = settingsBuilder.importPlaybookSettings().build(); + importPlaybookOperationSettings = settingsBuilder.importPlaybookOperationSettings().build(); + updatePlaybookSettings = settingsBuilder.updatePlaybookSettings().build(); + createPlaybookVersionSettings = settingsBuilder.createPlaybookVersionSettings().build(); + getPlaybookVersionSettings = settingsBuilder.getPlaybookVersionSettings().build(); + restorePlaybookVersionSettings = settingsBuilder.restorePlaybookVersionSettings().build(); + listPlaybookVersionsSettings = settingsBuilder.listPlaybookVersionsSettings().build(); + deletePlaybookVersionSettings = settingsBuilder.deletePlaybookVersionSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for PlaybooksStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createPlaybookSettings; + private final UnaryCallSettings.Builder deletePlaybookSettings; + private final PagedCallSettings.Builder< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + listPlaybooksSettings; + private final UnaryCallSettings.Builder getPlaybookSettings; + private final UnaryCallSettings.Builder + exportPlaybookSettings; + private final OperationCallSettings.Builder< + ExportPlaybookRequest, ExportPlaybookResponse, Struct> + exportPlaybookOperationSettings; + private final UnaryCallSettings.Builder + importPlaybookSettings; + private final OperationCallSettings.Builder< + ImportPlaybookRequest, ImportPlaybookResponse, Struct> + importPlaybookOperationSettings; + private final UnaryCallSettings.Builder updatePlaybookSettings; + private final UnaryCallSettings.Builder + createPlaybookVersionSettings; + private final UnaryCallSettings.Builder + getPlaybookVersionSettings; + private final UnaryCallSettings.Builder< + RestorePlaybookVersionRequest, RestorePlaybookVersionResponse> + restorePlaybookVersionSettings; + private final PagedCallSettings.Builder< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings; + private final UnaryCallSettings.Builder + deletePlaybookVersionSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createPlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPlaybooksSettings = PagedCallSettings.newBuilder(LIST_PLAYBOOKS_PAGE_STR_FACT); + getPlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportPlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportPlaybookOperationSettings = OperationCallSettings.newBuilder(); + importPlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importPlaybookOperationSettings = OperationCallSettings.newBuilder(); + updatePlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPlaybookVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getPlaybookVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restorePlaybookVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPlaybookVersionsSettings = + PagedCallSettings.newBuilder(LIST_PLAYBOOK_VERSIONS_PAGE_STR_FACT); + deletePlaybookVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPlaybookSettings, + deletePlaybookSettings, + listPlaybooksSettings, + getPlaybookSettings, + exportPlaybookSettings, + importPlaybookSettings, + updatePlaybookSettings, + createPlaybookVersionSettings, + getPlaybookVersionSettings, + restorePlaybookVersionSettings, + listPlaybookVersionsSettings, + deletePlaybookVersionSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(PlaybooksStubSettings settings) { + super(settings); + + createPlaybookSettings = settings.createPlaybookSettings.toBuilder(); + deletePlaybookSettings = settings.deletePlaybookSettings.toBuilder(); + listPlaybooksSettings = settings.listPlaybooksSettings.toBuilder(); + getPlaybookSettings = settings.getPlaybookSettings.toBuilder(); + exportPlaybookSettings = settings.exportPlaybookSettings.toBuilder(); + exportPlaybookOperationSettings = settings.exportPlaybookOperationSettings.toBuilder(); + importPlaybookSettings = settings.importPlaybookSettings.toBuilder(); + importPlaybookOperationSettings = settings.importPlaybookOperationSettings.toBuilder(); + updatePlaybookSettings = settings.updatePlaybookSettings.toBuilder(); + createPlaybookVersionSettings = settings.createPlaybookVersionSettings.toBuilder(); + getPlaybookVersionSettings = settings.getPlaybookVersionSettings.toBuilder(); + restorePlaybookVersionSettings = settings.restorePlaybookVersionSettings.toBuilder(); + listPlaybookVersionsSettings = settings.listPlaybookVersionsSettings.toBuilder(); + deletePlaybookVersionSettings = settings.deletePlaybookVersionSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPlaybookSettings, + deletePlaybookSettings, + listPlaybooksSettings, + getPlaybookSettings, + exportPlaybookSettings, + importPlaybookSettings, + updatePlaybookSettings, + createPlaybookVersionSettings, + getPlaybookVersionSettings, + restorePlaybookVersionSettings, + listPlaybookVersionsSettings, + deletePlaybookVersionSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createPlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deletePlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPlaybooksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportPlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .importPlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPlaybookVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPlaybookVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .restorePlaybookVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPlaybookVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deletePlaybookVersionSettings() + .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")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportPlaybookOperationSettings() + .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(ExportPlaybookResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Struct.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .importPlaybookOperationSettings() + .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(ImportPlaybookResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Struct.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createPlaybook. */ + public UnaryCallSettings.Builder createPlaybookSettings() { + return createPlaybookSettings; + } + + /** Returns the builder for the settings used for calls to deletePlaybook. */ + public UnaryCallSettings.Builder deletePlaybookSettings() { + return deletePlaybookSettings; + } + + /** Returns the builder for the settings used for calls to listPlaybooks. */ + public PagedCallSettings.Builder< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + listPlaybooksSettings() { + return listPlaybooksSettings; + } + + /** Returns the builder for the settings used for calls to getPlaybook. */ + public UnaryCallSettings.Builder getPlaybookSettings() { + return getPlaybookSettings; + } + + /** Returns the builder for the settings used for calls to exportPlaybook. */ + public UnaryCallSettings.Builder exportPlaybookSettings() { + return exportPlaybookSettings; + } + + /** Returns the builder for the settings used for calls to exportPlaybook. */ + public OperationCallSettings.Builder + exportPlaybookOperationSettings() { + return exportPlaybookOperationSettings; + } + + /** Returns the builder for the settings used for calls to importPlaybook. */ + public UnaryCallSettings.Builder importPlaybookSettings() { + return importPlaybookSettings; + } + + /** Returns the builder for the settings used for calls to importPlaybook. */ + public OperationCallSettings.Builder + importPlaybookOperationSettings() { + return importPlaybookOperationSettings; + } + + /** Returns the builder for the settings used for calls to updatePlaybook. */ + public UnaryCallSettings.Builder updatePlaybookSettings() { + return updatePlaybookSettings; + } + + /** Returns the builder for the settings used for calls to createPlaybookVersion. */ + public UnaryCallSettings.Builder + createPlaybookVersionSettings() { + return createPlaybookVersionSettings; + } + + /** Returns the builder for the settings used for calls to getPlaybookVersion. */ + public UnaryCallSettings.Builder + getPlaybookVersionSettings() { + return getPlaybookVersionSettings; + } + + /** Returns the builder for the settings used for calls to restorePlaybookVersion. */ + public UnaryCallSettings.Builder + restorePlaybookVersionSettings() { + return restorePlaybookVersionSettings; + } + + /** Returns the builder for the settings used for calls to listPlaybookVersions. */ + public PagedCallSettings.Builder< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings() { + return listPlaybookVersionsSettings; + } + + /** Returns the builder for the settings used for calls to deletePlaybookVersion. */ + public UnaryCallSettings.Builder + deletePlaybookVersionSettings() { + return deletePlaybookVersionSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public PlaybooksStubSettings build() throws IOException { + return new PlaybooksStubSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ToolsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ToolsStub.java new file mode 100644 index 000000000000..10641913a097 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ToolsStub.java @@ -0,0 +1,122 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.UpdateToolRequest; +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.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Tools service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ToolsStub implements BackgroundResource { + + public UnaryCallable createToolCallable() { + throw new UnsupportedOperationException("Not implemented: createToolCallable()"); + } + + public UnaryCallable listToolsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listToolsPagedCallable()"); + } + + public UnaryCallable listToolsCallable() { + throw new UnsupportedOperationException("Not implemented: listToolsCallable()"); + } + + public UnaryCallable getToolCallable() { + throw new UnsupportedOperationException("Not implemented: getToolCallable()"); + } + + public UnaryCallable updateToolCallable() { + throw new UnsupportedOperationException("Not implemented: updateToolCallable()"); + } + + public UnaryCallable deleteToolCallable() { + throw new UnsupportedOperationException("Not implemented: deleteToolCallable()"); + } + + public UnaryCallable + listToolVersionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listToolVersionsPagedCallable()"); + } + + public UnaryCallable + listToolVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listToolVersionsCallable()"); + } + + public UnaryCallable createToolVersionCallable() { + throw new UnsupportedOperationException("Not implemented: createToolVersionCallable()"); + } + + public UnaryCallable getToolVersionCallable() { + throw new UnsupportedOperationException("Not implemented: getToolVersionCallable()"); + } + + public UnaryCallable deleteToolVersionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteToolVersionCallable()"); + } + + public UnaryCallable + restoreToolVersionCallable() { + throw new UnsupportedOperationException("Not implemented: restoreToolVersionCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ToolsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ToolsStubSettings.java new file mode 100644 index 000000000000..9ad20a3e28c9 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ToolsStubSettings.java @@ -0,0 +1,802 @@ +/* + * Copyright 2026 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.UpdateToolRequest; +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.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ToolsStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createTool: + * + *

{@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
+ * ToolsStubSettings.Builder toolsSettingsBuilder = ToolsStubSettings.newBuilder();
+ * toolsSettingsBuilder
+ *     .createToolSettings()
+ *     .setRetrySettings(
+ *         toolsSettingsBuilder
+ *             .createToolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * ToolsStubSettings toolsSettings = toolsSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class ToolsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final UnaryCallSettings createToolSettings; + private final PagedCallSettings + listToolsSettings; + private final UnaryCallSettings getToolSettings; + private final UnaryCallSettings updateToolSettings; + private final UnaryCallSettings deleteToolSettings; + private final PagedCallSettings< + ListToolVersionsRequest, ListToolVersionsResponse, ListToolVersionsPagedResponse> + listToolVersionsSettings; + private final UnaryCallSettings createToolVersionSettings; + private final UnaryCallSettings getToolVersionSettings; + private final UnaryCallSettings deleteToolVersionSettings; + private final UnaryCallSettings + restoreToolVersionSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_TOOLS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListToolsRequest injectToken(ListToolsRequest payload, String token) { + return ListToolsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListToolsRequest injectPageSize(ListToolsRequest payload, int pageSize) { + return ListToolsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListToolsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListToolsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListToolsResponse payload) { + return payload.getToolsList(); + } + }; + + private static final PagedListDescriptor< + ListToolVersionsRequest, ListToolVersionsResponse, ToolVersion> + LIST_TOOL_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListToolVersionsRequest, ListToolVersionsResponse, ToolVersion>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListToolVersionsRequest injectToken( + ListToolVersionsRequest payload, String token) { + return ListToolVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListToolVersionsRequest injectPageSize( + ListToolVersionsRequest payload, int pageSize) { + return ListToolVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListToolVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListToolVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListToolVersionsResponse payload) { + return payload.getToolVersionsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListToolsRequest, ListToolsResponse, ListToolsPagedResponse> + LIST_TOOLS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListToolsRequest, ListToolsResponse, ListToolsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListToolsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TOOLS_PAGE_STR_DESC, request, context); + return ListToolsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListToolVersionsRequest, ListToolVersionsResponse, ListToolVersionsPagedResponse> + LIST_TOOL_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListToolVersionsRequest, ListToolVersionsResponse, ListToolVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListToolVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_TOOL_VERSIONS_PAGE_STR_DESC, request, context); + return ListToolVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createTool. */ + public UnaryCallSettings createToolSettings() { + return createToolSettings; + } + + /** Returns the object with the settings used for calls to listTools. */ + public PagedCallSettings + listToolsSettings() { + return listToolsSettings; + } + + /** Returns the object with the settings used for calls to getTool. */ + public UnaryCallSettings getToolSettings() { + return getToolSettings; + } + + /** Returns the object with the settings used for calls to updateTool. */ + public UnaryCallSettings updateToolSettings() { + return updateToolSettings; + } + + /** Returns the object with the settings used for calls to deleteTool. */ + public UnaryCallSettings deleteToolSettings() { + return deleteToolSettings; + } + + /** Returns the object with the settings used for calls to listToolVersions. */ + public PagedCallSettings< + ListToolVersionsRequest, ListToolVersionsResponse, ListToolVersionsPagedResponse> + listToolVersionsSettings() { + return listToolVersionsSettings; + } + + /** Returns the object with the settings used for calls to createToolVersion. */ + public UnaryCallSettings createToolVersionSettings() { + return createToolVersionSettings; + } + + /** Returns the object with the settings used for calls to getToolVersion. */ + public UnaryCallSettings getToolVersionSettings() { + return getToolVersionSettings; + } + + /** Returns the object with the settings used for calls to deleteToolVersion. */ + public UnaryCallSettings deleteToolVersionSettings() { + return deleteToolVersionSettings; + } + + /** Returns the object with the settings used for calls to restoreToolVersion. */ + public UnaryCallSettings + restoreToolVersionSettings() { + return restoreToolVersionSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public ToolsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcToolsStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonToolsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "dialogflow"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dialogflow.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(ToolsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(ToolsStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ToolsStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ToolsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createToolSettings = settingsBuilder.createToolSettings().build(); + listToolsSettings = settingsBuilder.listToolsSettings().build(); + getToolSettings = settingsBuilder.getToolSettings().build(); + updateToolSettings = settingsBuilder.updateToolSettings().build(); + deleteToolSettings = settingsBuilder.deleteToolSettings().build(); + listToolVersionsSettings = settingsBuilder.listToolVersionsSettings().build(); + createToolVersionSettings = settingsBuilder.createToolVersionSettings().build(); + getToolVersionSettings = settingsBuilder.getToolVersionSettings().build(); + deleteToolVersionSettings = settingsBuilder.deleteToolVersionSettings().build(); + restoreToolVersionSettings = settingsBuilder.restoreToolVersionSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for ToolsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createToolSettings; + private final PagedCallSettings.Builder< + ListToolsRequest, ListToolsResponse, ListToolsPagedResponse> + listToolsSettings; + private final UnaryCallSettings.Builder getToolSettings; + private final UnaryCallSettings.Builder updateToolSettings; + private final UnaryCallSettings.Builder deleteToolSettings; + private final PagedCallSettings.Builder< + ListToolVersionsRequest, ListToolVersionsResponse, ListToolVersionsPagedResponse> + listToolVersionsSettings; + private final UnaryCallSettings.Builder + createToolVersionSettings; + private final UnaryCallSettings.Builder + getToolVersionSettings; + private final UnaryCallSettings.Builder + deleteToolVersionSettings; + private final UnaryCallSettings.Builder + restoreToolVersionSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createToolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listToolsSettings = PagedCallSettings.newBuilder(LIST_TOOLS_PAGE_STR_FACT); + getToolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateToolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteToolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listToolVersionsSettings = PagedCallSettings.newBuilder(LIST_TOOL_VERSIONS_PAGE_STR_FACT); + createToolVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getToolVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteToolVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restoreToolVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createToolSettings, + listToolsSettings, + getToolSettings, + updateToolSettings, + deleteToolSettings, + listToolVersionsSettings, + createToolVersionSettings, + getToolVersionSettings, + deleteToolVersionSettings, + restoreToolVersionSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(ToolsStubSettings settings) { + super(settings); + + createToolSettings = settings.createToolSettings.toBuilder(); + listToolsSettings = settings.listToolsSettings.toBuilder(); + getToolSettings = settings.getToolSettings.toBuilder(); + updateToolSettings = settings.updateToolSettings.toBuilder(); + deleteToolSettings = settings.deleteToolSettings.toBuilder(); + listToolVersionsSettings = settings.listToolVersionsSettings.toBuilder(); + createToolVersionSettings = settings.createToolVersionSettings.toBuilder(); + getToolVersionSettings = settings.getToolVersionSettings.toBuilder(); + deleteToolVersionSettings = settings.deleteToolVersionSettings.toBuilder(); + restoreToolVersionSettings = settings.restoreToolVersionSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createToolSettings, + listToolsSettings, + getToolSettings, + updateToolSettings, + deleteToolSettings, + listToolVersionsSettings, + createToolVersionSettings, + getToolVersionSettings, + deleteToolVersionSettings, + restoreToolVersionSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createToolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listToolsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getToolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateToolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteToolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listToolVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createToolVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getToolVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteToolVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .restoreToolVersionSettings() + .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")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createTool. */ + public UnaryCallSettings.Builder createToolSettings() { + return createToolSettings; + } + + /** Returns the builder for the settings used for calls to listTools. */ + public PagedCallSettings.Builder + listToolsSettings() { + return listToolsSettings; + } + + /** Returns the builder for the settings used for calls to getTool. */ + public UnaryCallSettings.Builder getToolSettings() { + return getToolSettings; + } + + /** Returns the builder for the settings used for calls to updateTool. */ + public UnaryCallSettings.Builder updateToolSettings() { + return updateToolSettings; + } + + /** Returns the builder for the settings used for calls to deleteTool. */ + public UnaryCallSettings.Builder deleteToolSettings() { + return deleteToolSettings; + } + + /** Returns the builder for the settings used for calls to listToolVersions. */ + public PagedCallSettings.Builder< + ListToolVersionsRequest, ListToolVersionsResponse, ListToolVersionsPagedResponse> + listToolVersionsSettings() { + return listToolVersionsSettings; + } + + /** Returns the builder for the settings used for calls to createToolVersion. */ + public UnaryCallSettings.Builder + createToolVersionSettings() { + return createToolVersionSettings; + } + + /** Returns the builder for the settings used for calls to getToolVersion. */ + public UnaryCallSettings.Builder getToolVersionSettings() { + return getToolVersionSettings; + } + + /** Returns the builder for the settings used for calls to deleteToolVersion. */ + public UnaryCallSettings.Builder deleteToolVersionSettings() { + return deleteToolVersionSettings; + } + + /** Returns the builder for the settings used for calls to restoreToolVersion. */ + public UnaryCallSettings.Builder + restoreToolVersionSettings() { + return restoreToolVersionSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public ToolsStubSettings build() throws IOException { + return new ToolsStubSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json index 23a9b87d4c3e..ddea98e6c20a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json @@ -413,6 +413,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Action$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.AdvancedSettings", "queryAllDeclaredConstructors": true, @@ -611,6 +629,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.AgentUtterance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.AgentUtterance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.AgentValidationResult", "queryAllDeclaredConstructors": true, @@ -980,6 +1016,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CodeBlock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CodeBlock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.CompareVersionsRequest", "queryAllDeclaredConstructors": true, @@ -1151,6 +1205,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreateExampleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreateExampleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest", "queryAllDeclaredConstructors": true, @@ -1241,6 +1313,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest", "queryAllDeclaredConstructors": true, @@ -1295,6 +1403,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreateToolRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreateToolRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest", "queryAllDeclaredConstructors": true, @@ -1574,6 +1718,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DataType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.DeleteAgentRequest", "queryAllDeclaredConstructors": true, @@ -1628,6 +1781,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest", "queryAllDeclaredConstructors": true, @@ -1718,6 +1889,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest", "queryAllDeclaredConstructors": true, @@ -1754,6 +1961,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeleteToolRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeleteToolRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest", "queryAllDeclaredConstructors": true, @@ -1952,6 +2195,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.DocumentProcessingMode", "queryAllDeclaredConstructors": true, @@ -2159,6 +2411,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Example", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Example$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.Experiment", "queryAllDeclaredConstructors": true, @@ -2520,7 +2790,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata", + "name": "com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2529,7 +2799,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2538,7 +2808,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest$DataFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2547,7 +2817,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2556,7 +2826,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest$DataFormat", + "name": "com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2565,7 +2835,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2574,7 +2844,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2583,7 +2853,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.FilterSpecs", + "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2592,7 +2862,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.FilterSpecs$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2601,7 +2871,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Flow", + "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest$DataFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2610,7 +2880,52 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Flow$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FilterSpecs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FilterSpecs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Flow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Flow$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2654,6 +2969,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FlowInvocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FlowInvocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FlowTransition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.FlowTransition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.FlowValidationResult", "queryAllDeclaredConstructors": true, @@ -3122,6 +3473,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GetExampleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.GetExampleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.GetExperimentRequest", "queryAllDeclaredConstructors": true, @@ -3249,7 +3618,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3258,7 +3627,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3267,7 +3636,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest", + "name": "com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3276,7 +3645,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3285,7 +3654,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest", + "name": "com.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3294,7 +3663,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3303,7 +3672,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest", + "name": "com.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3312,7 +3681,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3321,7 +3690,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest", + "name": "com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3330,7 +3699,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetTestCaseRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3339,7 +3708,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetVersionRequest", + "name": "com.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3348,7 +3717,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetVersionRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3357,7 +3726,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetWebhookRequest", + "name": "com.google.cloud.dialogflow.cx.v3.GetToolRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3366,7 +3735,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.GetWebhookRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetToolRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3375,7 +3744,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata", + "name": "com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3384,7 +3753,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3393,7 +3762,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest", + "name": "com.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3402,7 +3771,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3411,7 +3780,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest$MergeOption", + "name": "com.google.cloud.dialogflow.cx.v3.GetVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3420,7 +3789,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse", + "name": "com.google.cloud.dialogflow.cx.v3.GetVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3429,7 +3798,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.GetWebhookRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3438,7 +3807,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$ConflictingResources", + "name": "com.google.cloud.dialogflow.cx.v3.GetWebhookRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3447,7 +3816,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$ConflictingResources$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Handler", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3456,7 +3825,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Handler$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3465,7 +3834,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Handler$EventHandler", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3474,7 +3843,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowRequest$ImportOption", + "name": "com.google.cloud.dialogflow.cx.v3.Handler$EventHandler$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3483,7 +3852,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowResponse", + "name": "com.google.cloud.dialogflow.cx.v3.Handler$LifecycleHandler", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3492,7 +3861,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Handler$LifecycleHandler$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3501,7 +3870,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsMetadata", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3510,7 +3879,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3519,7 +3888,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3528,7 +3897,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3537,7 +3906,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsRequest$MergeOption", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest$MergeOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3546,7 +3915,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3555,7 +3924,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3564,7 +3933,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsResponse$ConflictingResources", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$ConflictingResources", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3573,7 +3942,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsResponse$ConflictingResources$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$ConflictingResources$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3582,7 +3951,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportStrategy", + "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3591,7 +3960,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata", + "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3600,7 +3969,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowRequest$ImportOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3609,7 +3978,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3618,7 +3987,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3627,7 +3996,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3636,7 +4005,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3645,7 +4014,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.InlineDestination", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3654,7 +4023,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.InlineDestination$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3663,7 +4032,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.InlineSource", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsRequest$MergeOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3672,7 +4041,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.InlineSource$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3681,7 +4050,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.InputAudioConfig", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3690,7 +4059,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.InputAudioConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsResponse$ConflictingResources", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3699,7 +4068,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Intent", + "name": "com.google.cloud.dialogflow.cx.v3.ImportIntentsResponse$ConflictingResources$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3708,7 +4077,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Intent$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3717,7 +4086,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Intent$Parameter", + "name": "com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3726,7 +4095,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Intent$Parameter$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3735,7 +4104,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Intent$TrainingPhrase", + "name": "com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3744,7 +4113,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Intent$TrainingPhrase$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse$ConflictingResources", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3753,7 +4122,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Intent$TrainingPhrase$Part", + "name": "com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse$ConflictingResources$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3762,7 +4131,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Intent$TrainingPhrase$Part$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportStrategy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3771,7 +4140,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.IntentCoverage", + "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3780,7 +4149,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.IntentCoverage$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3789,7 +4158,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.IntentCoverage$Intent", + "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3798,7 +4167,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.IntentCoverage$Intent$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3807,7 +4176,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.IntentInput", + "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3816,7 +4185,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.IntentInput$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3825,7 +4194,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.IntentView", + "name": "com.google.cloud.dialogflow.cx.v3.InlineDestination", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3834,7 +4203,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings", + "name": "com.google.cloud.dialogflow.cx.v3.InlineDestination$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3843,7 +4212,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.InlineSchema", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3852,7 +4221,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.LanguageInfo", + "name": "com.google.cloud.dialogflow.cx.v3.InlineSchema$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3861,7 +4230,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.LanguageInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.InlineSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3870,7 +4239,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.InlineSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3879,7 +4248,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.InputAudioConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3888,7 +4257,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.InputAudioConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3897,7 +4266,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Intent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3906,7 +4275,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListChangelogsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Intent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3915,7 +4284,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListChangelogsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Intent$Parameter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3924,7 +4293,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListChangelogsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.Intent$Parameter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3933,7 +4302,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListChangelogsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Intent$TrainingPhrase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3942,7 +4311,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Intent$TrainingPhrase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3951,7 +4320,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Intent$TrainingPhrase$Part", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3960,7 +4329,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.Intent$TrainingPhrase$Part$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3969,7 +4338,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.IntentCoverage", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3978,7 +4347,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.IntentCoverage$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3987,7 +4356,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.IntentCoverage$Intent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3996,7 +4365,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.IntentCoverage$Intent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4005,7 +4374,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.IntentInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4014,7 +4383,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest", + "name": "com.google.cloud.dialogflow.cx.v3.IntentInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4023,7 +4392,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.IntentView", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4032,7 +4401,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse", + "name": "com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4041,7 +4410,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4050,7 +4419,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.LanguageInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4059,7 +4428,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.LanguageInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4068,7 +4437,205 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListAgentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListChangelogsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListChangelogsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListChangelogsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListChangelogsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4086,7 +4653,880 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ListExamplesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListExamplesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListExamplesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListExamplesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListFlowsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListFlowsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListFlowsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListFlowsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListIntentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListIntentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListIntentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListIntentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPagesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPagesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPagesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPagesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest$TestCaseView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListToolsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListToolsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListToolsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListToolsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListVersionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListVersionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListVersionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListVersionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListWebhooksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListWebhooksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListWebhooksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ListWebhooksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.LlmModelSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.LlmModelSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.LoadVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.LoadVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Match", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Match$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Match$MatchType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.MatchIntentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.MatchIntentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.MatchIntentResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.MatchIntentResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.NluSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.NluSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.NluSettings$ModelTrainingMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.NluSettings$ModelType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.OutputAudioConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.OutputAudioConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.OutputAudioEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.OutputState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Page", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Page$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.PageInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4095,7 +5535,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListExperimentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo$ParameterInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4104,7 +5544,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo$ParameterInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4113,7 +5553,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListExperimentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo$ParameterInfo$ParameterState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4122,7 +5562,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListFlowsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ParameterDefinition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4131,7 +5571,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListFlowsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ParameterDefinition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4140,7 +5580,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListFlowsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ParameterDefinition$ParameterType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4149,7 +5589,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListFlowsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Phrase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4158,7 +5598,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Phrase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4167,7 +5607,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Playbook", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4176,7 +5616,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.Playbook$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4185,7 +5625,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Playbook$Instruction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4194,7 +5634,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListIntentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Playbook$Instruction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4203,7 +5643,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListIntentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Playbook$PlaybookType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4212,7 +5652,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListIntentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.Playbook$Step", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4221,7 +5661,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListIntentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Playbook$Step$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4230,7 +5670,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListPagesRequest", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4239,7 +5679,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListPagesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4248,7 +5688,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListPagesResponse", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4257,7 +5697,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListPagesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4266,7 +5706,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookInvocation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4275,7 +5715,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookInvocation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4284,7 +5724,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookOutput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4293,7 +5733,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookOutput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4302,7 +5742,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookTransition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4311,7 +5751,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookTransition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4320,7 +5760,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookVersion", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4329,7 +5769,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.PlaybookVersion$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4338,7 +5778,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.QueryInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4347,7 +5787,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.QueryInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4356,7 +5796,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.QueryParameters", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4365,7 +5805,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.QueryParameters$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4374,7 +5814,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest", + "name": "com.google.cloud.dialogflow.cx.v3.QueryResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4383,7 +5823,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.QueryResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4392,7 +5832,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesRequest$TestCaseView", + "name": "com.google.cloud.dialogflow.cx.v3.ResourceName", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4401,7 +5841,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ResourceName$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4410,7 +5850,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTestCasesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4419,7 +5859,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4428,7 +5868,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$ConversationSuccess", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4437,7 +5877,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$ConversationSuccess$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4446,7 +5886,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$EndInteraction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4455,7 +5895,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListVersionsRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$EndInteraction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4464,7 +5904,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListVersionsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$KnowledgeInfoCard", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4473,7 +5913,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListVersionsResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$KnowledgeInfoCard$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4482,7 +5922,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListVersionsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$LiveAgentHandoff", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4491,7 +5931,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListWebhooksRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$LiveAgentHandoff$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4500,7 +5940,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListWebhooksRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$MixedAudio", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4509,7 +5949,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListWebhooksResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$MixedAudio$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4518,7 +5958,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ListWebhooksResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$MixedAudio$Segment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4527,7 +5967,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.LoadVersionRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$MixedAudio$Segment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4536,7 +5976,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.LoadVersionRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$OutputAudioText", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4545,7 +5985,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$OutputAudioText$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4554,7 +5994,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$PlayAudio", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4563,7 +6003,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$PlayAudio$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4572,7 +6012,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$ResponseType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4581,7 +6021,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Match", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$TelephonyTransferCall", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4590,7 +6030,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Match$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$TelephonyTransferCall$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4599,7 +6039,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Match$MatchType", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$Text", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4608,7 +6048,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.MatchIntentRequest", + "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$Text$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4617,7 +6057,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.MatchIntentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4626,7 +6066,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.MatchIntentResponse", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4635,7 +6075,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.MatchIntentResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest$GitSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4644,7 +6084,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.NluSettings", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest$GitSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4653,7 +6093,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.NluSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest$RestoreOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4662,7 +6102,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.NluSettings$ModelTrainingMode", + "name": "com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4671,7 +6111,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.NluSettings$ModelType", + "name": "com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4680,7 +6120,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.OutputAudioConfig", + "name": "com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4689,7 +6129,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.OutputAudioConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4698,7 +6138,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.OutputAudioEncoding", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4707,7 +6147,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Page", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4716,7 +6156,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Page$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4725,7 +6165,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.PageInfo", + "name": "com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4734,7 +6174,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RolloutConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4743,7 +6183,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo", + "name": "com.google.cloud.dialogflow.cx.v3.RolloutConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4752,7 +6192,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RolloutConfig$RolloutStep", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4761,7 +6201,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo$ParameterInfo", + "name": "com.google.cloud.dialogflow.cx.v3.RolloutConfig$RolloutStep$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4770,7 +6210,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo$ParameterInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RolloutState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4779,7 +6219,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.PageInfo$FormInfo$ParameterInfo$ParameterState", + "name": "com.google.cloud.dialogflow.cx.v3.RolloutState$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4788,7 +6228,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Phrase", + "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4797,7 +6237,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.Phrase$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4806,7 +6246,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.QueryInput", + "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4815,7 +6255,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.QueryInput$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4824,7 +6264,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.QueryParameters", + "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4833,7 +6273,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.QueryParameters$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4842,7 +6282,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.QueryResult", + "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4851,7 +6291,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.QueryResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4860,7 +6300,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResourceName", + "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4869,7 +6309,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResourceName$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4878,7 +6318,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage", + "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4887,7 +6327,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4896,7 +6336,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$ConversationSuccess", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4905,7 +6345,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$ConversationSuccess$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4914,7 +6354,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$EndInteraction", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Phrase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4923,7 +6363,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$EndInteraction$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Phrase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4932,7 +6372,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$KnowledgeInfoCard", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$PhraseMatchStrategy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4941,7 +6381,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$KnowledgeInfoCard$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$PromptSecuritySettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4950,7 +6390,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$LiveAgentHandoff", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$PromptSecuritySettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4959,7 +6399,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$LiveAgentHandoff$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$RaiSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4968,7 +6408,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$MixedAudio", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$RaiSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4977,7 +6417,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$MixedAudio$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$RaiSettings$CategoryFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4986,7 +6426,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$MixedAudio$Segment", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$RaiSettings$CategoryFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4995,7 +6435,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$MixedAudio$Segment$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$RaiSettings$SafetyCategory", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5004,7 +6444,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$OutputAudioText", + "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$RaiSettings$SafetyFilterLevel", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5013,7 +6453,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$OutputAudioText$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SearchConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5022,7 +6462,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$PlayAudio", + "name": "com.google.cloud.dialogflow.cx.v3.SearchConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5031,7 +6471,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$PlayAudio$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5040,7 +6480,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$ResponseType", + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$AudioExportSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5049,7 +6489,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$TelephonyTransferCall", + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$AudioExportSettings$AudioFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5058,7 +6498,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$TelephonyTransferCall$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$AudioExportSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5067,7 +6507,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$Text", + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5076,7 +6516,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.ResponseMessage$Text$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$InsightsExportSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5085,7 +6525,70 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest", + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$InsightsExportSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$PurgeDataType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$RedactionScope", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$RedactionStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$RetentionStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.SessionEntityType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5094,7 +6597,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SessionEntityType$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5103,7 +6606,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest$GitSource", + "name": "com.google.cloud.dialogflow.cx.v3.SessionEntityType$EntityOverrideMode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5112,7 +6615,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest$GitSource$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SessionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5121,7 +6624,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RestoreAgentRequest$RestoreOption", + "name": "com.google.cloud.dialogflow.cx.v3.SessionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5130,7 +6633,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RolloutConfig", + "name": "com.google.cloud.dialogflow.cx.v3.SpeechModelVariant", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5139,7 +6642,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RolloutConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SpeechToTextSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5148,7 +6651,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RolloutConfig$RolloutStep", + "name": "com.google.cloud.dialogflow.cx.v3.SpeechToTextSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5157,7 +6660,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RolloutConfig$RolloutStep$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SpeechWordInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5166,7 +6669,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RolloutState", + "name": "com.google.cloud.dialogflow.cx.v3.SpeechWordInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5175,7 +6678,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RolloutState$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SsmlVoiceGender", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5184,7 +6687,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata", + "name": "com.google.cloud.dialogflow.cx.v3.StartExperimentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5193,7 +6696,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.StartExperimentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5202,7 +6705,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest", + "name": "com.google.cloud.dialogflow.cx.v3.StopExperimentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5211,7 +6714,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.StopExperimentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5220,7 +6723,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse", + "name": "com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5229,7 +6732,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5238,7 +6741,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata", + "name": "com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5247,7 +6750,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5256,7 +6759,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest", + "name": "com.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5265,7 +6768,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5274,7 +6777,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse", + "name": "com.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult$MessageType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5283,7 +6786,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.RunTestCaseResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5292,7 +6795,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings", + "name": "com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5301,7 +6804,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5310,7 +6813,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Phrase", + "name": "com.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5319,7 +6822,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SafetySettings$Phrase$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.TestCase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5328,7 +6831,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SearchConfig", + "name": "com.google.cloud.dialogflow.cx.v3.TestCase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5337,7 +6840,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SearchConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.TestCaseError", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5346,7 +6849,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings", + "name": "com.google.cloud.dialogflow.cx.v3.TestCaseError$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5355,7 +6858,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$AudioExportSettings", + "name": "com.google.cloud.dialogflow.cx.v3.TestCaseResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5364,7 +6867,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$AudioExportSettings$AudioFormat", + "name": "com.google.cloud.dialogflow.cx.v3.TestCaseResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5373,7 +6876,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$AudioExportSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.TestConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5382,7 +6885,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.TestConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5391,7 +6894,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$InsightsExportSettings", + "name": "com.google.cloud.dialogflow.cx.v3.TestError", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5400,7 +6903,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$InsightsExportSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.TestError$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5409,7 +6912,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$PurgeDataType", + "name": "com.google.cloud.dialogflow.cx.v3.TestResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5418,7 +6921,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$RedactionScope", + "name": "com.google.cloud.dialogflow.cx.v3.TestRunDifference", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5427,7 +6930,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$RedactionStrategy", + "name": "com.google.cloud.dialogflow.cx.v3.TestRunDifference$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5436,7 +6939,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SecuritySettings$RetentionStrategy", + "name": "com.google.cloud.dialogflow.cx.v3.TestRunDifference$DiffType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5445,7 +6948,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult", + "name": "com.google.cloud.dialogflow.cx.v3.TextInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5454,7 +6957,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.TextInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5463,7 +6966,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SessionEntityType", + "name": "com.google.cloud.dialogflow.cx.v3.TextToSpeechSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5472,7 +6975,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SessionEntityType$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.TextToSpeechSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5481,7 +6984,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SessionEntityType$EntityOverrideMode", + "name": "com.google.cloud.dialogflow.cx.v3.Tool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5490,7 +6993,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SessionInfo", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5499,7 +7002,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SessionInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$ApiKeyConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5508,7 +7011,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SpeechModelVariant", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$ApiKeyConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5517,7 +7020,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SpeechToTextSettings", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$BearerTokenConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5526,7 +7029,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SpeechToTextSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$BearerTokenConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5535,7 +7038,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SpeechWordInfo", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5544,7 +7047,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SpeechWordInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$OAuthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5553,7 +7056,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SsmlVoiceGender", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$OAuthConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5562,7 +7065,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StartExperimentRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$OAuthConfig$OauthGrantType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5571,7 +7074,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StartExperimentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$RequestLocation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5580,7 +7083,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StopExperimentRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$ServiceAccountAuthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5589,7 +7092,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StopExperimentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$ServiceAccountAuthConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5598,7 +7101,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$ServiceAgentAuthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5607,7 +7110,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$ServiceAgentAuthConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5616,7 +7119,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Authentication$ServiceAgentAuthConfig$ServiceAgentAuth", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5625,7 +7128,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5634,7 +7137,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$DataStoreTool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5643,7 +7146,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$DataStoreTool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5652,7 +7155,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult$MessageType", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$DataStoreTool$FallbackPrompt", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5661,7 +7164,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$DataStoreTool$FallbackPrompt$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5670,7 +7173,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$FunctionTool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5679,7 +7182,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$FunctionTool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5688,7 +7191,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$OpenApiTool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5697,7 +7200,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestCase", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$OpenApiTool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5706,7 +7209,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestCase$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$ServiceDirectoryConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5715,7 +7218,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestCaseError", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$ServiceDirectoryConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5724,7 +7227,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestCaseError$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$TLSConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5733,7 +7236,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestCaseResult", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$TLSConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5742,7 +7245,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestCaseResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$TLSConfig$CACert", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5751,7 +7254,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestConfig", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$TLSConfig$CACert$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5760,7 +7263,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.Tool$ToolType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5769,7 +7272,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestError", + "name": "com.google.cloud.dialogflow.cx.v3.ToolCall", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5778,7 +7281,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestError$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ToolCall$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5787,7 +7290,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestResult", + "name": "com.google.cloud.dialogflow.cx.v3.ToolCallResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5796,7 +7299,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestRunDifference", + "name": "com.google.cloud.dialogflow.cx.v3.ToolCallResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5805,7 +7308,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestRunDifference$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ToolCallResult$Error", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5814,7 +7317,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TestRunDifference$DiffType", + "name": "com.google.cloud.dialogflow.cx.v3.ToolCallResult$Error$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5823,7 +7326,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TextInput", + "name": "com.google.cloud.dialogflow.cx.v3.ToolUse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5832,7 +7335,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TextInput$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ToolUse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5841,7 +7344,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TextToSpeechSettings", + "name": "com.google.cloud.dialogflow.cx.v3.ToolVersion", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5850,7 +7353,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3.TextToSpeechSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3.ToolVersion$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6020,6 +7523,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.TypeSchema", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.TypeSchema$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.TypeSchema$SchemaReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.TypeSchema$SchemaReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.UpdateAgentRequest", "queryAllDeclaredConstructors": true, @@ -6074,6 +7613,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest", "queryAllDeclaredConstructors": true, @@ -6182,6 +7739,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest", "queryAllDeclaredConstructors": true, @@ -6236,6 +7811,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UpdateToolRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UpdateToolRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest", "queryAllDeclaredConstructors": true, @@ -6290,6 +7883,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UserUtterance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.UserUtterance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.ValidateAgentRequest", "queryAllDeclaredConstructors": true, @@ -6524,6 +8135,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Webhook$GenericWebService$SecretVersionHeaderValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Webhook$GenericWebService$SecretVersionHeaderValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Webhook$GenericWebService$ServiceAccountAuthConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.Webhook$GenericWebService$ServiceAccountAuthConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.Webhook$GenericWebService$ServiceAgentAuth", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientHttpJsonTest.java index 586f6fe1b59e..6fc0ff638766 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientHttpJsonTest.java @@ -198,7 +198,6 @@ public void getAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -266,7 +265,6 @@ public void getAgentTest2() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -334,7 +332,6 @@ public void createAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -404,7 +401,6 @@ public void createAgentTest2() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -474,7 +470,6 @@ public void updateAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -504,7 +499,6 @@ public void updateAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -560,7 +554,6 @@ public void updateAgentExceptionTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -939,6 +932,7 @@ public void getGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -993,6 +987,7 @@ public void getGenerativeSettingsTest2() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1047,6 +1042,7 @@ public void updateGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1059,6 +1055,7 @@ public void updateGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1098,6 +1095,7 @@ public void updateGenerativeSettingsExceptionTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateGenerativeSettings(generativeSettings, updateMask); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java index c7eb77195ff4..9b4bd2940ff3 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java @@ -194,7 +194,6 @@ public void getAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -256,7 +255,6 @@ public void getAgentTest2() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -318,7 +316,6 @@ public void createAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -383,7 +380,6 @@ public void createAgentTest2() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -448,7 +444,6 @@ public void updateAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -830,6 +825,7 @@ public void getGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -880,6 +876,7 @@ public void getGenerativeSettingsTest2() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -928,6 +925,7 @@ public void updateGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExamplesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExamplesClientHttpJsonTest.java new file mode 100644 index 000000000000..bbf66dfa6930 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExamplesClientHttpJsonTest.java @@ -0,0 +1,711 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.dialogflow.cx.v3.stub.HttpJsonExamplesStub; +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.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ExamplesClientHttpJsonTest { + private static MockHttpService mockService; + private static ExamplesClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonExamplesStub.getMethodDescriptors(), ExamplesSettings.getDefaultEndpoint()); + ExamplesSettings settings = + ExamplesSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ExamplesSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ExamplesClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + + Example actualResponse = client.createExample(parent, example); + 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 createExampleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + client.createExample(parent, example); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createExampleTest2() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + Example example = Example.newBuilder().build(); + + Example actualResponse = client.createExample(parent, example); + 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 createExampleExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + Example example = Example.newBuilder().build(); + client.createExample(parent, example); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExampleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + + client.deleteExample(name); + + 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 deleteExampleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + client.deleteExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExampleTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7619/locations/location-7619/agents/agent-7619/playbooks/playbook-7619/examples/example-7619"; + + client.deleteExample(name); + + 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 deleteExampleExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7619/locations/location-7619/agents/agent-7619/playbooks/playbook-7619/examples/example-7619"; + client.deleteExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExamplesTest() throws Exception { + Example responsesElement = Example.newBuilder().build(); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken("") + .addAllExamples(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + ListExamplesPagedResponse pagedListResponse = client.listExamples(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + 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 listExamplesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.listExamples(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExamplesTest2() throws Exception { + Example responsesElement = Example.newBuilder().build(); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken("") + .addAllExamples(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + + ListExamplesPagedResponse pagedListResponse = client.listExamples(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + 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 listExamplesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + client.listExamples(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + + Example actualResponse = client.getExample(name); + 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 getExampleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + client.getExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExampleTest2() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7619/locations/location-7619/agents/agent-7619/playbooks/playbook-7619/examples/example-7619"; + + Example actualResponse = client.getExample(name); + 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 getExampleExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7619/locations/location-7619/agents/agent-7619/playbooks/playbook-7619/examples/example-7619"; + client.getExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + Example example = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Example actualResponse = client.updateExample(example, updateMask); + 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 updateExampleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Example example = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateExample(example, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + 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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + 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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExamplesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExamplesClientTest.java new file mode 100644 index 000000000000..044dd8efa6d8 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExamplesClientTest.java @@ -0,0 +1,614 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +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.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.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ExamplesClientTest { + private static MockExamples mockExamples; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ExamplesClient client; + + @BeforeClass + public static void startStaticServer() { + mockExamples = new MockExamples(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockExamples, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ExamplesSettings settings = + ExamplesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ExamplesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + + Example actualResponse = client.createExample(parent, example); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExampleRequest actualRequest = ((CreateExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(example, actualRequest.getExample()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + client.createExample(parent, example); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createExampleTest2() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Example example = Example.newBuilder().build(); + + Example actualResponse = client.createExample(parent, example); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExampleRequest actualRequest = ((CreateExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(example, actualRequest.getExample()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExampleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + String parent = "parent-995424086"; + Example example = Example.newBuilder().build(); + client.createExample(parent, example); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExampleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockExamples.addResponse(expectedResponse); + + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + + client.deleteExample(name); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExampleRequest actualRequest = ((DeleteExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + client.deleteExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExampleTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockExamples.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteExample(name); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExampleRequest actualRequest = ((DeleteExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExampleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + String name = "name3373707"; + client.deleteExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExamplesTest() throws Exception { + Example responsesElement = Example.newBuilder().build(); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken("") + .addAllExamples(Arrays.asList(responsesElement)) + .build(); + mockExamples.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + ListExamplesPagedResponse pagedListResponse = client.listExamples(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExamplesRequest actualRequest = ((ListExamplesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExamplesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.listExamples(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExamplesTest2() throws Exception { + Example responsesElement = Example.newBuilder().build(); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken("") + .addAllExamples(Arrays.asList(responsesElement)) + .build(); + mockExamples.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListExamplesPagedResponse pagedListResponse = client.listExamples(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExamplesRequest actualRequest = ((ListExamplesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExamplesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + String parent = "parent-995424086"; + client.listExamples(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + + Example actualResponse = client.getExample(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExampleRequest actualRequest = ((GetExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + client.getExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExampleTest2() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + String name = "name3373707"; + + Example actualResponse = client.getExample(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExampleRequest actualRequest = ((GetExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExampleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + String name = "name3373707"; + client.getExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + Example example = Example.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Example actualResponse = client.updateExample(example, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateExampleRequest actualRequest = ((UpdateExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(example, actualRequest.getExample()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + Example example = Example.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateExample(example, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientHttpJsonTest.java index 792caefce098..060baad10d5c 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientHttpJsonTest.java @@ -100,6 +100,8 @@ public void createFlowTest() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -156,6 +158,8 @@ public void createFlowTest2() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -393,6 +397,8 @@ public void getFlowTest() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -447,6 +453,8 @@ public void getFlowTest2() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -502,6 +510,8 @@ public void updateFlowTest() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -518,6 +528,8 @@ public void updateFlowTest() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -560,6 +572,8 @@ public void updateFlowExceptionTest() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java index 5c1950c4b612..07f955cedd9c 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java @@ -107,6 +107,8 @@ public void createFlowTest() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -158,6 +160,8 @@ public void createFlowTest2() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -365,6 +369,8 @@ public void getFlowTest() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -413,6 +419,8 @@ public void getFlowTest2() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); @@ -461,6 +469,8 @@ public void updateFlowTest() throws Exception { .setNluSettings(NluSettings.newBuilder().build()) .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .setKnowledgeConnectorSettings(KnowledgeConnectorSettings.newBuilder().build()) + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) .setMultiLanguageSettings(Flow.MultiLanguageSettings.newBuilder().build()) .setLocked(true) .build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/GeneratorsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/GeneratorsClientHttpJsonTest.java index b84e518cd5bc..829b89875327 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/GeneratorsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/GeneratorsClientHttpJsonTest.java @@ -193,6 +193,7 @@ public void getGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -242,6 +243,7 @@ public void getGeneratorTest2() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -293,6 +295,7 @@ public void createGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -344,6 +347,7 @@ public void createGeneratorTest2() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -395,6 +399,7 @@ public void updateGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -406,6 +411,7 @@ public void updateGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -443,6 +449,7 @@ public void updateGeneratorExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.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/v3/GeneratorsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/GeneratorsClientTest.java index b8fdddb81544..4924dd793e8b 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/GeneratorsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/GeneratorsClientTest.java @@ -188,6 +188,7 @@ public void getGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); @@ -231,6 +232,7 @@ public void getGeneratorTest2() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); @@ -274,6 +276,7 @@ public void createGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); @@ -320,6 +323,7 @@ public void createGeneratorTest2() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); @@ -366,6 +370,7 @@ public void updateGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .setModelParameter(Generator.ModelParameter.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExamples.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExamples.java new file mode 100644 index 000000000000..51039e541f85 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExamples.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockExamples implements MockGrpcService { + private final MockExamplesImpl serviceImpl; + + public MockExamples() { + serviceImpl = new MockExamplesImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExamplesImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExamplesImpl.java new file mode 100644 index 000000000000..3f7e8553cbd5 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockExamplesImpl.java @@ -0,0 +1,164 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3.ExamplesGrpc.ExamplesImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockExamplesImpl extends ExamplesImplBase { + private List requests; + private Queue responses; + + public MockExamplesImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createExample( + CreateExampleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Example) { + requests.add(request); + responseObserver.onNext(((Example) 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 CreateExample, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Example.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteExample(DeleteExampleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 DeleteExample, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listExamples( + ListExamplesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListExamplesResponse) { + requests.add(request); + responseObserver.onNext(((ListExamplesResponse) 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 ListExamples, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListExamplesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getExample(GetExampleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Example) { + requests.add(request); + responseObserver.onNext(((Example) 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 GetExample, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Example.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateExample( + UpdateExampleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Example) { + requests.add(request); + responseObserver.onNext(((Example) 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 UpdateExample, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Example.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPlaybooks.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPlaybooks.java new file mode 100644 index 000000000000..f513d93086db --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPlaybooks.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPlaybooks implements MockGrpcService { + private final MockPlaybooksImpl serviceImpl; + + public MockPlaybooks() { + serviceImpl = new MockPlaybooksImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPlaybooksImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPlaybooksImpl.java new file mode 100644 index 000000000000..f8fa7f24b6b7 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockPlaybooksImpl.java @@ -0,0 +1,319 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3.PlaybooksGrpc.PlaybooksImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPlaybooksImpl extends PlaybooksImplBase { + private List requests; + private Queue responses; + + public MockPlaybooksImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createPlaybook( + CreatePlaybookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Playbook) { + requests.add(request); + responseObserver.onNext(((Playbook) 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 CreatePlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Playbook.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePlaybook( + DeletePlaybookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 DeletePlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPlaybooks( + ListPlaybooksRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPlaybooksResponse) { + requests.add(request); + responseObserver.onNext(((ListPlaybooksResponse) 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 ListPlaybooks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPlaybooksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPlaybook(GetPlaybookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Playbook) { + requests.add(request); + responseObserver.onNext(((Playbook) 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 GetPlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Playbook.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void exportPlaybook( + ExportPlaybookRequest 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 ExportPlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importPlaybook( + ImportPlaybookRequest 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 ImportPlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePlaybook( + UpdatePlaybookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Playbook) { + requests.add(request); + responseObserver.onNext(((Playbook) 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 UpdatePlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Playbook.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createPlaybookVersion( + CreatePlaybookVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PlaybookVersion) { + requests.add(request); + responseObserver.onNext(((PlaybookVersion) 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 CreatePlaybookVersion, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + PlaybookVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPlaybookVersion( + GetPlaybookVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PlaybookVersion) { + requests.add(request); + responseObserver.onNext(((PlaybookVersion) 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 GetPlaybookVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PlaybookVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void restorePlaybookVersion( + RestorePlaybookVersionRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RestorePlaybookVersionResponse) { + requests.add(request); + responseObserver.onNext(((RestorePlaybookVersionResponse) 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 RestorePlaybookVersion, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + RestorePlaybookVersionResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPlaybookVersions( + ListPlaybookVersionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPlaybookVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListPlaybookVersionsResponse) 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 ListPlaybookVersions, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListPlaybookVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePlaybookVersion( + DeletePlaybookVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 DeletePlaybookVersion, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTools.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTools.java new file mode 100644 index 000000000000..5c7504cd7eef --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockTools.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockTools implements MockGrpcService { + private final MockToolsImpl serviceImpl; + + public MockTools() { + serviceImpl = new MockToolsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockToolsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockToolsImpl.java new file mode 100644 index 000000000000..359daec867b8 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockToolsImpl.java @@ -0,0 +1,268 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3.ToolsGrpc.ToolsImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockToolsImpl extends ToolsImplBase { + private List requests; + private Queue responses; + + public MockToolsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createTool(CreateToolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Tool) { + requests.add(request); + responseObserver.onNext(((Tool) 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 CreateTool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Tool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTools( + ListToolsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListToolsResponse) { + requests.add(request); + responseObserver.onNext(((ListToolsResponse) 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 ListTools, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListToolsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTool(GetToolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Tool) { + requests.add(request); + responseObserver.onNext(((Tool) 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 GetTool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Tool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTool(UpdateToolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Tool) { + requests.add(request); + responseObserver.onNext(((Tool) 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 UpdateTool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Tool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteTool(DeleteToolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 DeleteTool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listToolVersions( + ListToolVersionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListToolVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListToolVersionsResponse) 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 ListToolVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListToolVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createToolVersion( + CreateToolVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ToolVersion) { + requests.add(request); + responseObserver.onNext(((ToolVersion) 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 CreateToolVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ToolVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getToolVersion( + GetToolVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ToolVersion) { + requests.add(request); + responseObserver.onNext(((ToolVersion) 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 GetToolVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ToolVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteToolVersion( + DeleteToolVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 DeleteToolVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void restoreToolVersion( + RestoreToolVersionRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RestoreToolVersionResponse) { + requests.add(request); + responseObserver.onNext(((RestoreToolVersionResponse) 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 RestoreToolVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RestoreToolVersionResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClientHttpJsonTest.java new file mode 100644 index 000000000000..b1c4289e4bc9 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClientHttpJsonTest.java @@ -0,0 +1,1335 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.dialogflow.cx.v3.stub.HttpJsonPlaybooksStub; +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.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +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; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PlaybooksClientHttpJsonTest { + private static MockHttpService mockService; + private static PlaybooksClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPlaybooksStub.getMethodDescriptors(), PlaybooksSettings.getDefaultEndpoint()); + PlaybooksSettings settings = + PlaybooksSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PlaybooksSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PlaybooksClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createPlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + + Playbook actualResponse = client.createPlaybook(parent, playbook); + 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 createPlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + client.createPlaybook(parent, playbook); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookTest2() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + Playbook playbook = Playbook.newBuilder().build(); + + Playbook actualResponse = client.createPlaybook(parent, playbook); + 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 createPlaybookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + Playbook playbook = Playbook.newBuilder().build(); + client.createPlaybook(parent, playbook); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + client.deletePlaybook(name); + + 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 deletePlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.deletePlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8144/locations/location-8144/agents/agent-8144/playbooks/playbook-8144"; + + client.deletePlaybook(name); + + 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 deletePlaybookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8144/locations/location-8144/agents/agent-8144/playbooks/playbook-8144"; + client.deletePlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybooksTest() throws Exception { + Playbook responsesElement = Playbook.newBuilder().build(); + ListPlaybooksResponse expectedResponse = + ListPlaybooksResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybooks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListPlaybooksPagedResponse pagedListResponse = client.listPlaybooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybooksList().get(0), resources.get(0)); + + 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 listPlaybooksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listPlaybooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybooksTest2() throws Exception { + Playbook responsesElement = Playbook.newBuilder().build(); + ListPlaybooksResponse expectedResponse = + ListPlaybooksResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybooks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + + ListPlaybooksPagedResponse pagedListResponse = client.listPlaybooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybooksList().get(0), resources.get(0)); + + 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 listPlaybooksExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + client.listPlaybooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + Playbook actualResponse = client.getPlaybook(name); + 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 getPlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.getPlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookTest2() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8144/locations/location-8144/agents/agent-8144/playbooks/playbook-8144"; + + Playbook actualResponse = client.getPlaybook(name); + 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 getPlaybookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8144/locations/location-8144/agents/agent-8144/playbooks/playbook-8144"; + client.getPlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportPlaybookTest() throws Exception { + ExportPlaybookResponse expectedResponse = ExportPlaybookResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportPlaybookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportPlaybookRequest request = + ExportPlaybookRequest.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookUri("playbookUri2118184975") + .build(); + + ExportPlaybookResponse actualResponse = client.exportPlaybookAsync(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 exportPlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportPlaybookRequest request = + ExportPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookUri("playbookUri2118184975") + .build(); + client.exportPlaybookAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void importPlaybookTest() throws Exception { + ImportPlaybookResponse expectedResponse = + ImportPlaybookResponse.newBuilder() + .setPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setConflictingResources( + ImportPlaybookResponse.ConflictingResources.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importPlaybookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportPlaybookRequest request = + ImportPlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setImportStrategy(PlaybookImportStrategy.newBuilder().build()) + .build(); + + ImportPlaybookResponse actualResponse = client.importPlaybookAsync(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 importPlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportPlaybookRequest request = + ImportPlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setImportStrategy(PlaybookImportStrategy.newBuilder().build()) + .build(); + client.importPlaybookAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updatePlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Playbook playbook = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Playbook actualResponse = client.updatePlaybook(playbook, updateMask); + 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 updatePlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Playbook playbook = + Playbook.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePlaybook(playbook, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookVersionTest() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + + PlaybookVersion actualResponse = client.createPlaybookVersion(parent, playbookVersion); + 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 createPlaybookVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + client.createPlaybookVersion(parent, playbookVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookVersionTest2() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + + PlaybookVersion actualResponse = client.createPlaybookVersion(parent, playbookVersion); + 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 createPlaybookVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + client.createPlaybookVersion(parent, playbookVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookVersionTest() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + PlaybookVersion actualResponse = client.getPlaybookVersion(name); + 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 getPlaybookVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.getPlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookVersionTest2() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + + PlaybookVersion actualResponse = client.getPlaybookVersion(name); + 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 getPlaybookVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + client.getPlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void restorePlaybookVersionTest() throws Exception { + RestorePlaybookVersionResponse expectedResponse = + RestorePlaybookVersionResponse.newBuilder() + .setPlaybook(Playbook.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + RestorePlaybookVersionResponse actualResponse = client.restorePlaybookVersion(name); + 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 restorePlaybookVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.restorePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void restorePlaybookVersionTest2() throws Exception { + RestorePlaybookVersionResponse expectedResponse = + RestorePlaybookVersionResponse.newBuilder() + .setPlaybook(Playbook.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + + RestorePlaybookVersionResponse actualResponse = client.restorePlaybookVersion(name); + 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 restorePlaybookVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + client.restorePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybookVersionsTest() throws Exception { + PlaybookVersion responsesElement = PlaybookVersion.newBuilder().build(); + ListPlaybookVersionsResponse expectedResponse = + ListPlaybookVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybookVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + ListPlaybookVersionsPagedResponse pagedListResponse = client.listPlaybookVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybookVersionsList().get(0), resources.get(0)); + + 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 listPlaybookVersionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.listPlaybookVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybookVersionsTest2() throws Exception { + PlaybookVersion responsesElement = PlaybookVersion.newBuilder().build(); + ListPlaybookVersionsResponse expectedResponse = + ListPlaybookVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybookVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + + ListPlaybookVersionsPagedResponse pagedListResponse = client.listPlaybookVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybookVersionsList().get(0), resources.get(0)); + + 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 listPlaybookVersionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + client.listPlaybookVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + client.deletePlaybookVersion(name); + + 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 deletePlaybookVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.deletePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + + client.deletePlaybookVersion(name); + + 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 deletePlaybookVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + client.deletePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + 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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + 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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClientTest.java new file mode 100644 index 000000000000..18d546171d2a --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PlaybooksClientTest.java @@ -0,0 +1,1175 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +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; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +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; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PlaybooksClientTest { + private static MockLocations mockLocations; + private static MockPlaybooks mockPlaybooks; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PlaybooksClient client; + + @BeforeClass + public static void startStaticServer() { + mockPlaybooks = new MockPlaybooks(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockPlaybooks, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PlaybooksSettings settings = + PlaybooksSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PlaybooksClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createPlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + + Playbook actualResponse = client.createPlaybook(parent, playbook); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePlaybookRequest actualRequest = ((CreatePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(playbook, actualRequest.getPlaybook()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + client.createPlaybook(parent, playbook); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookTest2() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Playbook playbook = Playbook.newBuilder().build(); + + Playbook actualResponse = client.createPlaybook(parent, playbook); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePlaybookRequest actualRequest = ((CreatePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(playbook, actualRequest.getPlaybook()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPlaybookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String parent = "parent-995424086"; + Playbook playbook = Playbook.newBuilder().build(); + client.createPlaybook(parent, playbook); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + client.deletePlaybook(name); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePlaybookRequest actualRequest = ((DeletePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.deletePlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deletePlaybook(name); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePlaybookRequest actualRequest = ((DeletePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePlaybookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.deletePlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybooksTest() throws Exception { + Playbook responsesElement = Playbook.newBuilder().build(); + ListPlaybooksResponse expectedResponse = + ListPlaybooksResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybooks(Arrays.asList(responsesElement)) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListPlaybooksPagedResponse pagedListResponse = client.listPlaybooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybooksList().get(0), resources.get(0)); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPlaybooksRequest actualRequest = ((ListPlaybooksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPlaybooksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listPlaybooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybooksTest2() throws Exception { + Playbook responsesElement = Playbook.newBuilder().build(); + ListPlaybooksResponse expectedResponse = + ListPlaybooksResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybooks(Arrays.asList(responsesElement)) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPlaybooksPagedResponse pagedListResponse = client.listPlaybooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybooksList().get(0), resources.get(0)); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPlaybooksRequest actualRequest = ((ListPlaybooksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPlaybooksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPlaybooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + Playbook actualResponse = client.getPlaybook(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPlaybookRequest actualRequest = ((GetPlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.getPlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookTest2() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + Playbook actualResponse = client.getPlaybook(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPlaybookRequest actualRequest = ((GetPlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPlaybookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.getPlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportPlaybookTest() throws Exception { + ExportPlaybookResponse expectedResponse = ExportPlaybookResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportPlaybookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPlaybooks.addResponse(resultOperation); + + ExportPlaybookRequest request = + ExportPlaybookRequest.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookUri("playbookUri2118184975") + .build(); + + ExportPlaybookResponse actualResponse = client.exportPlaybookAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportPlaybookRequest actualRequest = ((ExportPlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getPlaybookUri(), actualRequest.getPlaybookUri()); + Assert.assertEquals(request.getDataFormat(), actualRequest.getDataFormat()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportPlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + ExportPlaybookRequest request = + ExportPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookUri("playbookUri2118184975") + .build(); + client.exportPlaybookAsync(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 importPlaybookTest() throws Exception { + ImportPlaybookResponse expectedResponse = + ImportPlaybookResponse.newBuilder() + .setPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setConflictingResources( + ImportPlaybookResponse.ConflictingResources.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importPlaybookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPlaybooks.addResponse(resultOperation); + + ImportPlaybookRequest request = + ImportPlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setImportStrategy(PlaybookImportStrategy.newBuilder().build()) + .build(); + + ImportPlaybookResponse actualResponse = client.importPlaybookAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportPlaybookRequest actualRequest = ((ImportPlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPlaybookUri(), actualRequest.getPlaybookUri()); + Assert.assertEquals(request.getPlaybookContent(), actualRequest.getPlaybookContent()); + Assert.assertEquals(request.getImportStrategy(), actualRequest.getImportStrategy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importPlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + ImportPlaybookRequest request = + ImportPlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setImportStrategy(PlaybookImportStrategy.newBuilder().build()) + .build(); + client.importPlaybookAsync(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 updatePlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .addAllInlineActions(new ArrayList()) + .setCodeBlock(CodeBlock.newBuilder().build()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .addAllHandlers(new ArrayList()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + Playbook playbook = Playbook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Playbook actualResponse = client.updatePlaybook(playbook, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePlaybookRequest actualRequest = ((UpdatePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(playbook, actualRequest.getPlaybook()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + Playbook playbook = Playbook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePlaybook(playbook, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookVersionTest() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + + PlaybookVersion actualResponse = client.createPlaybookVersion(parent, playbookVersion); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePlaybookVersionRequest actualRequest = + ((CreatePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(playbookVersion, actualRequest.getPlaybookVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPlaybookVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + client.createPlaybookVersion(parent, playbookVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookVersionTest2() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String parent = "parent-995424086"; + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + + PlaybookVersion actualResponse = client.createPlaybookVersion(parent, playbookVersion); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePlaybookVersionRequest actualRequest = + ((CreatePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(playbookVersion, actualRequest.getPlaybookVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPlaybookVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String parent = "parent-995424086"; + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + client.createPlaybookVersion(parent, playbookVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookVersionTest() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + PlaybookVersion actualResponse = client.getPlaybookVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPlaybookVersionRequest actualRequest = ((GetPlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPlaybookVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.getPlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookVersionTest2() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + PlaybookVersion actualResponse = client.getPlaybookVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPlaybookVersionRequest actualRequest = ((GetPlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPlaybookVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.getPlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void restorePlaybookVersionTest() throws Exception { + RestorePlaybookVersionResponse expectedResponse = + RestorePlaybookVersionResponse.newBuilder() + .setPlaybook(Playbook.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + RestorePlaybookVersionResponse actualResponse = client.restorePlaybookVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestorePlaybookVersionRequest actualRequest = + ((RestorePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restorePlaybookVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.restorePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void restorePlaybookVersionTest2() throws Exception { + RestorePlaybookVersionResponse expectedResponse = + RestorePlaybookVersionResponse.newBuilder() + .setPlaybook(Playbook.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + RestorePlaybookVersionResponse actualResponse = client.restorePlaybookVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestorePlaybookVersionRequest actualRequest = + ((RestorePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restorePlaybookVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.restorePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybookVersionsTest() throws Exception { + PlaybookVersion responsesElement = PlaybookVersion.newBuilder().build(); + ListPlaybookVersionsResponse expectedResponse = + ListPlaybookVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybookVersions(Arrays.asList(responsesElement)) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + ListPlaybookVersionsPagedResponse pagedListResponse = client.listPlaybookVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybookVersionsList().get(0), resources.get(0)); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPlaybookVersionsRequest actualRequest = + ((ListPlaybookVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPlaybookVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.listPlaybookVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybookVersionsTest2() throws Exception { + PlaybookVersion responsesElement = PlaybookVersion.newBuilder().build(); + ListPlaybookVersionsResponse expectedResponse = + ListPlaybookVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybookVersions(Arrays.asList(responsesElement)) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPlaybookVersionsPagedResponse pagedListResponse = client.listPlaybookVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybookVersionsList().get(0), resources.get(0)); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPlaybookVersionsRequest actualRequest = + ((ListPlaybookVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPlaybookVersionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPlaybookVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + client.deletePlaybookVersion(name); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePlaybookVersionRequest actualRequest = + ((DeletePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePlaybookVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.deletePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deletePlaybookVersion(name); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePlaybookVersionRequest actualRequest = + ((DeletePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePlaybookVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.deletePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java index bc321b2f3739..df265b454cf4 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java @@ -104,6 +104,7 @@ public void detectIntentTest() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); DetectIntentResponse actualResponse = client.detectIntent(request); @@ -141,6 +142,7 @@ public void detectIntentExceptionTest() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); client.detectIntent(request); Assert.fail("No exception raised"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java index 85b8f5eeecf9..edc3e1399511 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java @@ -117,6 +117,7 @@ public void detectIntentTest() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); DetectIntentResponse actualResponse = client.detectIntent(request); @@ -130,6 +131,7 @@ public void detectIntentTest() throws Exception { Assert.assertEquals(request.getQueryParams(), actualRequest.getQueryParams()); Assert.assertEquals(request.getQueryInput(), actualRequest.getQueryInput()); Assert.assertEquals(request.getOutputAudioConfig(), actualRequest.getOutputAudioConfig()); + Assert.assertEquals(request.getResponseView(), actualRequest.getResponseView()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -151,6 +153,7 @@ public void detectIntentExceptionTest() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); client.detectIntent(request); Assert.fail("No exception raised"); @@ -179,6 +182,7 @@ public void serverStreamingDetectIntentTest() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -205,6 +209,7 @@ public void serverStreamingDetectIntentExceptionTest() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -241,6 +246,7 @@ public void streamingDetectIntentTest() throws Exception { .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) .setEnablePartialResponse(true) .setEnableDebuggingInfo(true) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -273,6 +279,7 @@ public void streamingDetectIntentExceptionTest() throws Exception { .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) .setEnablePartialResponse(true) .setEnableDebuggingInfo(true) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ToolsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ToolsClientHttpJsonTest.java new file mode 100644 index 000000000000..100c8ee0070b --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ToolsClientHttpJsonTest.java @@ -0,0 +1,1115 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.dialogflow.cx.v3.stub.HttpJsonToolsStub; +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.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ToolsClientHttpJsonTest { + private static MockHttpService mockService; + private static ToolsClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonToolsStub.getMethodDescriptors(), ToolsSettings.getDefaultEndpoint()); + ToolsSettings settings = + ToolsSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ToolsSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ToolsClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + + Tool actualResponse = client.createTool(parent, tool); + 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 createToolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + client.createTool(parent, tool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createToolTest2() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + Tool tool = Tool.newBuilder().build(); + + Tool actualResponse = client.createTool(parent, tool); + 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 createToolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + Tool tool = Tool.newBuilder().build(); + client.createTool(parent, tool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolsTest() throws Exception { + Tool responsesElement = Tool.newBuilder().build(); + ListToolsResponse expectedResponse = + ListToolsResponse.newBuilder() + .setNextPageToken("") + .addAllTools(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListToolsPagedResponse pagedListResponse = client.listTools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolsList().get(0), resources.get(0)); + + 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 listToolsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listTools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolsTest2() throws Exception { + Tool responsesElement = Tool.newBuilder().build(); + ListToolsResponse expectedResponse = + ListToolsResponse.newBuilder() + .setNextPageToken("") + .addAllTools(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + + ListToolsPagedResponse pagedListResponse = client.listTools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolsList().get(0), resources.get(0)); + + 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 listToolsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + client.listTools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + Tool actualResponse = client.getTool(name); + 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 getToolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.getTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolTest2() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5365/locations/location-5365/agents/agent-5365/tools/tool-5365"; + + Tool actualResponse = client.getTool(name); + 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 getToolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5365/locations/location-5365/agents/agent-5365/tools/tool-5365"; + client.getTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + Tool tool = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Tool actualResponse = client.updateTool(tool, updateMask); + 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 updateToolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Tool tool = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTool(tool, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + client.deleteTool(name); + + 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 deleteToolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.deleteTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5365/locations/location-5365/agents/agent-5365/tools/tool-5365"; + + client.deleteTool(name); + + 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 deleteToolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5365/locations/location-5365/agents/agent-5365/tools/tool-5365"; + client.deleteTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolVersionsTest() throws Exception { + ToolVersion responsesElement = ToolVersion.newBuilder().build(); + ListToolVersionsResponse expectedResponse = + ListToolVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllToolVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + ListToolVersionsPagedResponse pagedListResponse = client.listToolVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolVersionsList().get(0), resources.get(0)); + + 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 listToolVersionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.listToolVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolVersionsTest2() throws Exception { + ToolVersion responsesElement = ToolVersion.newBuilder().build(); + ListToolVersionsResponse expectedResponse = + ListToolVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllToolVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-7158/locations/location-7158/agents/agent-7158/tools/tool-7158"; + + ListToolVersionsPagedResponse pagedListResponse = client.listToolVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolVersionsList().get(0), resources.get(0)); + + 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 listToolVersionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-7158/locations/location-7158/agents/agent-7158/tools/tool-7158"; + client.listToolVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createToolVersionTest() throws Exception { + ToolVersion expectedResponse = + ToolVersion.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setDisplayName("displayName1714148973") + .setTool(Tool.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + + ToolVersion actualResponse = client.createToolVersion(parent, toolVersion); + 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 createToolVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + client.createToolVersion(parent, toolVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createToolVersionTest2() throws Exception { + ToolVersion expectedResponse = + ToolVersion.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setDisplayName("displayName1714148973") + .setTool(Tool.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-7158/locations/location-7158/agents/agent-7158/tools/tool-7158"; + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + + ToolVersion actualResponse = client.createToolVersion(parent, toolVersion); + 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 createToolVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-7158/locations/location-7158/agents/agent-7158/tools/tool-7158"; + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + client.createToolVersion(parent, toolVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolVersionTest() throws Exception { + ToolVersion expectedResponse = + ToolVersion.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setDisplayName("displayName1714148973") + .setTool(Tool.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + + ToolVersion actualResponse = client.getToolVersion(name); + 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 getToolVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + client.getToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolVersionTest2() throws Exception { + ToolVersion expectedResponse = + ToolVersion.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setDisplayName("displayName1714148973") + .setTool(Tool.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3136/locations/location-3136/agents/agent-3136/tools/tool-3136/versions/version-3136"; + + ToolVersion actualResponse = client.getToolVersion(name); + 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 getToolVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3136/locations/location-3136/agents/agent-3136/tools/tool-3136/versions/version-3136"; + client.getToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + + client.deleteToolVersion(name); + + 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 deleteToolVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + client.deleteToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3136/locations/location-3136/agents/agent-3136/tools/tool-3136/versions/version-3136"; + + client.deleteToolVersion(name); + + 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 deleteToolVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3136/locations/location-3136/agents/agent-3136/tools/tool-3136/versions/version-3136"; + client.deleteToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void restoreToolVersionTest() throws Exception { + RestoreToolVersionResponse expectedResponse = + RestoreToolVersionResponse.newBuilder().setTool(Tool.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + + RestoreToolVersionResponse actualResponse = client.restoreToolVersion(name); + 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 restoreToolVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + client.restoreToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void restoreToolVersionTest2() throws Exception { + RestoreToolVersionResponse expectedResponse = + RestoreToolVersionResponse.newBuilder().setTool(Tool.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3136/locations/location-3136/agents/agent-3136/tools/tool-3136/versions/version-3136"; + + RestoreToolVersionResponse actualResponse = client.restoreToolVersion(name); + 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 restoreToolVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3136/locations/location-3136/agents/agent-3136/tools/tool-3136/versions/version-3136"; + client.restoreToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + 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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + 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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ToolsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ToolsClientTest.java new file mode 100644 index 000000000000..ed25f492e7ec --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ToolsClientTest.java @@ -0,0 +1,975 @@ +/* + * Copyright 2026 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3.ToolsClient.ListToolsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +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.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.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ToolsClientTest { + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockTools mockTools; + private LocalChannelProvider channelProvider; + private ToolsClient client; + + @BeforeClass + public static void startStaticServer() { + mockTools = new MockTools(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockTools, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ToolsSettings settings = + ToolsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ToolsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockTools.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + + Tool actualResponse = client.createTool(parent, tool); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateToolRequest actualRequest = ((CreateToolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(tool, actualRequest.getTool()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createToolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + client.createTool(parent, tool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createToolTest2() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockTools.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Tool tool = Tool.newBuilder().build(); + + Tool actualResponse = client.createTool(parent, tool); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateToolRequest actualRequest = ((CreateToolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(tool, actualRequest.getTool()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createToolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String parent = "parent-995424086"; + Tool tool = Tool.newBuilder().build(); + client.createTool(parent, tool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolsTest() throws Exception { + Tool responsesElement = Tool.newBuilder().build(); + ListToolsResponse expectedResponse = + ListToolsResponse.newBuilder() + .setNextPageToken("") + .addAllTools(Arrays.asList(responsesElement)) + .build(); + mockTools.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListToolsPagedResponse pagedListResponse = client.listTools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolsList().get(0), resources.get(0)); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListToolsRequest actualRequest = ((ListToolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listToolsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listTools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolsTest2() throws Exception { + Tool responsesElement = Tool.newBuilder().build(); + ListToolsResponse expectedResponse = + ListToolsResponse.newBuilder() + .setNextPageToken("") + .addAllTools(Arrays.asList(responsesElement)) + .build(); + mockTools.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListToolsPagedResponse pagedListResponse = client.listTools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolsList().get(0), resources.get(0)); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListToolsRequest actualRequest = ((ListToolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listToolsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockTools.addResponse(expectedResponse); + + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + Tool actualResponse = client.getTool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetToolRequest actualRequest = ((GetToolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getToolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.getTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolTest2() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockTools.addResponse(expectedResponse); + + String name = "name3373707"; + + Tool actualResponse = client.getTool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetToolRequest actualRequest = ((GetToolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getToolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String name = "name3373707"; + client.getTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockTools.addResponse(expectedResponse); + + Tool tool = Tool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Tool actualResponse = client.updateTool(tool, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateToolRequest actualRequest = ((UpdateToolRequest) actualRequests.get(0)); + + Assert.assertEquals(tool, actualRequest.getTool()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateToolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + Tool tool = Tool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTool(tool, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTools.addResponse(expectedResponse); + + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + client.deleteTool(name); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteToolRequest actualRequest = ((DeleteToolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteToolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.deleteTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTools.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteTool(name); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteToolRequest actualRequest = ((DeleteToolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteToolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String name = "name3373707"; + client.deleteTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolVersionsTest() throws Exception { + ToolVersion responsesElement = ToolVersion.newBuilder().build(); + ListToolVersionsResponse expectedResponse = + ListToolVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllToolVersions(Arrays.asList(responsesElement)) + .build(); + mockTools.addResponse(expectedResponse); + + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + ListToolVersionsPagedResponse pagedListResponse = client.listToolVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolVersionsList().get(0), resources.get(0)); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListToolVersionsRequest actualRequest = ((ListToolVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listToolVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.listToolVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolVersionsTest2() throws Exception { + ToolVersion responsesElement = ToolVersion.newBuilder().build(); + ListToolVersionsResponse expectedResponse = + ListToolVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllToolVersions(Arrays.asList(responsesElement)) + .build(); + mockTools.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListToolVersionsPagedResponse pagedListResponse = client.listToolVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolVersionsList().get(0), resources.get(0)); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListToolVersionsRequest actualRequest = ((ListToolVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listToolVersionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String parent = "parent-995424086"; + client.listToolVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createToolVersionTest() throws Exception { + ToolVersion expectedResponse = + ToolVersion.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setDisplayName("displayName1714148973") + .setTool(Tool.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockTools.addResponse(expectedResponse); + + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + + ToolVersion actualResponse = client.createToolVersion(parent, toolVersion); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateToolVersionRequest actualRequest = ((CreateToolVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(toolVersion, actualRequest.getToolVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createToolVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + client.createToolVersion(parent, toolVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createToolVersionTest2() throws Exception { + ToolVersion expectedResponse = + ToolVersion.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setDisplayName("displayName1714148973") + .setTool(Tool.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockTools.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + + ToolVersion actualResponse = client.createToolVersion(parent, toolVersion); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateToolVersionRequest actualRequest = ((CreateToolVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(toolVersion, actualRequest.getToolVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createToolVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String parent = "parent-995424086"; + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + client.createToolVersion(parent, toolVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolVersionTest() throws Exception { + ToolVersion expectedResponse = + ToolVersion.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setDisplayName("displayName1714148973") + .setTool(Tool.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockTools.addResponse(expectedResponse); + + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + + ToolVersion actualResponse = client.getToolVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetToolVersionRequest actualRequest = ((GetToolVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getToolVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + client.getToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolVersionTest2() throws Exception { + ToolVersion expectedResponse = + ToolVersion.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setDisplayName("displayName1714148973") + .setTool(Tool.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockTools.addResponse(expectedResponse); + + String name = "name3373707"; + + ToolVersion actualResponse = client.getToolVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetToolVersionRequest actualRequest = ((GetToolVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getToolVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String name = "name3373707"; + client.getToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTools.addResponse(expectedResponse); + + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + + client.deleteToolVersion(name); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteToolVersionRequest actualRequest = ((DeleteToolVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteToolVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + client.deleteToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTools.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteToolVersion(name); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteToolVersionRequest actualRequest = ((DeleteToolVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteToolVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String name = "name3373707"; + client.deleteToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void restoreToolVersionTest() throws Exception { + RestoreToolVersionResponse expectedResponse = + RestoreToolVersionResponse.newBuilder().setTool(Tool.newBuilder().build()).build(); + mockTools.addResponse(expectedResponse); + + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + + RestoreToolVersionResponse actualResponse = client.restoreToolVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreToolVersionRequest actualRequest = ((RestoreToolVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreToolVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + client.restoreToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void restoreToolVersionTest2() throws Exception { + RestoreToolVersionResponse expectedResponse = + RestoreToolVersionResponse.newBuilder().setTool(Tool.newBuilder().build()).build(); + mockTools.addResponse(expectedResponse); + + String name = "name3373707"; + + RestoreToolVersionResponse actualResponse = client.restoreToolVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreToolVersionRequest actualRequest = ((RestoreToolVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreToolVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String name = "name3373707"; + client.restoreToolVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesGrpc.java new file mode 100644 index 000000000000..dd7612076193 --- /dev/null +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExamplesGrpc.java @@ -0,0 +1,926 @@ +/* + * Copyright 2026 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.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example].
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class ExamplesGrpc { + + private ExamplesGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.Examples"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getCreateExampleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateExample", + requestType = com.google.cloud.dialogflow.cx.v3.CreateExampleRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Example.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getCreateExampleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getCreateExampleMethod; + if ((getCreateExampleMethod = ExamplesGrpc.getCreateExampleMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getCreateExampleMethod = ExamplesGrpc.getCreateExampleMethod) == null) { + ExamplesGrpc.getCreateExampleMethod = + getCreateExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("CreateExample")) + .build(); + } + } + } + return getCreateExampleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest, com.google.protobuf.Empty> + getDeleteExampleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteExample", + requestType = com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest, com.google.protobuf.Empty> + getDeleteExampleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest, com.google.protobuf.Empty> + getDeleteExampleMethod; + if ((getDeleteExampleMethod = ExamplesGrpc.getDeleteExampleMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getDeleteExampleMethod = ExamplesGrpc.getDeleteExampleMethod) == null) { + ExamplesGrpc.getDeleteExampleMethod = + getDeleteExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("DeleteExample")) + .build(); + } + } + } + return getDeleteExampleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest, + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse> + getListExamplesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListExamples", + requestType = com.google.cloud.dialogflow.cx.v3.ListExamplesRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListExamplesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest, + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse> + getListExamplesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest, + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse> + getListExamplesMethod; + if ((getListExamplesMethod = ExamplesGrpc.getListExamplesMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getListExamplesMethod = ExamplesGrpc.getListExamplesMethod) == null) { + ExamplesGrpc.getListExamplesMethod = + getListExamplesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListExamples")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("ListExamples")) + .build(); + } + } + } + return getListExamplesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getGetExampleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetExample", + requestType = com.google.cloud.dialogflow.cx.v3.GetExampleRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Example.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getGetExampleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getGetExampleMethod; + if ((getGetExampleMethod = ExamplesGrpc.getGetExampleMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getGetExampleMethod = ExamplesGrpc.getGetExampleMethod) == null) { + ExamplesGrpc.getGetExampleMethod = + getGetExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("GetExample")) + .build(); + } + } + } + return getGetExampleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getUpdateExampleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateExample", + requestType = com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Example.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getUpdateExampleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example> + getUpdateExampleMethod; + if ((getUpdateExampleMethod = ExamplesGrpc.getUpdateExampleMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getUpdateExampleMethod = ExamplesGrpc.getUpdateExampleMethod) == null) { + ExamplesGrpc.getUpdateExampleMethod = + getUpdateExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("UpdateExample")) + .build(); + } + } + } + return getUpdateExampleMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ExamplesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExamplesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesStub(channel, callOptions); + } + }; + return ExamplesStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static ExamplesBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExamplesBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesBlockingV2Stub(channel, callOptions); + } + }; + return ExamplesBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ExamplesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExamplesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesBlockingStub(channel, callOptions); + } + }; + return ExamplesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ExamplesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExamplesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesFutureStub(channel, callOptions); + } + }; + return ExamplesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example].
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + default void createExample( + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateExampleMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + default void deleteExample( + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteExampleMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + default void listExamples( + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListExamplesMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + default void getExample( + com.google.cloud.dialogflow.cx.v3.GetExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetExampleMethod(), responseObserver); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + default void updateExample( + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateExampleMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example].
+   * 
+ */ + public abstract static class ExamplesImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ExamplesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example].
+   * 
+ */ + public static final class ExamplesStub extends io.grpc.stub.AbstractAsyncStub { + private ExamplesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExamplesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + public void createExample( + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateExampleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + public void deleteExample( + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteExampleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + public void listExamples( + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListExamplesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + public void getExample( + com.google.cloud.dialogflow.cx.v3.GetExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetExampleMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + public void updateExample( + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateExampleMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example].
+   * 
+ */ + public static final class ExamplesBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private ExamplesBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExamplesBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Example createExample( + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + public com.google.protobuf.Empty deleteExample( + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListExamplesResponse listExamples( + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListExamplesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Example getExample( + com.google.cloud.dialogflow.cx.v3.GetExampleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Example updateExample( + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateExampleMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example].
+   * 
+ */ + public static final class ExamplesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ExamplesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExamplesBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Example createExample( + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + public com.google.protobuf.Empty deleteExample( + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListExamplesResponse listExamples( + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListExamplesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Example getExample( + com.google.cloud.dialogflow.cx.v3.GetExampleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Example updateExample( + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateExampleMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example].
+   * 
+ */ + public static final class ExamplesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ExamplesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExamplesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Example> + createExample(com.google.cloud.dialogflow.cx.v3.CreateExampleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateExampleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteExample(com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteExampleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse> + listExamples(com.google.cloud.dialogflow.cx.v3.ListExamplesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListExamplesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Example> + getExample(com.google.cloud.dialogflow.cx.v3.GetExampleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetExampleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Example> + updateExample(com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateExampleMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_EXAMPLE = 0; + private static final int METHODID_DELETE_EXAMPLE = 1; + private static final int METHODID_LIST_EXAMPLES = 2; + private static final int METHODID_GET_EXAMPLE = 3; + private static final int METHODID_UPDATE_EXAMPLE = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_EXAMPLE: + serviceImpl.createExample( + (com.google.cloud.dialogflow.cx.v3.CreateExampleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_EXAMPLE: + serviceImpl.deleteExample( + (com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_EXAMPLES: + serviceImpl.listExamples( + (com.google.cloud.dialogflow.cx.v3.ListExamplesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_EXAMPLE: + serviceImpl.getExample( + (com.google.cloud.dialogflow.cx.v3.GetExampleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_EXAMPLE: + serviceImpl.updateExample( + (com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateExampleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example>(service, METHODID_CREATE_EXAMPLE))) + .addMethod( + getDeleteExampleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_EXAMPLE))) + .addMethod( + getListExamplesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest, + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse>( + service, METHODID_LIST_EXAMPLES))) + .addMethod( + getGetExampleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example>(service, METHODID_GET_EXAMPLE))) + .addMethod( + getUpdateExampleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest, + com.google.cloud.dialogflow.cx.v3.Example>(service, METHODID_UPDATE_EXAMPLE))) + .build(); + } + + private abstract static class ExamplesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ExamplesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Examples"); + } + } + + private static final class ExamplesFileDescriptorSupplier extends ExamplesBaseDescriptorSupplier { + ExamplesFileDescriptorSupplier() {} + } + + private static final class ExamplesMethodDescriptorSupplier extends ExamplesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ExamplesMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ExamplesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ExamplesFileDescriptorSupplier()) + .addMethod(getCreateExampleMethod()) + .addMethod(getDeleteExampleMethod()) + .addMethod(getListExamplesMethod()) + .addMethod(getGetExampleMethod()) + .addMethod(getUpdateExampleMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksGrpc.java new file mode 100644 index 000000000000..498e72dac6f6 --- /dev/null +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybooksGrpc.java @@ -0,0 +1,1881 @@ +/* + * Copyright 2026 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.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook].
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class PlaybooksGrpc { + + private PlaybooksGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.Playbooks"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getCreatePlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePlaybook", + requestType = com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Playbook.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getCreatePlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getCreatePlaybookMethod; + if ((getCreatePlaybookMethod = PlaybooksGrpc.getCreatePlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getCreatePlaybookMethod = PlaybooksGrpc.getCreatePlaybookMethod) == null) { + PlaybooksGrpc.getCreatePlaybookMethod = + getCreatePlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreatePlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("CreatePlaybook")) + .build(); + } + } + } + return getCreatePlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest, com.google.protobuf.Empty> + getDeletePlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePlaybook", + requestType = com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest, com.google.protobuf.Empty> + getDeletePlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest, com.google.protobuf.Empty> + getDeletePlaybookMethod; + if ((getDeletePlaybookMethod = PlaybooksGrpc.getDeletePlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getDeletePlaybookMethod = PlaybooksGrpc.getDeletePlaybookMethod) == null) { + PlaybooksGrpc.getDeletePlaybookMethod = + getDeletePlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeletePlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("DeletePlaybook")) + .build(); + } + } + } + return getDeletePlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest, + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse> + getListPlaybooksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPlaybooks", + requestType = com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest, + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse> + getListPlaybooksMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest, + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse> + getListPlaybooksMethod; + if ((getListPlaybooksMethod = PlaybooksGrpc.getListPlaybooksMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getListPlaybooksMethod = PlaybooksGrpc.getListPlaybooksMethod) == null) { + PlaybooksGrpc.getListPlaybooksMethod = + getListPlaybooksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPlaybooks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + .getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("ListPlaybooks")) + .build(); + } + } + } + return getListPlaybooksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getGetPlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPlaybook", + requestType = com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Playbook.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getGetPlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getGetPlaybookMethod; + if ((getGetPlaybookMethod = PlaybooksGrpc.getGetPlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getGetPlaybookMethod = PlaybooksGrpc.getGetPlaybookMethod) == null) { + PlaybooksGrpc.getGetPlaybookMethod = + getGetPlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("GetPlaybook")) + .build(); + } + } + } + return getGetPlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest, com.google.longrunning.Operation> + getExportPlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportPlaybook", + requestType = com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest, com.google.longrunning.Operation> + getExportPlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest, + com.google.longrunning.Operation> + getExportPlaybookMethod; + if ((getExportPlaybookMethod = PlaybooksGrpc.getExportPlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getExportPlaybookMethod = PlaybooksGrpc.getExportPlaybookMethod) == null) { + PlaybooksGrpc.getExportPlaybookMethod = + getExportPlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportPlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("ExportPlaybook")) + .build(); + } + } + } + return getExportPlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest, com.google.longrunning.Operation> + getImportPlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportPlaybook", + requestType = com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest, com.google.longrunning.Operation> + getImportPlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest, + com.google.longrunning.Operation> + getImportPlaybookMethod; + if ((getImportPlaybookMethod = PlaybooksGrpc.getImportPlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getImportPlaybookMethod = PlaybooksGrpc.getImportPlaybookMethod) == null) { + PlaybooksGrpc.getImportPlaybookMethod = + getImportPlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportPlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("ImportPlaybook")) + .build(); + } + } + } + return getImportPlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getUpdatePlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePlaybook", + requestType = com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Playbook.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getUpdatePlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook> + getUpdatePlaybookMethod; + if ((getUpdatePlaybookMethod = PlaybooksGrpc.getUpdatePlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getUpdatePlaybookMethod = PlaybooksGrpc.getUpdatePlaybookMethod) == null) { + PlaybooksGrpc.getUpdatePlaybookMethod = + getUpdatePlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("UpdatePlaybook")) + .build(); + } + } + } + return getUpdatePlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion> + getCreatePlaybookVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePlaybookVersion", + requestType = com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.PlaybookVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion> + getCreatePlaybookVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion> + getCreatePlaybookVersionMethod; + if ((getCreatePlaybookVersionMethod = PlaybooksGrpc.getCreatePlaybookVersionMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getCreatePlaybookVersionMethod = PlaybooksGrpc.getCreatePlaybookVersionMethod) + == null) { + PlaybooksGrpc.getCreatePlaybookVersionMethod = + getCreatePlaybookVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePlaybookVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.PlaybookVersion + .getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("CreatePlaybookVersion")) + .build(); + } + } + } + return getCreatePlaybookVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion> + getGetPlaybookVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPlaybookVersion", + requestType = com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.PlaybookVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion> + getGetPlaybookVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion> + getGetPlaybookVersionMethod; + if ((getGetPlaybookVersionMethod = PlaybooksGrpc.getGetPlaybookVersionMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getGetPlaybookVersionMethod = PlaybooksGrpc.getGetPlaybookVersionMethod) == null) { + PlaybooksGrpc.getGetPlaybookVersionMethod = + getGetPlaybookVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPlaybookVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.PlaybookVersion + .getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("GetPlaybookVersion")) + .build(); + } + } + } + return getGetPlaybookVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse> + getRestorePlaybookVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestorePlaybookVersion", + requestType = com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse> + getRestorePlaybookVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse> + getRestorePlaybookVersionMethod; + if ((getRestorePlaybookVersionMethod = PlaybooksGrpc.getRestorePlaybookVersionMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getRestorePlaybookVersionMethod = PlaybooksGrpc.getRestorePlaybookVersionMethod) + == null) { + PlaybooksGrpc.getRestorePlaybookVersionMethod = + getRestorePlaybookVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RestorePlaybookVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("RestorePlaybookVersion")) + .build(); + } + } + } + return getRestorePlaybookVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest, + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse> + getListPlaybookVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPlaybookVersions", + requestType = com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest, + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse> + getListPlaybookVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest, + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse> + getListPlaybookVersionsMethod; + if ((getListPlaybookVersionsMethod = PlaybooksGrpc.getListPlaybookVersionsMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getListPlaybookVersionsMethod = PlaybooksGrpc.getListPlaybookVersionsMethod) == null) { + PlaybooksGrpc.getListPlaybookVersionsMethod = + getListPlaybookVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPlaybookVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("ListPlaybookVersions")) + .build(); + } + } + } + return getListPlaybookVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest, com.google.protobuf.Empty> + getDeletePlaybookVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePlaybookVersion", + requestType = com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest, com.google.protobuf.Empty> + getDeletePlaybookVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest, + com.google.protobuf.Empty> + getDeletePlaybookVersionMethod; + if ((getDeletePlaybookVersionMethod = PlaybooksGrpc.getDeletePlaybookVersionMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getDeletePlaybookVersionMethod = PlaybooksGrpc.getDeletePlaybookVersionMethod) + == null) { + PlaybooksGrpc.getDeletePlaybookVersionMethod = + getDeletePlaybookVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePlaybookVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("DeletePlaybookVersion")) + .build(); + } + } + } + return getDeletePlaybookVersionMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PlaybooksStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlaybooksStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksStub(channel, callOptions); + } + }; + return PlaybooksStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PlaybooksBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlaybooksBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksBlockingV2Stub(channel, callOptions); + } + }; + return PlaybooksBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PlaybooksBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlaybooksBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksBlockingStub(channel, callOptions); + } + }; + return PlaybooksBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PlaybooksFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlaybooksFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksFutureStub(channel, callOptions); + } + }; + return PlaybooksFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook].
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + default void createPlaybook( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + default void deletePlaybook( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + default void listPlaybooks( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPlaybooksMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + default void getPlaybook( + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports the specified playbook to a binary file.
+     * Note that resources (e.g. examples, tools) that the playbook
+     * references will also be exported.
+     * 
+ */ + default void exportPlaybook( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportPlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Imports the specified playbook to the specified agent from a binary file.
+     * 
+ */ + default void importPlaybook( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportPlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + default void updatePlaybook( + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + default void createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePlaybookVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + default void getPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPlaybookVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook and stores it as the
+     * current playbook draft, returning the playbook with resources updated.
+     * 
+ */ + default void restorePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestorePlaybookVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + default void listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPlaybookVersionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + default void deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePlaybookVersionMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Playbooks. + * + *
+   * Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook].
+   * 
+ */ + public abstract static class PlaybooksImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PlaybooksGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Playbooks. + * + *
+   * Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook].
+   * 
+ */ + public static final class PlaybooksStub extends io.grpc.stub.AbstractAsyncStub { + private PlaybooksStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlaybooksStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + public void createPlaybook( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + public void deletePlaybook( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + public void listPlaybooks( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPlaybooksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + public void getPlaybook( + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports the specified playbook to a binary file.
+     * Note that resources (e.g. examples, tools) that the playbook
+     * references will also be exported.
+     * 
+ */ + public void exportPlaybook( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportPlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports the specified playbook to the specified agent from a binary file.
+     * 
+ */ + public void importPlaybook( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportPlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + public void updatePlaybook( + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + public void createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePlaybookVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + public void getPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPlaybookVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook and stores it as the
+     * current playbook draft, returning the playbook with resources updated.
+     * 
+ */ + public void restorePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestorePlaybookVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + public void listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPlaybookVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + public void deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePlaybookVersionMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Playbooks. + * + *
+   * Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook].
+   * 
+ */ + public static final class PlaybooksBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PlaybooksBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlaybooksBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Playbook createPlaybook( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + public com.google.protobuf.Empty deletePlaybook( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse listPlaybooks( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPlaybooksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook( + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports the specified playbook to a binary file.
+     * Note that resources (e.g. examples, tools) that the playbook
+     * references will also be exported.
+     * 
+ */ + public com.google.longrunning.Operation exportPlaybook( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getExportPlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports the specified playbook to the specified agent from a binary file.
+     * 
+ */ + public com.google.longrunning.Operation importPlaybook( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getImportPlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Playbook updatePlaybook( + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdatePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePlaybookVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion getPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPlaybookVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook and stores it as the
+     * current playbook draft, returning the playbook with resources updated.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse restorePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRestorePlaybookVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPlaybookVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + public com.google.protobuf.Empty deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePlaybookVersionMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Playbooks. + * + *
+   * Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook].
+   * 
+ */ + public static final class PlaybooksBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PlaybooksBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlaybooksBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Playbook createPlaybook( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + public com.google.protobuf.Empty deletePlaybook( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse listPlaybooks( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPlaybooksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook( + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports the specified playbook to a binary file.
+     * Note that resources (e.g. examples, tools) that the playbook
+     * references will also be exported.
+     * 
+ */ + public com.google.longrunning.Operation exportPlaybook( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportPlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports the specified playbook to the specified agent from a binary file.
+     * 
+ */ + public com.google.longrunning.Operation importPlaybook( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportPlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Playbook updatePlaybook( + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePlaybookVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion getPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPlaybookVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook and stores it as the
+     * current playbook draft, returning the playbook with resources updated.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse restorePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestorePlaybookVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPlaybookVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + public com.google.protobuf.Empty deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePlaybookVersionMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Playbooks. + * + *
+   * Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook].
+   * 
+ */ + public static final class PlaybooksFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PlaybooksFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlaybooksFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Playbook> + createPlaybook(com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePlaybook(com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse> + listPlaybooks(com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPlaybooksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Playbook> + getPlaybook(com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports the specified playbook to a binary file.
+     * Note that resources (e.g. examples, tools) that the playbook
+     * references will also be exported.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportPlaybook(com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportPlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports the specified playbook to the specified agent from a binary file.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importPlaybook(com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportPlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Playbook> + updatePlaybook(com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.PlaybookVersion> + createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePlaybookVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.PlaybookVersion> + getPlaybookVersion(com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPlaybookVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook and stores it as the
+     * current playbook draft, returning the playbook with resources updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse> + restorePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestorePlaybookVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse> + listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPlaybookVersionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePlaybookVersionMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_PLAYBOOK = 0; + private static final int METHODID_DELETE_PLAYBOOK = 1; + private static final int METHODID_LIST_PLAYBOOKS = 2; + private static final int METHODID_GET_PLAYBOOK = 3; + private static final int METHODID_EXPORT_PLAYBOOK = 4; + private static final int METHODID_IMPORT_PLAYBOOK = 5; + private static final int METHODID_UPDATE_PLAYBOOK = 6; + private static final int METHODID_CREATE_PLAYBOOK_VERSION = 7; + private static final int METHODID_GET_PLAYBOOK_VERSION = 8; + private static final int METHODID_RESTORE_PLAYBOOK_VERSION = 9; + private static final int METHODID_LIST_PLAYBOOK_VERSIONS = 10; + private static final int METHODID_DELETE_PLAYBOOK_VERSION = 11; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PLAYBOOK: + serviceImpl.createPlaybook( + (com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_PLAYBOOK: + serviceImpl.deletePlaybook( + (com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PLAYBOOKS: + serviceImpl.listPlaybooks( + (com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_PLAYBOOK: + serviceImpl.getPlaybook( + (com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_EXPORT_PLAYBOOK: + serviceImpl.exportPlaybook( + (com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_PLAYBOOK: + serviceImpl.importPlaybook( + (com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PLAYBOOK: + serviceImpl.updatePlaybook( + (com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_PLAYBOOK_VERSION: + serviceImpl.createPlaybookVersion( + (com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_PLAYBOOK_VERSION: + serviceImpl.getPlaybookVersion( + (com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RESTORE_PLAYBOOK_VERSION: + serviceImpl.restorePlaybookVersion( + (com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse>) + responseObserver); + break; + case METHODID_LIST_PLAYBOOK_VERSIONS: + serviceImpl.listPlaybookVersions( + (com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse>) + responseObserver); + break; + case METHODID_DELETE_PLAYBOOK_VERSION: + serviceImpl.deletePlaybookVersion( + (com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook>(service, METHODID_CREATE_PLAYBOOK))) + .addMethod( + getDeletePlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_PLAYBOOK))) + .addMethod( + getListPlaybooksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest, + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse>( + service, METHODID_LIST_PLAYBOOKS))) + .addMethod( + getGetPlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook>(service, METHODID_GET_PLAYBOOK))) + .addMethod( + getExportPlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest, + com.google.longrunning.Operation>(service, METHODID_EXPORT_PLAYBOOK))) + .addMethod( + getImportPlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_PLAYBOOK))) + .addMethod( + getUpdatePlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3.Playbook>(service, METHODID_UPDATE_PLAYBOOK))) + .addMethod( + getCreatePlaybookVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion>( + service, METHODID_CREATE_PLAYBOOK_VERSION))) + .addMethod( + getGetPlaybookVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion>( + service, METHODID_GET_PLAYBOOK_VERSION))) + .addMethod( + getRestorePlaybookVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse>( + service, METHODID_RESTORE_PLAYBOOK_VERSION))) + .addMethod( + getListPlaybookVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest, + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse>( + service, METHODID_LIST_PLAYBOOK_VERSIONS))) + .addMethod( + getDeletePlaybookVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_PLAYBOOK_VERSION))) + .build(); + } + + private abstract static class PlaybooksBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PlaybooksBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Playbooks"); + } + } + + private static final class PlaybooksFileDescriptorSupplier + extends PlaybooksBaseDescriptorSupplier { + PlaybooksFileDescriptorSupplier() {} + } + + private static final class PlaybooksMethodDescriptorSupplier + extends PlaybooksBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PlaybooksMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PlaybooksGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PlaybooksFileDescriptorSupplier()) + .addMethod(getCreatePlaybookMethod()) + .addMethod(getDeletePlaybookMethod()) + .addMethod(getListPlaybooksMethod()) + .addMethod(getGetPlaybookMethod()) + .addMethod(getExportPlaybookMethod()) + .addMethod(getImportPlaybookMethod()) + .addMethod(getUpdatePlaybookMethod()) + .addMethod(getCreatePlaybookVersionMethod()) + .addMethod(getGetPlaybookVersionMethod()) + .addMethod(getRestorePlaybookVersionMethod()) + .addMethod(getListPlaybookVersionsMethod()) + .addMethod(getDeletePlaybookVersionMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsGrpc.java new file mode 100644 index 000000000000..8dbfbc075b7f --- /dev/null +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolsGrpc.java @@ -0,0 +1,1599 @@ +/* + * Copyright 2026 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.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool].
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class ToolsGrpc { + + private ToolsGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.Tools"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool> + getCreateToolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTool", + requestType = com.google.cloud.dialogflow.cx.v3.CreateToolRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Tool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool> + getCreateToolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool> + getCreateToolMethod; + if ((getCreateToolMethod = ToolsGrpc.getCreateToolMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getCreateToolMethod = ToolsGrpc.getCreateToolMethod) == null) { + ToolsGrpc.getCreateToolMethod = + getCreateToolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CreateToolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("CreateTool")) + .build(); + } + } + } + return getCreateToolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListToolsRequest, + com.google.cloud.dialogflow.cx.v3.ListToolsResponse> + getListToolsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTools", + requestType = com.google.cloud.dialogflow.cx.v3.ListToolsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListToolsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListToolsRequest, + com.google.cloud.dialogflow.cx.v3.ListToolsResponse> + getListToolsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListToolsRequest, + com.google.cloud.dialogflow.cx.v3.ListToolsResponse> + getListToolsMethod; + if ((getListToolsMethod = ToolsGrpc.getListToolsMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getListToolsMethod = ToolsGrpc.getListToolsMethod) == null) { + ToolsGrpc.getListToolsMethod = + getListToolsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTools")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListToolsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListToolsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("ListTools")) + .build(); + } + } + } + return getListToolsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetToolRequest, com.google.cloud.dialogflow.cx.v3.Tool> + getGetToolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTool", + requestType = com.google.cloud.dialogflow.cx.v3.GetToolRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Tool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetToolRequest, com.google.cloud.dialogflow.cx.v3.Tool> + getGetToolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool> + getGetToolMethod; + if ((getGetToolMethod = ToolsGrpc.getGetToolMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getGetToolMethod = ToolsGrpc.getGetToolMethod) == null) { + ToolsGrpc.getGetToolMethod = + getGetToolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetToolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("GetTool")) + .build(); + } + } + } + return getGetToolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool> + getUpdateToolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTool", + requestType = com.google.cloud.dialogflow.cx.v3.UpdateToolRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Tool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool> + getUpdateToolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool> + getUpdateToolMethod; + if ((getUpdateToolMethod = ToolsGrpc.getUpdateToolMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getUpdateToolMethod = ToolsGrpc.getUpdateToolMethod) == null) { + ToolsGrpc.getUpdateToolMethod = + getUpdateToolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("UpdateTool")) + .build(); + } + } + } + return getUpdateToolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest, com.google.protobuf.Empty> + getDeleteToolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTool", + requestType = com.google.cloud.dialogflow.cx.v3.DeleteToolRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest, com.google.protobuf.Empty> + getDeleteToolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest, com.google.protobuf.Empty> + getDeleteToolMethod; + if ((getDeleteToolMethod = ToolsGrpc.getDeleteToolMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getDeleteToolMethod = ToolsGrpc.getDeleteToolMethod) == null) { + ToolsGrpc.getDeleteToolMethod = + getDeleteToolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("DeleteTool")) + .build(); + } + } + } + return getDeleteToolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest, + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse> + getListToolVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListToolVersions", + requestType = com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest, + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse> + getListToolVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest, + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse> + getListToolVersionsMethod; + if ((getListToolVersionsMethod = ToolsGrpc.getListToolVersionsMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getListToolVersionsMethod = ToolsGrpc.getListToolVersionsMethod) == null) { + ToolsGrpc.getListToolVersionsMethod = + getListToolVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListToolVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("ListToolVersions")) + .build(); + } + } + } + return getListToolVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.ToolVersion> + getCreateToolVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateToolVersion", + requestType = com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ToolVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.ToolVersion> + getCreateToolVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.ToolVersion> + getCreateToolVersionMethod; + if ((getCreateToolVersionMethod = ToolsGrpc.getCreateToolVersionMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getCreateToolVersionMethod = ToolsGrpc.getCreateToolVersionMethod) == null) { + ToolsGrpc.getCreateToolVersionMethod = + getCreateToolVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateToolVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("CreateToolVersion")) + .build(); + } + } + } + return getCreateToolVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.ToolVersion> + getGetToolVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetToolVersion", + requestType = com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ToolVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.ToolVersion> + getGetToolVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.ToolVersion> + getGetToolVersionMethod; + if ((getGetToolVersionMethod = ToolsGrpc.getGetToolVersionMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getGetToolVersionMethod = ToolsGrpc.getGetToolVersionMethod) == null) { + ToolsGrpc.getGetToolVersionMethod = + getGetToolVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetToolVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("GetToolVersion")) + .build(); + } + } + } + return getGetToolVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest, com.google.protobuf.Empty> + getDeleteToolVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteToolVersion", + requestType = com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest, com.google.protobuf.Empty> + getDeleteToolVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest, com.google.protobuf.Empty> + getDeleteToolVersionMethod; + if ((getDeleteToolVersionMethod = ToolsGrpc.getDeleteToolVersionMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getDeleteToolVersionMethod = ToolsGrpc.getDeleteToolVersionMethod) == null) { + ToolsGrpc.getDeleteToolVersionMethod = + getDeleteToolVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteToolVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("DeleteToolVersion")) + .build(); + } + } + } + return getDeleteToolVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse> + getRestoreToolVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestoreToolVersion", + requestType = com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse> + getRestoreToolVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse> + getRestoreToolVersionMethod; + if ((getRestoreToolVersionMethod = ToolsGrpc.getRestoreToolVersionMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getRestoreToolVersionMethod = ToolsGrpc.getRestoreToolVersionMethod) == null) { + ToolsGrpc.getRestoreToolVersionMethod = + getRestoreToolVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreToolVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("RestoreToolVersion")) + .build(); + } + } + } + return getRestoreToolVersionMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ToolsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ToolsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsStub(channel, callOptions); + } + }; + return ToolsStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static ToolsBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ToolsBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsBlockingV2Stub(channel, callOptions); + } + }; + return ToolsBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ToolsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ToolsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsBlockingStub(channel, callOptions); + } + }; + return ToolsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ToolsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ToolsFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsFutureStub(channel, callOptions); + } + }; + return ToolsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool].
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified
+     * agent.
+     * 
+ */ + default void createTool( + com.google.cloud.dialogflow.cx.v3.CreateToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateToolMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the
+     * specified agent.
+     * 
+ */ + default void listTools( + com.google.cloud.dialogflow.cx.v3.ListToolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListToolsMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + default void getTool( + com.google.cloud.dialogflow.cx.v3.GetToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetToolMethod(), responseObserver); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + default void updateTool( + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateToolMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + default void deleteTool( + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteToolMethod(), responseObserver); + } + + /** + * + * + *
+     * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + default void listToolVersions( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListToolVersionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a version for the specified
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + default void createToolVersion( + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateToolVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + default void getToolVersion( + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetToolVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + default void deleteToolVersion( + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteToolVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the Tool and stores it as the
+     * current tool draft, returning the tool with resources updated.
+     * 
+ */ + default void restoreToolVersion( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestoreToolVersionMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool].
+   * 
+ */ + public abstract static class ToolsImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ToolsGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool].
+   * 
+ */ + public static final class ToolsStub extends io.grpc.stub.AbstractAsyncStub { + private ToolsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ToolsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified
+     * agent.
+     * 
+ */ + public void createTool( + com.google.cloud.dialogflow.cx.v3.CreateToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateToolMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the
+     * specified agent.
+     * 
+ */ + public void listTools( + com.google.cloud.dialogflow.cx.v3.ListToolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListToolsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public void getTool( + com.google.cloud.dialogflow.cx.v3.GetToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetToolMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public void updateTool( + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateToolMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public void deleteTool( + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteToolMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public void listToolVersions( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListToolVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a version for the specified
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public void createToolVersion( + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateToolVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public void getToolVersion( + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetToolVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public void deleteToolVersion( + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteToolVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the Tool and stores it as the
+     * current tool draft, returning the tool with resources updated.
+     * 
+ */ + public void restoreToolVersion( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestoreToolVersionMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool].
+   * 
+ */ + public static final class ToolsBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private ToolsBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ToolsBlockingV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified
+     * agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Tool createTool( + com.google.cloud.dialogflow.cx.v3.CreateToolRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the
+     * specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListToolsResponse listTools( + com.google.cloud.dialogflow.cx.v3.ListToolsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListToolsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Tool getTool( + com.google.cloud.dialogflow.cx.v3.GetToolRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Tool updateTool( + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.protobuf.Empty deleteTool( + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse listToolVersions( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListToolVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a version for the specified
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion createToolVersion( + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateToolVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion getToolVersion( + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetToolVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.protobuf.Empty deleteToolVersion( + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteToolVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Tool and stores it as the
+     * current tool draft, returning the tool with resources updated.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse restoreToolVersion( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRestoreToolVersionMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool].
+   * 
+ */ + public static final class ToolsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ToolsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ToolsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified
+     * agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Tool createTool( + com.google.cloud.dialogflow.cx.v3.CreateToolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the
+     * specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListToolsResponse listTools( + com.google.cloud.dialogflow.cx.v3.ListToolsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListToolsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Tool getTool( + com.google.cloud.dialogflow.cx.v3.GetToolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Tool updateTool( + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.protobuf.Empty deleteTool( + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse listToolVersions( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListToolVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a version for the specified
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion createToolVersion( + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateToolVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion getToolVersion( + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetToolVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.protobuf.Empty deleteToolVersion( + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteToolVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Tool and stores it as the
+     * current tool draft, returning the tool with resources updated.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse restoreToolVersion( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestoreToolVersionMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool].
+   * 
+ */ + public static final class ToolsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ToolsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ToolsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified
+     * agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Tool> + createTool(com.google.cloud.dialogflow.cx.v3.CreateToolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateToolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the
+     * specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListToolsResponse> + listTools(com.google.cloud.dialogflow.cx.v3.ListToolsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListToolsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Tool> + getTool(com.google.cloud.dialogflow.cx.v3.GetToolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetToolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Tool> + updateTool(com.google.cloud.dialogflow.cx.v3.UpdateToolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateToolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteTool( + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteToolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse> + listToolVersions(com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListToolVersionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a version for the specified
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ToolVersion> + createToolVersion(com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateToolVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ToolVersion> + getToolVersion(com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetToolVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified version of the
+     * [Tool][google.cloud.dialogflow.cx.v3.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteToolVersion(com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteToolVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Tool and stores it as the
+     * current tool draft, returning the tool with resources updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse> + restoreToolVersion(com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestoreToolVersionMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TOOL = 0; + private static final int METHODID_LIST_TOOLS = 1; + private static final int METHODID_GET_TOOL = 2; + private static final int METHODID_UPDATE_TOOL = 3; + private static final int METHODID_DELETE_TOOL = 4; + private static final int METHODID_LIST_TOOL_VERSIONS = 5; + private static final int METHODID_CREATE_TOOL_VERSION = 6; + private static final int METHODID_GET_TOOL_VERSION = 7; + private static final int METHODID_DELETE_TOOL_VERSION = 8; + private static final int METHODID_RESTORE_TOOL_VERSION = 9; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_TOOL: + serviceImpl.createTool( + (com.google.cloud.dialogflow.cx.v3.CreateToolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TOOLS: + serviceImpl.listTools( + (com.google.cloud.dialogflow.cx.v3.ListToolsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TOOL: + serviceImpl.getTool( + (com.google.cloud.dialogflow.cx.v3.GetToolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TOOL: + serviceImpl.updateTool( + (com.google.cloud.dialogflow.cx.v3.UpdateToolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_TOOL: + serviceImpl.deleteTool( + (com.google.cloud.dialogflow.cx.v3.DeleteToolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TOOL_VERSIONS: + serviceImpl.listToolVersions( + (com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse>) + responseObserver); + break; + case METHODID_CREATE_TOOL_VERSION: + serviceImpl.createToolVersion( + (com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TOOL_VERSION: + serviceImpl.getToolVersion( + (com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_TOOL_VERSION: + serviceImpl.deleteToolVersion( + (com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTORE_TOOL_VERSION: + serviceImpl.restoreToolVersion( + (com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateToolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.CreateToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool>(service, METHODID_CREATE_TOOL))) + .addMethod( + getListToolsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListToolsRequest, + com.google.cloud.dialogflow.cx.v3.ListToolsResponse>( + service, METHODID_LIST_TOOLS))) + .addMethod( + getGetToolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool>(service, METHODID_GET_TOOL))) + .addMethod( + getUpdateToolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest, + com.google.cloud.dialogflow.cx.v3.Tool>(service, METHODID_UPDATE_TOOL))) + .addMethod( + getDeleteToolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest, com.google.protobuf.Empty>( + service, METHODID_DELETE_TOOL))) + .addMethod( + getListToolVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest, + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse>( + service, METHODID_LIST_TOOL_VERSIONS))) + .addMethod( + getCreateToolVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.ToolVersion>( + service, METHODID_CREATE_TOOL_VERSION))) + .addMethod( + getGetToolVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.ToolVersion>( + service, METHODID_GET_TOOL_VERSION))) + .addMethod( + getDeleteToolVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_TOOL_VERSION))) + .addMethod( + getRestoreToolVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest, + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse>( + service, METHODID_RESTORE_TOOL_VERSION))) + .build(); + } + + private abstract static class ToolsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ToolsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Tools"); + } + } + + private static final class ToolsFileDescriptorSupplier extends ToolsBaseDescriptorSupplier { + ToolsFileDescriptorSupplier() {} + } + + private static final class ToolsMethodDescriptorSupplier extends ToolsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ToolsMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ToolsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ToolsFileDescriptorSupplier()) + .addMethod(getCreateToolMethod()) + .addMethod(getListToolsMethod()) + .addMethod(getGetToolMethod()) + .addMethod(getUpdateToolMethod()) + .addMethod(getDeleteToolMethod()) + .addMethod(getListToolVersionsMethod()) + .addMethod(getCreateToolVersionMethod()) + .addMethod(getGetToolVersionMethod()) + .addMethod(getDeleteToolVersionMethod()) + .addMethod(getRestoreToolVersionMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Action.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Action.java new file mode 100644 index 000000000000..d9e5e95f5559 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Action.java @@ -0,0 +1,2901 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Action performed by end user or Dialogflow agent in the conversation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Action} + */ +public final class Action extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Action) + ActionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Action.newBuilder() to construct. + private Action(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Action() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Action(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Action.class, + com.google.cloud.dialogflow.cx.v3.Action.Builder.class); + } + + private int actionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object action_; + + public enum ActionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_UTTERANCE(1), + AGENT_UTTERANCE(2), + TOOL_USE(3), + PLAYBOOK_INVOCATION(4), + FLOW_INVOCATION(5), + PLAYBOOK_TRANSITION(12), + FLOW_TRANSITION(13), + ACTION_NOT_SET(0); + private final int value; + + private ActionCase(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 ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 1: + return USER_UTTERANCE; + case 2: + return AGENT_UTTERANCE; + case 3: + return TOOL_USE; + case 4: + return PLAYBOOK_INVOCATION; + case 5: + return FLOW_INVOCATION; + case 12: + return PLAYBOOK_TRANSITION; + case 13: + return FLOW_TRANSITION; + case 0: + return ACTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public static final int USER_UTTERANCE_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userUtterance field is set. + */ + @java.lang.Override + public boolean hasUserUtterance() { + return actionCase_ == 1; + } + + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userUtterance. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UserUtterance getUserUtterance() { + if (actionCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.UserUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UserUtteranceOrBuilder getUserUtteranceOrBuilder() { + if (actionCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.UserUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance(); + } + + public static final int AGENT_UTTERANCE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentUtterance field is set. + */ + @java.lang.Override + public boolean hasAgentUtterance() { + return actionCase_ == 2; + } + + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentUtterance. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentUtterance getAgentUtterance() { + if (actionCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.AgentUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentUtteranceOrBuilder getAgentUtteranceOrBuilder() { + if (actionCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.AgentUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance(); + } + + public static final int TOOL_USE_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolUse field is set. + */ + @java.lang.Override + public boolean hasToolUse() { + return actionCase_ == 3; + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolUse. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolUse getToolUse() { + if (actionCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.ToolUse) action_; + } + return com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolUseOrBuilder getToolUseOrBuilder() { + if (actionCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.ToolUse) action_; + } + return com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance(); + } + + public static final int PLAYBOOK_INVOCATION_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInvocation field is set. + */ + @java.lang.Override + public boolean hasPlaybookInvocation() { + return actionCase_ == 4; + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInvocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInvocation getPlaybookInvocation() { + if (actionCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInvocationOrBuilder + getPlaybookInvocationOrBuilder() { + if (actionCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance(); + } + + public static final int FLOW_INVOCATION_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowInvocation field is set. + */ + @java.lang.Override + public boolean hasFlowInvocation() { + return actionCase_ == 5; + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowInvocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowInvocation getFlowInvocation() { + if (actionCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.FlowInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowInvocationOrBuilder getFlowInvocationOrBuilder() { + if (actionCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.FlowInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance(); + } + + public static final int PLAYBOOK_TRANSITION_FIELD_NUMBER = 12; + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookTransition field is set. + */ + @java.lang.Override + public boolean hasPlaybookTransition() { + return actionCase_ == 12; + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookTransition. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookTransition getPlaybookTransition() { + if (actionCase_ == 12) { + return (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) action_; + } + return com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookTransitionOrBuilder + getPlaybookTransitionOrBuilder() { + if (actionCase_ == 12) { + return (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) action_; + } + return com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance(); + } + + public static final int FLOW_TRANSITION_FIELD_NUMBER = 13; + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowTransition field is set. + */ + @java.lang.Override + public boolean hasFlowTransition() { + return actionCase_ == 13; + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowTransition. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowTransition getFlowTransition() { + if (actionCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3.FlowTransition) action_; + } + return com.google.cloud.dialogflow.cx.v3.FlowTransition.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowTransitionOrBuilder getFlowTransitionOrBuilder() { + if (actionCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3.FlowTransition) action_; + } + return com.google.cloud.dialogflow.cx.v3.FlowTransition.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 (actionCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3.UserUtterance) action_); + } + if (actionCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3.AgentUtterance) action_); + } + if (actionCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.cx.v3.ToolUse) action_); + } + if (actionCase_ == 4) { + output.writeMessage(4, (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) action_); + } + if (actionCase_ == 5) { + output.writeMessage(5, (com.google.cloud.dialogflow.cx.v3.FlowInvocation) action_); + } + if (actionCase_ == 12) { + output.writeMessage(12, (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) action_); + } + if (actionCase_ == 13) { + output.writeMessage(13, (com.google.cloud.dialogflow.cx.v3.FlowTransition) action_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.cx.v3.UserUtterance) action_); + } + if (actionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3.AgentUtterance) action_); + } + if (actionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.cx.v3.ToolUse) action_); + } + if (actionCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) action_); + } + if (actionCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.dialogflow.cx.v3.FlowInvocation) action_); + } + if (actionCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) action_); + } + if (actionCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.dialogflow.cx.v3.FlowTransition) action_); + } + 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.v3.Action)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Action other = (com.google.cloud.dialogflow.cx.v3.Action) obj; + + if (!getActionCase().equals(other.getActionCase())) return false; + switch (actionCase_) { + case 1: + if (!getUserUtterance().equals(other.getUserUtterance())) return false; + break; + case 2: + if (!getAgentUtterance().equals(other.getAgentUtterance())) return false; + break; + case 3: + if (!getToolUse().equals(other.getToolUse())) return false; + break; + case 4: + if (!getPlaybookInvocation().equals(other.getPlaybookInvocation())) return false; + break; + case 5: + if (!getFlowInvocation().equals(other.getFlowInvocation())) return false; + break; + case 12: + if (!getPlaybookTransition().equals(other.getPlaybookTransition())) return false; + break; + case 13: + if (!getFlowTransition().equals(other.getFlowTransition())) 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 (actionCase_) { + case 1: + hash = (37 * hash) + USER_UTTERANCE_FIELD_NUMBER; + hash = (53 * hash) + getUserUtterance().hashCode(); + break; + case 2: + hash = (37 * hash) + AGENT_UTTERANCE_FIELD_NUMBER; + hash = (53 * hash) + getAgentUtterance().hashCode(); + break; + case 3: + hash = (37 * hash) + TOOL_USE_FIELD_NUMBER; + hash = (53 * hash) + getToolUse().hashCode(); + break; + case 4: + hash = (37 * hash) + PLAYBOOK_INVOCATION_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookInvocation().hashCode(); + break; + case 5: + hash = (37 * hash) + FLOW_INVOCATION_FIELD_NUMBER; + hash = (53 * hash) + getFlowInvocation().hashCode(); + break; + case 12: + hash = (37 * hash) + PLAYBOOK_TRANSITION_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookTransition().hashCode(); + break; + case 13: + hash = (37 * hash) + FLOW_TRANSITION_FIELD_NUMBER; + hash = (53 * hash) + getFlowTransition().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Action parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Action 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.v3.Action parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Action 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.v3.Action parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Action 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.v3.Action parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Action 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.v3.Action parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Action 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.v3.Action 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.v3.Action 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.v3.Action 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; + } + + /** + * + * + *
+   * Action performed by end user or Dialogflow agent in the conversation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Action} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Action) + com.google.cloud.dialogflow.cx.v3.ActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Action.class, + com.google.cloud.dialogflow.cx.v3.Action.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Action.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userUtteranceBuilder_ != null) { + userUtteranceBuilder_.clear(); + } + if (agentUtteranceBuilder_ != null) { + agentUtteranceBuilder_.clear(); + } + if (toolUseBuilder_ != null) { + toolUseBuilder_.clear(); + } + if (playbookInvocationBuilder_ != null) { + playbookInvocationBuilder_.clear(); + } + if (flowInvocationBuilder_ != null) { + flowInvocationBuilder_.clear(); + } + if (playbookTransitionBuilder_ != null) { + playbookTransitionBuilder_.clear(); + } + if (flowTransitionBuilder_ != null) { + flowTransitionBuilder_.clear(); + } + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_Action_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Action getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Action.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Action build() { + com.google.cloud.dialogflow.cx.v3.Action result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Action buildPartial() { + com.google.cloud.dialogflow.cx.v3.Action result = + new com.google.cloud.dialogflow.cx.v3.Action(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Action result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.Action result) { + result.actionCase_ = actionCase_; + result.action_ = this.action_; + if (actionCase_ == 1 && userUtteranceBuilder_ != null) { + result.action_ = userUtteranceBuilder_.build(); + } + if (actionCase_ == 2 && agentUtteranceBuilder_ != null) { + result.action_ = agentUtteranceBuilder_.build(); + } + if (actionCase_ == 3 && toolUseBuilder_ != null) { + result.action_ = toolUseBuilder_.build(); + } + if (actionCase_ == 4 && playbookInvocationBuilder_ != null) { + result.action_ = playbookInvocationBuilder_.build(); + } + if (actionCase_ == 5 && flowInvocationBuilder_ != null) { + result.action_ = flowInvocationBuilder_.build(); + } + if (actionCase_ == 12 && playbookTransitionBuilder_ != null) { + result.action_ = playbookTransitionBuilder_.build(); + } + if (actionCase_ == 13 && flowTransitionBuilder_ != null) { + result.action_ = flowTransitionBuilder_.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.v3.Action) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Action) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Action other) { + if (other == com.google.cloud.dialogflow.cx.v3.Action.getDefaultInstance()) return this; + switch (other.getActionCase()) { + case USER_UTTERANCE: + { + mergeUserUtterance(other.getUserUtterance()); + break; + } + case AGENT_UTTERANCE: + { + mergeAgentUtterance(other.getAgentUtterance()); + break; + } + case TOOL_USE: + { + mergeToolUse(other.getToolUse()); + break; + } + case PLAYBOOK_INVOCATION: + { + mergePlaybookInvocation(other.getPlaybookInvocation()); + break; + } + case FLOW_INVOCATION: + { + mergeFlowInvocation(other.getFlowInvocation()); + break; + } + case PLAYBOOK_TRANSITION: + { + mergePlaybookTransition(other.getPlaybookTransition()); + break; + } + case FLOW_TRANSITION: + { + mergeFlowTransition(other.getFlowTransition()); + break; + } + case ACTION_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: + { + input.readMessage(getUserUtteranceFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getAgentUtteranceFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getToolUseFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getPlaybookInvocationFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getFlowInvocationFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 5; + break; + } // case 42 + case 98: + { + input.readMessage( + getPlaybookTransitionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage(getFlowTransitionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 13; + break; + } // case 106 + 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 actionCase_ = 0; + private java.lang.Object action_; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public Builder clearAction() { + actionCase_ = 0; + action_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.UserUtterance, + com.google.cloud.dialogflow.cx.v3.UserUtterance.Builder, + com.google.cloud.dialogflow.cx.v3.UserUtteranceOrBuilder> + userUtteranceBuilder_; + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userUtterance field is set. + */ + @java.lang.Override + public boolean hasUserUtterance() { + return actionCase_ == 1; + } + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userUtterance. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UserUtterance getUserUtterance() { + if (userUtteranceBuilder_ == null) { + if (actionCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.UserUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance(); + } else { + if (actionCase_ == 1) { + return userUtteranceBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserUtterance(com.google.cloud.dialogflow.cx.v3.UserUtterance value) { + if (userUtteranceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + userUtteranceBuilder_.setMessage(value); + } + actionCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserUtterance( + com.google.cloud.dialogflow.cx.v3.UserUtterance.Builder builderForValue) { + if (userUtteranceBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + userUtteranceBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUserUtterance(com.google.cloud.dialogflow.cx.v3.UserUtterance value) { + if (userUtteranceBuilder_ == null) { + if (actionCase_ == 1 + && action_ != com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3.UserUtterance.newBuilder( + (com.google.cloud.dialogflow.cx.v3.UserUtterance) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 1) { + userUtteranceBuilder_.mergeFrom(value); + } else { + userUtteranceBuilder_.setMessage(value); + } + } + actionCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUserUtterance() { + if (userUtteranceBuilder_ == null) { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + } + userUtteranceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.UserUtterance.Builder getUserUtteranceBuilder() { + return getUserUtteranceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UserUtteranceOrBuilder getUserUtteranceOrBuilder() { + if ((actionCase_ == 1) && (userUtteranceBuilder_ != null)) { + return userUtteranceBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.UserUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.UserUtterance, + com.google.cloud.dialogflow.cx.v3.UserUtterance.Builder, + com.google.cloud.dialogflow.cx.v3.UserUtteranceOrBuilder> + getUserUtteranceFieldBuilder() { + if (userUtteranceBuilder_ == null) { + if (!(actionCase_ == 1)) { + action_ = com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance(); + } + userUtteranceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.UserUtterance, + com.google.cloud.dialogflow.cx.v3.UserUtterance.Builder, + com.google.cloud.dialogflow.cx.v3.UserUtteranceOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.UserUtterance) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 1; + onChanged(); + return userUtteranceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AgentUtterance, + com.google.cloud.dialogflow.cx.v3.AgentUtterance.Builder, + com.google.cloud.dialogflow.cx.v3.AgentUtteranceOrBuilder> + agentUtteranceBuilder_; + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentUtterance field is set. + */ + @java.lang.Override + public boolean hasAgentUtterance() { + return actionCase_ == 2; + } + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentUtterance. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentUtterance getAgentUtterance() { + if (agentUtteranceBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.AgentUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return agentUtteranceBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAgentUtterance(com.google.cloud.dialogflow.cx.v3.AgentUtterance value) { + if (agentUtteranceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + agentUtteranceBuilder_.setMessage(value); + } + actionCase_ = 2; + return this; + } + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAgentUtterance( + com.google.cloud.dialogflow.cx.v3.AgentUtterance.Builder builderForValue) { + if (agentUtteranceBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + agentUtteranceBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 2; + return this; + } + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAgentUtterance(com.google.cloud.dialogflow.cx.v3.AgentUtterance value) { + if (agentUtteranceBuilder_ == null) { + if (actionCase_ == 2 + && action_ != com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3.AgentUtterance.newBuilder( + (com.google.cloud.dialogflow.cx.v3.AgentUtterance) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + agentUtteranceBuilder_.mergeFrom(value); + } else { + agentUtteranceBuilder_.setMessage(value); + } + } + actionCase_ = 2; + return this; + } + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAgentUtterance() { + if (agentUtteranceBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + agentUtteranceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.AgentUtterance.Builder getAgentUtteranceBuilder() { + return getAgentUtteranceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentUtteranceOrBuilder getAgentUtteranceOrBuilder() { + if ((actionCase_ == 2) && (agentUtteranceBuilder_ != null)) { + return agentUtteranceBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.AgentUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AgentUtterance, + com.google.cloud.dialogflow.cx.v3.AgentUtterance.Builder, + com.google.cloud.dialogflow.cx.v3.AgentUtteranceOrBuilder> + getAgentUtteranceFieldBuilder() { + if (agentUtteranceBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance(); + } + agentUtteranceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AgentUtterance, + com.google.cloud.dialogflow.cx.v3.AgentUtterance.Builder, + com.google.cloud.dialogflow.cx.v3.AgentUtteranceOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.AgentUtterance) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged(); + return agentUtteranceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolUse, + com.google.cloud.dialogflow.cx.v3.ToolUse.Builder, + com.google.cloud.dialogflow.cx.v3.ToolUseOrBuilder> + toolUseBuilder_; + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolUse field is set. + */ + @java.lang.Override + public boolean hasToolUse() { + return actionCase_ == 3; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolUse. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolUse getToolUse() { + if (toolUseBuilder_ == null) { + if (actionCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.ToolUse) action_; + } + return com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance(); + } else { + if (actionCase_ == 3) { + return toolUseBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setToolUse(com.google.cloud.dialogflow.cx.v3.ToolUse value) { + if (toolUseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + toolUseBuilder_.setMessage(value); + } + actionCase_ = 3; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setToolUse(com.google.cloud.dialogflow.cx.v3.ToolUse.Builder builderForValue) { + if (toolUseBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + toolUseBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 3; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeToolUse(com.google.cloud.dialogflow.cx.v3.ToolUse value) { + if (toolUseBuilder_ == null) { + if (actionCase_ == 3 + && action_ != com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3.ToolUse.newBuilder( + (com.google.cloud.dialogflow.cx.v3.ToolUse) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 3) { + toolUseBuilder_.mergeFrom(value); + } else { + toolUseBuilder_.setMessage(value); + } + } + actionCase_ = 3; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearToolUse() { + if (toolUseBuilder_ == null) { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + } + toolUseBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ToolUse.Builder getToolUseBuilder() { + return getToolUseFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolUseOrBuilder getToolUseOrBuilder() { + if ((actionCase_ == 3) && (toolUseBuilder_ != null)) { + return toolUseBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.ToolUse) action_; + } + return com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolUse, + com.google.cloud.dialogflow.cx.v3.ToolUse.Builder, + com.google.cloud.dialogflow.cx.v3.ToolUseOrBuilder> + getToolUseFieldBuilder() { + if (toolUseBuilder_ == null) { + if (!(actionCase_ == 3)) { + action_ = com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance(); + } + toolUseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolUse, + com.google.cloud.dialogflow.cx.v3.ToolUse.Builder, + com.google.cloud.dialogflow.cx.v3.ToolUseOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.ToolUse) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 3; + onChanged(); + return toolUseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation, + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInvocationOrBuilder> + playbookInvocationBuilder_; + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInvocation field is set. + */ + @java.lang.Override + public boolean hasPlaybookInvocation() { + return actionCase_ == 4; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInvocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInvocation getPlaybookInvocation() { + if (playbookInvocationBuilder_ == null) { + if (actionCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance(); + } else { + if (actionCase_ == 4) { + return playbookInvocationBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInvocation( + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation value) { + if (playbookInvocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + playbookInvocationBuilder_.setMessage(value); + } + actionCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInvocation( + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.Builder builderForValue) { + if (playbookInvocationBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + playbookInvocationBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookInvocation( + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation value) { + if (playbookInvocationBuilder_ == null) { + if (actionCase_ == 4 + && action_ + != com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.newBuilder( + (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 4) { + playbookInvocationBuilder_.mergeFrom(value); + } else { + playbookInvocationBuilder_.setMessage(value); + } + } + actionCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookInvocation() { + if (playbookInvocationBuilder_ == null) { + if (actionCase_ == 4) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 4) { + actionCase_ = 0; + action_ = null; + } + playbookInvocationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.Builder + getPlaybookInvocationBuilder() { + return getPlaybookInvocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInvocationOrBuilder + getPlaybookInvocationOrBuilder() { + if ((actionCase_ == 4) && (playbookInvocationBuilder_ != null)) { + return playbookInvocationBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation, + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInvocationOrBuilder> + getPlaybookInvocationFieldBuilder() { + if (playbookInvocationBuilder_ == null) { + if (!(actionCase_ == 4)) { + action_ = com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance(); + } + playbookInvocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation, + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInvocationOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 4; + onChanged(); + return playbookInvocationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowInvocation, + com.google.cloud.dialogflow.cx.v3.FlowInvocation.Builder, + com.google.cloud.dialogflow.cx.v3.FlowInvocationOrBuilder> + flowInvocationBuilder_; + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowInvocation field is set. + */ + @java.lang.Override + public boolean hasFlowInvocation() { + return actionCase_ == 5; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowInvocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowInvocation getFlowInvocation() { + if (flowInvocationBuilder_ == null) { + if (actionCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.FlowInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance(); + } else { + if (actionCase_ == 5) { + return flowInvocationBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowInvocation(com.google.cloud.dialogflow.cx.v3.FlowInvocation value) { + if (flowInvocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + flowInvocationBuilder_.setMessage(value); + } + actionCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowInvocation( + com.google.cloud.dialogflow.cx.v3.FlowInvocation.Builder builderForValue) { + if (flowInvocationBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + flowInvocationBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFlowInvocation(com.google.cloud.dialogflow.cx.v3.FlowInvocation value) { + if (flowInvocationBuilder_ == null) { + if (actionCase_ == 5 + && action_ != com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3.FlowInvocation.newBuilder( + (com.google.cloud.dialogflow.cx.v3.FlowInvocation) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 5) { + flowInvocationBuilder_.mergeFrom(value); + } else { + flowInvocationBuilder_.setMessage(value); + } + } + actionCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFlowInvocation() { + if (flowInvocationBuilder_ == null) { + if (actionCase_ == 5) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 5) { + actionCase_ = 0; + action_ = null; + } + flowInvocationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowInvocation.Builder getFlowInvocationBuilder() { + return getFlowInvocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowInvocationOrBuilder getFlowInvocationOrBuilder() { + if ((actionCase_ == 5) && (flowInvocationBuilder_ != null)) { + return flowInvocationBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.FlowInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowInvocation, + com.google.cloud.dialogflow.cx.v3.FlowInvocation.Builder, + com.google.cloud.dialogflow.cx.v3.FlowInvocationOrBuilder> + getFlowInvocationFieldBuilder() { + if (flowInvocationBuilder_ == null) { + if (!(actionCase_ == 5)) { + action_ = com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance(); + } + flowInvocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowInvocation, + com.google.cloud.dialogflow.cx.v3.FlowInvocation.Builder, + com.google.cloud.dialogflow.cx.v3.FlowInvocationOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.FlowInvocation) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 5; + onChanged(); + return flowInvocationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookTransition, + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookTransitionOrBuilder> + playbookTransitionBuilder_; + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookTransition field is set. + */ + @java.lang.Override + public boolean hasPlaybookTransition() { + return actionCase_ == 12; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookTransition. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookTransition getPlaybookTransition() { + if (playbookTransitionBuilder_ == null) { + if (actionCase_ == 12) { + return (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) action_; + } + return com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance(); + } else { + if (actionCase_ == 12) { + return playbookTransitionBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookTransition( + com.google.cloud.dialogflow.cx.v3.PlaybookTransition value) { + if (playbookTransitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + playbookTransitionBuilder_.setMessage(value); + } + actionCase_ = 12; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookTransition( + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.Builder builderForValue) { + if (playbookTransitionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + playbookTransitionBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 12; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookTransition( + com.google.cloud.dialogflow.cx.v3.PlaybookTransition value) { + if (playbookTransitionBuilder_ == null) { + if (actionCase_ == 12 + && action_ + != com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.newBuilder( + (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 12) { + playbookTransitionBuilder_.mergeFrom(value); + } else { + playbookTransitionBuilder_.setMessage(value); + } + } + actionCase_ = 12; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookTransition() { + if (playbookTransitionBuilder_ == null) { + if (actionCase_ == 12) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 12) { + actionCase_ = 0; + action_ = null; + } + playbookTransitionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookTransition.Builder + getPlaybookTransitionBuilder() { + return getPlaybookTransitionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookTransitionOrBuilder + getPlaybookTransitionOrBuilder() { + if ((actionCase_ == 12) && (playbookTransitionBuilder_ != null)) { + return playbookTransitionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 12) { + return (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) action_; + } + return com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookTransition, + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookTransitionOrBuilder> + getPlaybookTransitionFieldBuilder() { + if (playbookTransitionBuilder_ == null) { + if (!(actionCase_ == 12)) { + action_ = com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance(); + } + playbookTransitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookTransition, + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookTransitionOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 12; + onChanged(); + return playbookTransitionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowTransition, + com.google.cloud.dialogflow.cx.v3.FlowTransition.Builder, + com.google.cloud.dialogflow.cx.v3.FlowTransitionOrBuilder> + flowTransitionBuilder_; + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowTransition field is set. + */ + @java.lang.Override + public boolean hasFlowTransition() { + return actionCase_ == 13; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowTransition. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowTransition getFlowTransition() { + if (flowTransitionBuilder_ == null) { + if (actionCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3.FlowTransition) action_; + } + return com.google.cloud.dialogflow.cx.v3.FlowTransition.getDefaultInstance(); + } else { + if (actionCase_ == 13) { + return flowTransitionBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.FlowTransition.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowTransition(com.google.cloud.dialogflow.cx.v3.FlowTransition value) { + if (flowTransitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + flowTransitionBuilder_.setMessage(value); + } + actionCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowTransition( + com.google.cloud.dialogflow.cx.v3.FlowTransition.Builder builderForValue) { + if (flowTransitionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + flowTransitionBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFlowTransition(com.google.cloud.dialogflow.cx.v3.FlowTransition value) { + if (flowTransitionBuilder_ == null) { + if (actionCase_ == 13 + && action_ != com.google.cloud.dialogflow.cx.v3.FlowTransition.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3.FlowTransition.newBuilder( + (com.google.cloud.dialogflow.cx.v3.FlowTransition) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 13) { + flowTransitionBuilder_.mergeFrom(value); + } else { + flowTransitionBuilder_.setMessage(value); + } + } + actionCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFlowTransition() { + if (flowTransitionBuilder_ == null) { + if (actionCase_ == 13) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 13) { + actionCase_ = 0; + action_ = null; + } + flowTransitionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FlowTransition.Builder getFlowTransitionBuilder() { + return getFlowTransitionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowTransitionOrBuilder getFlowTransitionOrBuilder() { + if ((actionCase_ == 13) && (flowTransitionBuilder_ != null)) { + return flowTransitionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3.FlowTransition) action_; + } + return com.google.cloud.dialogflow.cx.v3.FlowTransition.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by transitioning to a
+     * target CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowTransition, + com.google.cloud.dialogflow.cx.v3.FlowTransition.Builder, + com.google.cloud.dialogflow.cx.v3.FlowTransitionOrBuilder> + getFlowTransitionFieldBuilder() { + if (flowTransitionBuilder_ == null) { + if (!(actionCase_ == 13)) { + action_ = com.google.cloud.dialogflow.cx.v3.FlowTransition.getDefaultInstance(); + } + flowTransitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.FlowTransition, + com.google.cloud.dialogflow.cx.v3.FlowTransition.Builder, + com.google.cloud.dialogflow.cx.v3.FlowTransitionOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.FlowTransition) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 13; + onChanged(); + return flowTransitionBuilder_; + } + + @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.v3.Action) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Action) + private static final com.google.cloud.dialogflow.cx.v3.Action DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Action(); + } + + public static com.google.cloud.dialogflow.cx.v3.Action getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Action 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.v3.Action getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ActionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ActionOrBuilder.java new file mode 100644 index 000000000000..ca851eeb221e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ActionOrBuilder.java @@ -0,0 +1,341 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Action) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userUtterance field is set. + */ + boolean hasUserUtterance(); + + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userUtterance. + */ + com.google.cloud.dialogflow.cx.v3.UserUtterance getUserUtterance(); + + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.UserUtteranceOrBuilder getUserUtteranceOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentUtterance field is set. + */ + boolean hasAgentUtterance(); + + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentUtterance. + */ + com.google.cloud.dialogflow.cx.v3.AgentUtterance getAgentUtterance(); + + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.AgentUtteranceOrBuilder getAgentUtteranceOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolUse field is set. + */ + boolean hasToolUse(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolUse. + */ + com.google.cloud.dialogflow.cx.v3.ToolUse getToolUse(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ToolUseOrBuilder getToolUseOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInvocation field is set. + */ + boolean hasPlaybookInvocation(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInvocation. + */ + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation getPlaybookInvocation(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookInvocationOrBuilder getPlaybookInvocationOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowInvocation field is set. + */ + boolean hasFlowInvocation(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowInvocation. + */ + com.google.cloud.dialogflow.cx.v3.FlowInvocation getFlowInvocation(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.FlowInvocationOrBuilder getFlowInvocationOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookTransition field is set. + */ + boolean hasPlaybookTransition(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookTransition. + */ + com.google.cloud.dialogflow.cx.v3.PlaybookTransition getPlaybookTransition(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookTransition playbook_transition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookTransitionOrBuilder getPlaybookTransitionOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowTransition field is set. + */ + boolean hasFlowTransition(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowTransition. + */ + com.google.cloud.dialogflow.cx.v3.FlowTransition getFlowTransition(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by transitioning to a
+   * target CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.FlowTransition flow_transition = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.FlowTransitionOrBuilder getFlowTransitionOrBuilder(); + + com.google.cloud.dialogflow.cx.v3.Action.ActionCase getActionCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java index 403c6c9381c3..c845f3147f9e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java @@ -59,7 +59,6 @@ private Agent() { timeZone_ = ""; description_ = ""; avatarUri_ = ""; - startFlow_ = ""; securitySettings_ = ""; } @@ -6056,6 +6055,56 @@ public com.google.protobuf.Parser getParserForType() } private int bitField0_; + private int sessionEntryResourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sessionEntryResource_; + + public enum SessionEntryResourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + START_FLOW(16), + START_PLAYBOOK(39), + SESSIONENTRYRESOURCE_NOT_SET(0); + private final int value; + + private SessionEntryResourceCase(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 SessionEntryResourceCase valueOf(int value) { + return forNumber(value); + } + + public static SessionEntryResourceCase forNumber(int value) { + switch (value) { + case 16: + return START_FLOW; + case 39: + return START_PLAYBOOK; + case 0: + return SESSIONENTRYRESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SessionEntryResourceCase getSessionEntryResourceCase() { + return SessionEntryResourceCase.forNumber(sessionEntryResourceCase_); + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -6542,34 +6591,57 @@ public com.google.cloud.dialogflow.cx.v3.SpeechToTextSettings getSpeechToTextSet public static final int START_FLOW_FIELD_NUMBER = 16; - @SuppressWarnings("serial") - private volatile java.lang.Object startFlow_ = ""; + /** + * + * + *
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * Currently only the default start flow with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startFlow field is set. + */ + public boolean hasStartFlow() { + return sessionEntryResourceCase_ == 16; + } /** * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
-   * automatically created when the agent is created, and can only be deleted by
-   * deleting the agent. Format:
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format:
    * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * Currently only the default start flow with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The startFlow. */ - @java.lang.Override public java.lang.String getStartFlow() { - java.lang.Object ref = startFlow_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 16) { + ref = sessionEntryResource_; + } 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(); - startFlow_ = s; + if (sessionEntryResourceCase_ == 16) { + sessionEntryResource_ = s; + } return s; } } @@ -6578,25 +6650,124 @@ public java.lang.String getStartFlow() { * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
-   * automatically created when the agent is created, and can only be deleted by
-   * deleting the agent. Format:
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format:
    * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * Currently only the default start flow with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The bytes for startFlow. */ - @java.lang.Override public com.google.protobuf.ByteString getStartFlowBytes() { - java.lang.Object ref = startFlow_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 16) { + ref = sessionEntryResource_; + } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - startFlow_ = b; + if (sessionEntryResourceCase_ == 16) { + sessionEntryResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_PLAYBOOK_FIELD_NUMBER = 39; + + /** + * + * + *
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * Currently only the
+   *  default playbook with id
+   *  "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startPlaybook field is set. + */ + public boolean hasStartPlaybook() { + return sessionEntryResourceCase_ == 39; + } + + /** + * + * + *
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * Currently only the
+   *  default playbook with id
+   *  "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return The startPlaybook. + */ + public java.lang.String getStartPlaybook() { + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 39) { + ref = sessionEntryResource_; + } + 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 (sessionEntryResourceCase_ == 39) { + sessionEntryResource_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * Currently only the
+   *  default playbook with id
+   *  "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for startPlaybook. + */ + public com.google.protobuf.ByteString getStartPlaybookBytes() { + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 39) { + ref = sessionEntryResource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sessionEntryResourceCase_ == 39) { + sessionEntryResource_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -6678,7 +6849,7 @@ public com.google.protobuf.ByteString getSecuritySettingsBytes() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=368 + * google/cloud/dialogflow/cx/v3/agent.proto;l=385 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -7288,8 +7459,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(13, getSpeechToTextSettings()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startFlow_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, startFlow_); + if (sessionEntryResourceCase_ == 16) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, sessionEntryResource_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(securitySettings_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 17, securitySettings_); @@ -7318,6 +7489,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(38, getAnswerFeedbackSettings()); } + if (sessionEntryResourceCase_ == 39) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 39, sessionEntryResource_); + } if (enableMultiLanguageTraining_ != false) { output.writeBool(40, enableMultiLanguageTraining_); } @@ -7372,8 +7546,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getSpeechToTextSettings()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startFlow_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, startFlow_); + if (sessionEntryResourceCase_ == 16) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, sessionEntryResource_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(securitySettings_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, securitySettings_); @@ -7406,6 +7580,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getAnswerFeedbackSettings()); } + if (sessionEntryResourceCase_ == 39) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(39, sessionEntryResource_); + } if (enableMultiLanguageTraining_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(40, enableMultiLanguageTraining_); @@ -7453,7 +7630,6 @@ public boolean equals(final java.lang.Object obj) { if (hasSpeechToTextSettings()) { if (!getSpeechToTextSettings().equals(other.getSpeechToTextSettings())) return false; } - if (!getStartFlow().equals(other.getStartFlow())) return false; if (!getSecuritySettings().equals(other.getSecuritySettings())) return false; if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; if (getEnableSpellCorrection() != other.getEnableSpellCorrection()) return false; @@ -7496,6 +7672,17 @@ public boolean equals(final java.lang.Object obj) { if (hasSatisfiesPzi()) { if (getSatisfiesPzi() != other.getSatisfiesPzi()) return false; } + if (!getSessionEntryResourceCase().equals(other.getSessionEntryResourceCase())) return false; + switch (sessionEntryResourceCase_) { + case 16: + if (!getStartFlow().equals(other.getStartFlow())) return false; + break; + case 39: + if (!getStartPlaybook().equals(other.getStartPlaybook())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7527,8 +7714,6 @@ public int hashCode() { hash = (37 * hash) + SPEECH_TO_TEXT_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getSpeechToTextSettings().hashCode(); } - hash = (37 * hash) + START_FLOW_FIELD_NUMBER; - hash = (53 * hash) + getStartFlow().hashCode(); hash = (37 * hash) + SECURITY_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getSecuritySettings().hashCode(); hash = (37 * hash) + ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER; @@ -7575,6 +7760,18 @@ public int hashCode() { hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); } + switch (sessionEntryResourceCase_) { + case 16: + hash = (37 * hash) + START_FLOW_FIELD_NUMBER; + hash = (53 * hash) + getStartFlow().hashCode(); + break; + case 39: + hash = (37 * hash) + START_PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getStartPlaybook().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -7755,7 +7952,6 @@ public Builder clear() { speechToTextSettingsBuilder_.dispose(); speechToTextSettingsBuilder_ = null; } - startFlow_ = ""; securitySettings_ = ""; enableStackdriverLogging_ = false; enableSpellCorrection_ = false; @@ -7798,6 +7994,8 @@ public Builder clear() { } satisfiesPzs_ = false; satisfiesPzi_ = false; + sessionEntryResourceCase_ = 0; + sessionEntryResource_ = null; return this; } @@ -7828,6 +8026,7 @@ public com.google.cloud.dialogflow.cx.v3.Agent buildPartial() { if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -7864,82 +8063,84 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Agent result) { : speechToTextSettingsBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.startFlow_ = startFlow_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.securitySettings_ = securitySettings_; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.enableStackdriverLogging_ = enableStackdriverLogging_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.enableSpellCorrection_ = enableSpellCorrection_; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.enableMultiLanguageTraining_ = enableMultiLanguageTraining_; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.locked_ = locked_; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.gitIntegrationSettings_ = gitIntegrationSettingsBuilder_ == null ? gitIntegrationSettings_ : gitIntegrationSettingsBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.textToSpeechSettings_ = textToSpeechSettingsBuilder_ == null ? textToSpeechSettings_ : textToSpeechSettingsBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.genAppBuilderSettings_ = genAppBuilderSettingsBuilder_ == null ? genAppBuilderSettings_ : genAppBuilderSettingsBuilder_.build(); to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00040000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { result.answerFeedbackSettings_ = answerFeedbackSettingsBuilder_ == null ? answerFeedbackSettings_ : answerFeedbackSettingsBuilder_.build(); to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00080000) != 0)) { + if (((from_bitField0_ & 0x00100000) != 0)) { result.personalizationSettings_ = personalizationSettingsBuilder_ == null ? personalizationSettings_ : personalizationSettingsBuilder_.build(); to_bitField0_ |= 0x00000040; } - if (((from_bitField0_ & 0x00100000) != 0)) { + if (((from_bitField0_ & 0x00200000) != 0)) { result.clientCertificateSettings_ = clientCertificateSettingsBuilder_ == null ? clientCertificateSettings_ : clientCertificateSettingsBuilder_.build(); to_bitField0_ |= 0x00000080; } - if (((from_bitField0_ & 0x00200000) != 0)) { + if (((from_bitField0_ & 0x00400000) != 0)) { result.satisfiesPzs_ = satisfiesPzs_; to_bitField0_ |= 0x00000100; } - if (((from_bitField0_ & 0x00400000) != 0)) { + if (((from_bitField0_ & 0x00800000) != 0)) { result.satisfiesPzi_ = satisfiesPzi_; to_bitField0_ |= 0x00000200; } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.Agent result) { + result.sessionEntryResourceCase_ = sessionEntryResourceCase_; + result.sessionEntryResource_ = this.sessionEntryResource_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -8028,14 +8229,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Agent other) { if (other.hasSpeechToTextSettings()) { mergeSpeechToTextSettings(other.getSpeechToTextSettings()); } - if (!other.getStartFlow().isEmpty()) { - startFlow_ = other.startFlow_; - bitField0_ |= 0x00000100; - onChanged(); - } if (!other.getSecuritySettings().isEmpty()) { securitySettings_ = other.securitySettings_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } if (other.getEnableStackdriverLogging() != false) { @@ -8077,6 +8273,26 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Agent other) { if (other.hasSatisfiesPzi()) { setSatisfiesPzi(other.getSatisfiesPzi()); } + switch (other.getSessionEntryResourceCase()) { + case START_FLOW: + { + sessionEntryResourceCase_ = 16; + sessionEntryResource_ = other.sessionEntryResource_; + onChanged(); + break; + } + case START_PLAYBOOK: + { + sessionEntryResourceCase_ = 39; + sessionEntryResource_ = other.sessionEntryResource_; + onChanged(); + break; + } + case SESSIONENTRYRESOURCE_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -8155,99 +8371,107 @@ public Builder mergeFrom( } // case 106 case 130: { - startFlow_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; + java.lang.String s = input.readStringRequireUtf8(); + sessionEntryResourceCase_ = 16; + sessionEntryResource_ = s; break; } // case 130 case 138: { securitySettings_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 138 case 144: { enableStackdriverLogging_ = input.readBool(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 144 case 160: { enableSpellCorrection_ = input.readBool(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 160 case 178: { input.readMessage( getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 178 case 216: { locked_ = input.readBool(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 216 case 242: { input.readMessage( getGitIntegrationSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 242 case 250: { input.readMessage( getTextToSpeechSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 250 case 266: { input.readMessage( getGenAppBuilderSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 266 case 306: { input.readMessage( getAnswerFeedbackSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; break; } // case 306 + case 314: + { + java.lang.String s = input.readStringRequireUtf8(); + sessionEntryResourceCase_ = 39; + sessionEntryResource_ = s; + break; + } // case 314 case 320: { enableMultiLanguageTraining_ = input.readBool(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 320 case 338: { input.readMessage( getPersonalizationSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; break; } // case 338 case 346: { input.readMessage( getClientCertificateSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; break; } // case 346 case 360: { satisfiesPzs_ = input.readBool(); - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; break; } // case 360 case 368: { satisfiesPzi_ = input.readBool(); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; break; } // case 368 default: @@ -8267,6 +8491,20 @@ public Builder mergeFrom( return this; } + private int sessionEntryResourceCase_ = 0; + private java.lang.Object sessionEntryResource_; + + public SessionEntryResourceCase getSessionEntryResourceCase() { + return SessionEntryResourceCase.forNumber(sessionEntryResourceCase_); + } + + public Builder clearSessionEntryResource() { + sessionEntryResourceCase_ = 0; + sessionEntryResource_ = null; + onChanged(); + return this; + } + private int bitField0_; private java.lang.Object name_ = ""; @@ -9437,30 +9675,57 @@ public Builder clearSpeechToTextSettings() { return speechToTextSettingsBuilder_; } - private java.lang.Object startFlow_ = ""; + /** + * + * + *
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * Currently only the default start flow with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startFlow field is set. + */ + @java.lang.Override + public boolean hasStartFlow() { + return sessionEntryResourceCase_ == 16; + } /** * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format:
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format:
      * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * Currently only the default start flow with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The startFlow. */ + @java.lang.Override public java.lang.String getStartFlow() { - java.lang.Object ref = startFlow_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 16) { + ref = sessionEntryResource_; + } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - startFlow_ = s; + if (sessionEntryResourceCase_ == 16) { + sessionEntryResource_ = s; + } return s; } else { return (java.lang.String) ref; @@ -9471,24 +9736,31 @@ public java.lang.String getStartFlow() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format:
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format:
      * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * Currently only the default start flow with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The bytes for startFlow. */ + @java.lang.Override public com.google.protobuf.ByteString getStartFlowBytes() { - java.lang.Object ref = startFlow_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 16) { + ref = sessionEntryResource_; + } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - startFlow_ = b; + if (sessionEntryResourceCase_ == 16) { + sessionEntryResource_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -9499,15 +9771,16 @@ public com.google.protobuf.ByteString getStartFlowBytes() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format:
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format:
      * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * Currently only the default start flow with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @param value The startFlow to set. * @return This builder for chaining. @@ -9516,8 +9789,8 @@ public Builder setStartFlow(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - startFlow_ = value; - bitField0_ |= 0x00000100; + sessionEntryResourceCase_ = 16; + sessionEntryResource_ = value; onChanged(); return this; } @@ -9526,22 +9799,25 @@ public Builder setStartFlow(java.lang.String value) { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format:
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format:
      * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * Currently only the default start flow with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearStartFlow() { - startFlow_ = getDefaultInstance().getStartFlow(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); + if (sessionEntryResourceCase_ == 16) { + sessionEntryResourceCase_ = 0; + sessionEntryResource_ = null; + onChanged(); + } return this; } @@ -9549,15 +9825,16 @@ public Builder clearStartFlow() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format:
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format:
      * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * Currently only the default start flow with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @param value The bytes for startFlow to set. * @return This builder for chaining. @@ -9567,8 +9844,189 @@ public Builder setStartFlowBytes(com.google.protobuf.ByteString value) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - startFlow_ = value; - bitField0_ |= 0x00000100; + sessionEntryResourceCase_ = 16; + sessionEntryResource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * Currently only the
+     *  default playbook with id
+     *  "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startPlaybook field is set. + */ + @java.lang.Override + public boolean hasStartPlaybook() { + return sessionEntryResourceCase_ == 39; + } + + /** + * + * + *
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * Currently only the
+     *  default playbook with id
+     *  "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return The startPlaybook. + */ + @java.lang.Override + public java.lang.String getStartPlaybook() { + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 39) { + ref = sessionEntryResource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sessionEntryResourceCase_ == 39) { + sessionEntryResource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * Currently only the
+     *  default playbook with id
+     *  "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for startPlaybook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartPlaybookBytes() { + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 39) { + ref = sessionEntryResource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sessionEntryResourceCase_ == 39) { + sessionEntryResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * Currently only the
+     *  default playbook with id
+     *  "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @param value The startPlaybook to set. + * @return This builder for chaining. + */ + public Builder setStartPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sessionEntryResourceCase_ = 39; + sessionEntryResource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * Currently only the
+     *  default playbook with id
+     *  "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearStartPlaybook() { + if (sessionEntryResourceCase_ == 39) { + sessionEntryResourceCase_ = 0; + sessionEntryResource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * Currently only the
+     *  default playbook with id
+     *  "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for startPlaybook to set. + * @return This builder for chaining. + */ + public Builder setStartPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sessionEntryResourceCase_ = 39; + sessionEntryResource_ = value; onChanged(); return this; } @@ -9647,7 +10105,7 @@ public Builder setSecuritySettings(java.lang.String value) { throw new NullPointerException(); } securitySettings_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -9668,7 +10126,7 @@ public Builder setSecuritySettings(java.lang.String value) { */ public Builder clearSecuritySettings() { securitySettings_ = getDefaultInstance().getSecuritySettings(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -9694,7 +10152,7 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); securitySettings_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -9714,7 +10172,7 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=368 + * google/cloud/dialogflow/cx/v3/agent.proto;l=385 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -9736,7 +10194,7 @@ public boolean getEnableStackdriverLogging() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=368 + * google/cloud/dialogflow/cx/v3/agent.proto;l=385 * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ @@ -9744,7 +10202,7 @@ public boolean getEnableStackdriverLogging() { public Builder setEnableStackdriverLogging(boolean value) { enableStackdriverLogging_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -9762,12 +10220,12 @@ public Builder setEnableStackdriverLogging(boolean value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=368 + * google/cloud/dialogflow/cx/v3/agent.proto;l=385 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearEnableStackdriverLogging() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); enableStackdriverLogging_ = false; onChanged(); return this; @@ -9808,7 +10266,7 @@ public boolean getEnableSpellCorrection() { public Builder setEnableSpellCorrection(boolean value) { enableSpellCorrection_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -9826,7 +10284,7 @@ public Builder setEnableSpellCorrection(boolean value) { * @return This builder for chaining. */ public Builder clearEnableSpellCorrection() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); enableSpellCorrection_ = false; onChanged(); return this; @@ -9869,7 +10327,7 @@ public boolean getEnableMultiLanguageTraining() { public Builder setEnableMultiLanguageTraining(boolean value) { enableMultiLanguageTraining_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -9888,7 +10346,7 @@ public Builder setEnableMultiLanguageTraining(boolean value) { * @return This builder for chaining. */ public Builder clearEnableMultiLanguageTraining() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); enableMultiLanguageTraining_ = false; onChanged(); return this; @@ -9929,7 +10387,7 @@ public boolean getLocked() { public Builder setLocked(boolean value) { locked_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -9947,7 +10405,7 @@ public Builder setLocked(boolean value) { * @return This builder for chaining. */ public Builder clearLocked() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); locked_ = false; onChanged(); return this; @@ -9973,7 +10431,7 @@ public Builder clearLocked() { * @return Whether the advancedSettings field is set. */ public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** @@ -10017,7 +10475,7 @@ public Builder setAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSet } else { advancedSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -10039,7 +10497,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -10056,7 +10514,7 @@ public Builder setAdvancedSettings( */ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSettings value) { if (advancedSettingsBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00008000) != 0) && advancedSettings_ != null && advancedSettings_ != com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance()) { @@ -10068,7 +10526,7 @@ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedS advancedSettingsBuilder_.mergeFrom(value); } if (advancedSettings_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -10085,7 +10543,7 @@ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedS * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; */ public Builder clearAdvancedSettings() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -10106,7 +10564,7 @@ public Builder clearAdvancedSettings() { * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; */ public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder getAdvancedSettingsBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return getAdvancedSettingsFieldBuilder().getBuilder(); } @@ -10180,7 +10638,7 @@ public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder getAdvancedSet * @return Whether the gitIntegrationSettings field is set. */ public boolean hasGitIntegrationSettings() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** @@ -10228,7 +10686,7 @@ public Builder setGitIntegrationSettings( } else { gitIntegrationSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -10251,7 +10709,7 @@ public Builder setGitIntegrationSettings( } else { gitIntegrationSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -10270,7 +10728,7 @@ public Builder setGitIntegrationSettings( public Builder mergeGitIntegrationSettings( com.google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings value) { if (gitIntegrationSettingsBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && gitIntegrationSettings_ != null && gitIntegrationSettings_ != com.google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings @@ -10283,7 +10741,7 @@ public Builder mergeGitIntegrationSettings( gitIntegrationSettingsBuilder_.mergeFrom(value); } if (gitIntegrationSettings_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -10301,7 +10759,7 @@ public Builder mergeGitIntegrationSettings( * */ public Builder clearGitIntegrationSettings() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); gitIntegrationSettings_ = null; if (gitIntegrationSettingsBuilder_ != null) { gitIntegrationSettingsBuilder_.dispose(); @@ -10324,7 +10782,7 @@ public Builder clearGitIntegrationSettings() { */ public com.google.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings.Builder getGitIntegrationSettingsBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return getGitIntegrationSettingsFieldBuilder().getBuilder(); } @@ -10400,7 +10858,7 @@ public Builder clearGitIntegrationSettings() { * @return Whether the textToSpeechSettings field is set. */ public boolean hasTextToSpeechSettings() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** @@ -10447,7 +10905,7 @@ public Builder setTextToSpeechSettings( } else { textToSpeechSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -10470,7 +10928,7 @@ public Builder setTextToSpeechSettings( } else { textToSpeechSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -10489,7 +10947,7 @@ public Builder setTextToSpeechSettings( public Builder mergeTextToSpeechSettings( com.google.cloud.dialogflow.cx.v3.TextToSpeechSettings value) { if (textToSpeechSettingsBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && textToSpeechSettings_ != null && textToSpeechSettings_ != com.google.cloud.dialogflow.cx.v3.TextToSpeechSettings.getDefaultInstance()) { @@ -10501,7 +10959,7 @@ public Builder mergeTextToSpeechSettings( textToSpeechSettingsBuilder_.mergeFrom(value); } if (textToSpeechSettings_ != null) { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); } return this; @@ -10519,7 +10977,7 @@ public Builder mergeTextToSpeechSettings( * */ public Builder clearTextToSpeechSettings() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); textToSpeechSettings_ = null; if (textToSpeechSettingsBuilder_ != null) { textToSpeechSettingsBuilder_.dispose(); @@ -10542,7 +11000,7 @@ public Builder clearTextToSpeechSettings() { */ public com.google.cloud.dialogflow.cx.v3.TextToSpeechSettings.Builder getTextToSpeechSettingsBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return getTextToSpeechSettingsFieldBuilder().getBuilder(); } @@ -10618,7 +11076,7 @@ public Builder clearTextToSpeechSettings() { * @return Whether the genAppBuilderSettings field is set. */ public boolean hasGenAppBuilderSettings() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** @@ -10666,7 +11124,7 @@ public Builder setGenAppBuilderSettings( } else { genAppBuilderSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -10689,7 +11147,7 @@ public Builder setGenAppBuilderSettings( } else { genAppBuilderSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -10708,7 +11166,7 @@ public Builder setGenAppBuilderSettings( public Builder mergeGenAppBuilderSettings( com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings value) { if (genAppBuilderSettingsBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) + if (((bitField0_ & 0x00040000) != 0) && genAppBuilderSettings_ != null && genAppBuilderSettings_ != com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings @@ -10721,7 +11179,7 @@ public Builder mergeGenAppBuilderSettings( genAppBuilderSettingsBuilder_.mergeFrom(value); } if (genAppBuilderSettings_ != null) { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -10739,7 +11197,7 @@ public Builder mergeGenAppBuilderSettings( * */ public Builder clearGenAppBuilderSettings() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); genAppBuilderSettings_ = null; if (genAppBuilderSettingsBuilder_ != null) { genAppBuilderSettingsBuilder_.dispose(); @@ -10762,7 +11220,7 @@ public Builder clearGenAppBuilderSettings() { */ public com.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.Builder getGenAppBuilderSettingsBuilder() { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return getGenAppBuilderSettingsFieldBuilder().getBuilder(); } @@ -10838,7 +11296,7 @@ public Builder clearGenAppBuilderSettings() { * @return Whether the answerFeedbackSettings field is set. */ public boolean hasAnswerFeedbackSettings() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** @@ -10886,7 +11344,7 @@ public Builder setAnswerFeedbackSettings( } else { answerFeedbackSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -10909,7 +11367,7 @@ public Builder setAnswerFeedbackSettings( } else { answerFeedbackSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -10928,7 +11386,7 @@ public Builder setAnswerFeedbackSettings( public Builder mergeAnswerFeedbackSettings( com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings value) { if (answerFeedbackSettingsBuilder_ == null) { - if (((bitField0_ & 0x00040000) != 0) + if (((bitField0_ & 0x00080000) != 0) && answerFeedbackSettings_ != null && answerFeedbackSettings_ != com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings @@ -10941,7 +11399,7 @@ public Builder mergeAnswerFeedbackSettings( answerFeedbackSettingsBuilder_.mergeFrom(value); } if (answerFeedbackSettings_ != null) { - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); } return this; @@ -10959,7 +11417,7 @@ public Builder mergeAnswerFeedbackSettings( * */ public Builder clearAnswerFeedbackSettings() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); answerFeedbackSettings_ = null; if (answerFeedbackSettingsBuilder_ != null) { answerFeedbackSettingsBuilder_.dispose(); @@ -10982,7 +11440,7 @@ public Builder clearAnswerFeedbackSettings() { */ public com.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.Builder getAnswerFeedbackSettingsBuilder() { - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return getAnswerFeedbackSettingsFieldBuilder().getBuilder(); } @@ -11059,7 +11517,7 @@ public Builder clearAnswerFeedbackSettings() { * @return Whether the personalizationSettings field is set. */ public boolean hasPersonalizationSettings() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** @@ -11107,7 +11565,7 @@ public Builder setPersonalizationSettings( } else { personalizationSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -11130,7 +11588,7 @@ public Builder setPersonalizationSettings( } else { personalizationSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -11149,7 +11607,7 @@ public Builder setPersonalizationSettings( public Builder mergePersonalizationSettings( com.google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings value) { if (personalizationSettingsBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) + if (((bitField0_ & 0x00100000) != 0) && personalizationSettings_ != null && personalizationSettings_ != com.google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings @@ -11162,7 +11620,7 @@ public Builder mergePersonalizationSettings( personalizationSettingsBuilder_.mergeFrom(value); } if (personalizationSettings_ != null) { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); } return this; @@ -11180,7 +11638,7 @@ public Builder mergePersonalizationSettings( * */ public Builder clearPersonalizationSettings() { - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00100000); personalizationSettings_ = null; if (personalizationSettingsBuilder_ != null) { personalizationSettingsBuilder_.dispose(); @@ -11203,7 +11661,7 @@ public Builder clearPersonalizationSettings() { */ public com.google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettings.Builder getPersonalizationSettingsBuilder() { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return getPersonalizationSettingsFieldBuilder().getBuilder(); } @@ -11280,7 +11738,7 @@ public Builder clearPersonalizationSettings() { * @return Whether the clientCertificateSettings field is set. */ public boolean hasClientCertificateSettings() { - return ((bitField0_ & 0x00100000) != 0); + return ((bitField0_ & 0x00200000) != 0); } /** @@ -11328,7 +11786,7 @@ public Builder setClientCertificateSettings( } else { clientCertificateSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -11351,7 +11809,7 @@ public Builder setClientCertificateSettings( } else { clientCertificateSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -11370,7 +11828,7 @@ public Builder setClientCertificateSettings( public Builder mergeClientCertificateSettings( com.google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings value) { if (clientCertificateSettingsBuilder_ == null) { - if (((bitField0_ & 0x00100000) != 0) + if (((bitField0_ & 0x00200000) != 0) && clientCertificateSettings_ != null && clientCertificateSettings_ != com.google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings @@ -11383,7 +11841,7 @@ public Builder mergeClientCertificateSettings( clientCertificateSettingsBuilder_.mergeFrom(value); } if (clientCertificateSettings_ != null) { - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); } return this; @@ -11401,7 +11859,7 @@ public Builder mergeClientCertificateSettings( * */ public Builder clearClientCertificateSettings() { - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); clientCertificateSettings_ = null; if (clientCertificateSettingsBuilder_ != null) { clientCertificateSettingsBuilder_.dispose(); @@ -11424,7 +11882,7 @@ public Builder clearClientCertificateSettings() { */ public com.google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettings.Builder getClientCertificateSettingsBuilder() { - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return getClientCertificateSettingsFieldBuilder().getBuilder(); } @@ -11497,7 +11955,7 @@ public Builder clearClientCertificateSettings() { */ @java.lang.Override public boolean hasSatisfiesPzs() { - return ((bitField0_ & 0x00200000) != 0); + return ((bitField0_ & 0x00400000) != 0); } /** @@ -11537,7 +11995,7 @@ public boolean getSatisfiesPzs() { public Builder setSatisfiesPzs(boolean value) { satisfiesPzs_ = value; - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -11557,7 +12015,7 @@ public Builder setSatisfiesPzs(boolean value) { * @return This builder for chaining. */ public Builder clearSatisfiesPzs() { - bitField0_ = (bitField0_ & ~0x00200000); + bitField0_ = (bitField0_ & ~0x00400000); satisfiesPzs_ = false; onChanged(); return this; @@ -11581,7 +12039,7 @@ public Builder clearSatisfiesPzs() { */ @java.lang.Override public boolean hasSatisfiesPzi() { - return ((bitField0_ & 0x00400000) != 0); + return ((bitField0_ & 0x00800000) != 0); } /** @@ -11621,7 +12079,7 @@ public boolean getSatisfiesPzi() { public Builder setSatisfiesPzi(boolean value) { satisfiesPzi_ = value; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -11641,7 +12099,7 @@ public Builder setSatisfiesPzi(boolean value) { * @return This builder for chaining. */ public Builder clearSatisfiesPzi() { - bitField0_ = (bitField0_ & ~0x00400000); + bitField0_ = (bitField0_ & ~0x00800000); satisfiesPzi_ = false; onChanged(); return this; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java index e51bf90c0031..27e6f5ba3b01 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java @@ -320,15 +320,35 @@ public interface AgentOrBuilder * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
-   * automatically created when the agent is created, and can only be deleted by
-   * deleting the agent. Format:
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format:
    * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * Currently only the default start flow with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startFlow field is set. + */ + boolean hasStartFlow(); + + /** + * + * + *
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * Currently only the default start flow with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The startFlow. */ @@ -338,20 +358,81 @@ public interface AgentOrBuilder * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
-   * automatically created when the agent is created, and can only be deleted by
-   * deleting the agent. Format:
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format:
    * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * Currently only the default start flow with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The bytes for startFlow. */ com.google.protobuf.ByteString getStartFlowBytes(); + /** + * + * + *
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * Currently only the
+   *  default playbook with id
+   *  "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startPlaybook field is set. + */ + boolean hasStartPlaybook(); + + /** + * + * + *
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * Currently only the
+   *  default playbook with id
+   *  "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return The startPlaybook. + */ + java.lang.String getStartPlaybook(); + + /** + * + * + *
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * Currently only the
+   *  default playbook with id
+   *  "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for startPlaybook. + */ + com.google.protobuf.ByteString getStartPlaybookBytes(); + /** * * @@ -397,7 +478,7 @@ public interface AgentOrBuilder * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=368 + * google/cloud/dialogflow/cx/v3/agent.proto;l=385 * @return The enableStackdriverLogging. */ @java.lang.Deprecated @@ -810,4 +891,6 @@ public interface AgentOrBuilder * @return The satisfiesPzi. */ boolean getSatisfiesPzi(); + + com.google.cloud.dialogflow.cx.v3.Agent.SessionEntryResourceCase getSessionEntryResourceCase(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java index dca741a5c52f..e15891768dcc 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java @@ -145,7 +145,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + " google/protobuf/field_mask.proto\032\034google/protobuf/struct.proto\"8\n" + "\024SpeechToTextSettings\022 \n" - + "\030enable_speech_adaptation\030\001 \001(\010\"\305\020\n" + + "\030enable_speech_adaptation\030\001 \001(\010\"\241\021\n" + "\005Agent\022\014\n" + "\004name\030\001 \001(\t\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022%\n" @@ -155,34 +155,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013description\030\006 \001(\t\022\022\n\n" + "avatar_uri\030\007 \001(\t\022T\n" + "\027speech_to_text_settings\030\r" - + " \001(\01323.google.cloud.dialogflow.cx.v3.SpeechToTextSettings\022:\n\n" - + "start_flow\030\020 \001(\tB&\340A\005\372A \n" - + "\036dialogflow.googleapis.com/Flow\022J\n" + + " \001(\01323.google.cloud.dialogflow.cx.v3.SpeechToTextSettings\0229\n\n" + + "start_flow\030\020 \001(\tB#\372A \n" + + "\036dialogflow.googleapis.com/FlowH\000\022A\n" + + "\016start_playbook\030\' \001(\tB\'\372A$\n" + + "\"dialogflow.googleapis.com/PlaybookH\000\022J\n" + "\021security_settings\030\021 \001(\tB/\372A,\n" + "*dialogflow.googleapis.com/SecuritySettings\022&\n" + "\032enable_stackdriver_logging\030\022 \001(\010B\002\030\001\022\037\n" + "\027enable_spell_correction\030\024 \001(\010\022+\n" + "\036enable_multi_language_training\030( \001(\010B\003\340A\001\022\016\n" + "\006locked\030\033 \001(\010\022J\n" - + "\021advanced_settings\030\026 \001(\0132/.goog" - + "le.cloud.dialogflow.cx.v3.AdvancedSettings\022]\n" - + "\030git_integration_settings\030\036 \001(\0132;.g" - + "oogle.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings\022T\n" - + "\027text_to_speech_settings\030\037" - + " \001(\01323.google.cloud.dialogflow.cx.v3.TextToSpeechSettings\022a\n" - + "\030gen_app_builder_settings\030! \001(\0132:.google.cloud.dialogf" - + "low.cx.v3.Agent.GenAppBuilderSettingsH\000\210\001\001\022b\n" - + "\030answer_feedback_settings\030& \001(\0132;.g" - + "oogle.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettingsB\003\340A\001\022c\n" - + "\030personalization_settings\030* \001(\0132<.google.cloud.dialogfl" - + "ow.cx.v3.Agent.PersonalizationSettingsB\003\340A\001\022h\n" - + "\033client_certificate_settings\030+ \001(\013" - + "2>.google.cloud.dialogflow.cx.v3.Agent.ClientCertificateSettingsB\003\340A\001\022\"\n\r" - + "satisfies_pzs\030- \001(\010B\006\340A\001\340A\003H\001\210\001\001\022\"\n\r" - + "satisfies_pzi\030. \001(\010B\006\340A\001\340A\003H\002\210\001\001\032\220\002\n" + + "\021advanced_settings\030\026" + + " \001(\0132/.google.cloud.dialogflow.cx.v3.AdvancedSettings\022]\n" + + "\030git_integration_settings\030\036 \001(\0132;.google.cloud.di" + + "alogflow.cx.v3.Agent.GitIntegrationSettings\022T\n" + + "\027text_to_speech_settings\030\037 \001(\01323.g" + + "oogle.cloud.dialogflow.cx.v3.TextToSpeechSettings\022a\n" + + "\030gen_app_builder_settings\030! " + + "\001(\0132:.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettingsH\001\210\001\001\022b\n" + + "\030answer_feedback_settings\030& \001(\0132;.google.cloud.di" + + "alogflow.cx.v3.Agent.AnswerFeedbackSettingsB\003\340A\001\022c\n" + + "\030personalization_settings\030* \001" + + "(\0132<.google.cloud.dialogflow.cx.v3.Agent.PersonalizationSettingsB\003\340A\001\022h\n" + + "\033client_certificate_settings\030+ \001(\0132>.google.clou" + + "d.dialogflow.cx.v3.Agent.ClientCertificateSettingsB\003\340A\001\022\"\n\r" + + "satisfies_pzs\030- \001(\010B\006\340A\001\340A\003H\002\210\001\001\022\"\n\r" + + "satisfies_pzi\030. \001(\010B\006\340A\001\340A\003H\003\210\001\001\032\220\002\n" + "\026GitIntegrationSettings\022e\n" - + "\017github_settings\030\001 \001(\0132J.goog" - + "le.cloud.dialogflow.cx.v3.Agent.GitIntegrationSettings.GithubSettingsH\000\032\177\n" + + "\017github_settings\030\001 \001(\0132J.google.cloud.dialo" + + "gflow.cx.v3.Agent.GitIntegrationSettings.GithubSettingsH\000\032\177\n" + "\016GithubSettings\022\024\n" + "\014display_name\030\001 \001(\t\022\026\n" + "\016repository_uri\030\002 \001(\t\022\027\n" @@ -203,8 +205,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "*secretmanager.googleapis.com/SecretVersion\022F\n\n" + "passphrase\030\003 \001(\tB2\340A\001\372A,\n" + "*secretmanager.googleapis.com/SecretVersion:\\\352AY\n" - + "\037dialogflow." - + "googleapis.com/Agent\0226projects/{project}/locations/{location}/agents/{agent}B\033\n" + + "\037dialogflow.googleapis.com" + + "/Agent\0226projects/{project}/locations/{location}/agents/{agent}B\030\n" + + "\026session_entry_resourceB\033\n" + "\031_gen_app_builder_settingsB\020\n" + "\016_satisfies_pzsB\020\n" + "\016_satisfies_pzi\"s\n" @@ -234,12 +237,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB\'\340A\002\372A!\n" + "\037dialogflow.googleapis.com/Agent\022\026\n" + "\tagent_uri\030\002 \001(\tB\003\340A\001\022V\n" - + "\013data_format\030\003 \001(\0162<.google.cloud.dial" - + "ogflow.cx.v3.ExportAgentRequest.DataFormatB\003\340A\001\022B\n" + + "\013data_format\030\003 \001(\0162<.googl" + + "e.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormatB\003\340A\001\022B\n" + "\013environment\030\005 \001(\tB-\340A\001\372A\'\n" + "%dialogflow.googleapis.com/Environment\022^\n" - + "\017git_destination\030\006 \001(\0132@.google.cloud.dial" - + "ogflow.cx.v3.ExportAgentRequest.GitDestinationB\003\340A\001\022-\n" + + "\017git_destination\030\006 \001(\0132@.googl" + + "e.cloud.dialogflow.cx.v3.ExportAgentRequest.GitDestinationB\003\340A\001\022-\n" + " include_bigquery_export_settings\030\007 \001(\010B\003\340A\001\032A\n" + "\016GitDestination\022\027\n" + "\017tracking_branch\030\001 \001(\t\022\026\n" @@ -250,7 +253,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014JSON_PACKAGE\020\004\"b\n" + "\023ExportAgentResponse\022\023\n" + "\tagent_uri\030\001 \001(\tH\000\022\027\n\r" - + "agent_content\030\002 \001(\014H\000\022\024\n\n" + + "agent_content\030\002 \001(\014H\000\022\024\n" + + "\n" + "commit_sha\030\003 \001(\tH\000B\007\n" + "\005agent\"\240\003\n" + "\023RestoreAgentRequest\0225\n" @@ -258,10 +262,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037dialogflow.googleapis.com/Agent\022\023\n" + "\tagent_uri\030\002 \001(\tH\000\022\027\n\r" + "agent_content\030\003 \001(\014H\000\022R\n\n" - + "git_source\030\006 \001(" - + "\0132<.google.cloud.dialogflow.cx.v3.RestoreAgentRequest.GitSourceH\000\022X\n" - + "\016restore_option\030\005" - + " \001(\0162@.google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption\032$\n" + + "git_source\030\006" + + " \001(\0132<.google.cloud.dialogflow.cx.v3.RestoreAgentRequest.GitSourceH\000\022X\n" + + "\016restore_option\030\005 \001(\0162@.google.cloud.dia" + + "logflow.cx.v3.RestoreAgentRequest.RestoreOption\032$\n" + "\tGitSource\022\027\n" + "\017tracking_branch\030\001 \001(\t\"G\n\r" + "RestoreOption\022\036\n" @@ -279,69 +283,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "language_code\030\002 \001(\t\"\372\001\n" + "\025AgentValidationResult\022\014\n" + "\004name\030\001 \001(\t\022T\n" - + "\027flow_validation_results\030\002" - + " \003(\01323.google.cloud.dialogflow.cx.v3.FlowValidationResult:}\352Az\n" - + "/dialogflow.googleapis.com/AgentValidationResult\022Gprojects/{project}/locations/{lo" - + "cation}/agents/{agent}/validationResult\"\203\001\n" + + "\027flow_validation_results\030\002 \003(\01323.google" + + ".cloud.dialogflow.cx.v3.FlowValidationResult:}\352Az\n" + + "/dialogflow.googleapis.com/AgentValidationResult\022Gprojects/{project}/l" + + "ocations/{location}/agents/{agent}/validationResult\"\203\001\n" + "\034GetGenerativeSettingsRequest\022G\n" + "\004name\030\001 \001(\tB9\340A\002\372A3\n" - + "1dialogflow.googleapis.com/AgentGenerativeSettings\022\032\n\r" + + "1dialogflow.googleapis.com/AgentGenerativeSettings\022\032\n" + + "\r" + "language_code\030\002 \001(\tB\003\340A\002\"\254\001\n" + "\037UpdateGenerativeSettingsRequest\022S\n" - + "\023generative_settings\030\001 \001(\01321" - + ".google.cloud.dialogflow.cx.v3.GenerativeSettingsB\003\340A\002\0224\n" + + "\023generative_settings\030\001" + + " \001(\01321.google.cloud.dialogflow.cx.v3.GenerativeSettingsB\003\340A\002\0224\n" + "\013update_mask\030\002" + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\0012\242\022\n" + "\006Agents\022\256\001\n\n" - + "ListAgents\0220.google.cloud.dialogflow.cx.v3.ListAgentsRequest\0321.google.cloud." - + "dialogflow.cx.v3.ListAgentsResponse\";\332A\006" - + "parent\202\323\344\223\002,\022*/v3/{parent=projects/*/locations/*}/agents\022\233\001\n" - + "\010GetAgent\022..google.cloud.dialogflow.cx.v3.GetAgentRequest\032$." - + "google.cloud.dialogflow.cx.v3.Agent\"9\332A\004" - + "name\202\323\344\223\002,\022*/v3/{name=projects/*/locations/*/agents/*}\022\260\001\n" - + "\013CreateAgent\0221.google.cloud.dialogflow.cx.v3.CreateAgentReques" - + "t\032$.google.cloud.dialogflow.cx.v3.Agent\"" - + "H\332A\014parent,agent\202\323\344\223\0023\"*/v3/{parent=projects/*/locations/*}/agents:\005agent\022\273\001\n" - + "\013UpdateAgent\0221.google.cloud.dialogflow.cx.v" - + "3.UpdateAgentRequest\032$.google.cloud.dial" - + "ogflow.cx.v3.Agent\"S\332A\021agent,update_mask" - + "\202\323\344\223\002920/v3/{agent.name=projects/*/locations/*/agents/*}:\005agent\022\223\001\n" - + "\013DeleteAgent\0221.google.cloud.dialogflow.cx.v3.DeleteAg" - + "entRequest\032\026.google.protobuf.Empty\"9\332A\004n" - + "ame\202\323\344\223\002,**/v3/{name=projects/*/locations/*/agents/*}\022\315\001\n" - + "\013ExportAgent\0221.google.c" - + "loud.dialogflow.cx.v3.ExportAgentRequest\032\035.google.longrunning.Operation\"l\312A-\n" - + "\023ExportAgentResponse\022\026google.protobuf.Struc" - + "t\202\323\344\223\0026\"1/v3/{name=projects/*/locations/*/agents/*}:export:\001*\022\322\001\n" - + "\014RestoreAgent\0222.google.cloud.dialogflow.cx.v3.RestoreAg" - + "entRequest\032\035.google.longrunning.Operation\"o\312A/\n" - + "\025google.protobuf.Empty\022\026google.pr" - + "otobuf.Struct\202\323\344\223\0027\"2/v3/{name=projects/*/locations/*/agents/*}:restore:\001*\022\272\001\n\r" - + "ValidateAgent\0223.google.cloud.dialogflow.c" - + "x.v3.ValidateAgentRequest\0324.google.cloud.dialogflow.cx.v3.AgentValidationResult\"" - + ">\202\323\344\223\0028\"3/v3/{name=projects/*/locations/*/agents/*}:validate:\001*\022\334\001\n" - + "\030GetAgentValidationResult\022>.google.cloud.dialogflow.c" - + "x.v3.GetAgentValidationResultRequest\0324.google.cloud.dialogflow.cx.v3.AgentValida" - + "tionResult\"J\332A\004name\202\323\344\223\002=\022;/v3/{name=pro" - + "jects/*/locations/*/agents/*/validationResult}\022\343\001\n" - + "\025GetGenerativeSettings\022;.google.cloud.dialogflow.cx.v3.GetGenerativeSe" - + "ttingsRequest\0321.google.cloud.dialogflow." - + "cx.v3.GenerativeSettings\"Z\332A\022name,langua" - + "ge_code\202\323\344\223\002?\022=/v3/{name=projects/*/locations/*/agents/*/generativeSettings}\022\240\002\n" - + "\030UpdateGenerativeSettings\022>.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettin" - + "gsRequest\0321.google.cloud.dialogflow.cx.v" - + "3.GenerativeSettings\"\220\001\332A\037generative_set" - + "tings,update_mask\202\323\344\223\002h2Q/v3/{generative" - + "_settings.name=projects/*/locations/*/agents/*/generativeSettings}:\023generative_s" - + "ettings\032x\312A\031dialogflow.googleapis.com\322AY" - + "https://www.googleapis.com/auth/cloud-pl" - + "atform,https://www.googleapis.com/auth/dialogflowB\224\002\n" + + "ListAgents\0220.google.cloud.dialogflow.cx.v3.ListAgentsRequest\0321.g" + + "oogle.cloud.dialogflow.cx.v3.ListAgentsR" + + "esponse\";\332A\006parent\202\323\344\223\002,\022*/v3/{parent=projects/*/locations/*}/agents\022\233\001\n" + + "\010GetAgent\022..google.cloud.dialogflow.cx.v3.GetAge" + + "ntRequest\032$.google.cloud.dialogflow.cx.v" + + "3.Agent\"9\332A\004name\202\323\344\223\002,\022*/v3/{name=projects/*/locations/*/agents/*}\022\260\001\n" + + "\013CreateAgent\0221.google.cloud.dialogflow.cx.v3.Creat" + + "eAgentRequest\032$.google.cloud.dialogflow." + + "cx.v3.Agent\"H\332A\014parent,agent\202\323\344\223\0023\"*/v3/" + + "{parent=projects/*/locations/*}/agents:\005agent\022\273\001\n" + + "\013UpdateAgent\0221.google.cloud.dialogflow.cx.v3.UpdateAgentRequest\032$.googl" + + "e.cloud.dialogflow.cx.v3.Agent\"S\332A\021agent" + + ",update_mask\202\323\344\223\002920/v3/{agent.name=projects/*/locations/*/agents/*}:\005agent\022\223\001\n" + + "\013DeleteAgent\0221.google.cloud.dialogflow.cx" + + ".v3.DeleteAgentRequest\032\026.google.protobuf" + + ".Empty\"9\332A\004name\202\323\344\223\002,**/v3/{name=projects/*/locations/*/agents/*}\022\315\001\n" + + "\013ExportAgent\0221.google.cloud.dialogflow.cx.v3.Export" + + "AgentRequest\032\035.google.longrunning.Operation\"l\312A-\n" + + "\023ExportAgentResponse\022\026google.pr" + + "otobuf.Struct\202\323\344\223\0026\"1/v3/{name=projects/*/locations/*/agents/*}:export:\001*\022\322\001\n" + + "\014RestoreAgent\0222.google.cloud.dialogflow.cx." + + "v3.RestoreAgentRequest\032\035.google.longrunning.Operation\"o\312A/\n" + + "\025google.protobuf.Empty\022\026google.protobuf.Struct\202\323\344\223\0027\"2/v3/{na" + + "me=projects/*/locations/*/agents/*}:restore:\001*\022\272\001\n\r" + + "ValidateAgent\0223.google.cloud.dialogflow.cx.v3.ValidateAgentRequest\0324." + + "google.cloud.dialogflow.cx.v3.AgentValid" + + "ationResult\">\202\323\344\223\0028\"3/v3/{name=projects/*/locations/*/agents/*}:validate:\001*\022\334\001\n" + + "\030GetAgentValidationResult\022>.google.cloud." + + "dialogflow.cx.v3.GetAgentValidationResultRequest\0324.google.cloud.dialogflow.cx.v3" + + ".AgentValidationResult\"J\332A\004name\202\323\344\223\002=\022;/" + + "v3/{name=projects/*/locations/*/agents/*/validationResult}\022\343\001\n" + + "\025GetGenerativeSettings\022;.google.cloud.dialogflow.cx.v3.Get" + + "GenerativeSettingsRequest\0321.google.cloud" + + ".dialogflow.cx.v3.GenerativeSettings\"Z\332A" + + "\022name,language_code\202\323\344\223\002?\022=/v3/{name=pro" + + "jects/*/locations/*/agents/*/generativeSettings}\022\240\002\n" + + "\030UpdateGenerativeSettings\022>.google.cloud.dialogflow.cx.v3.UpdateGene" + + "rativeSettingsRequest\0321.google.cloud.dia" + + "logflow.cx.v3.GenerativeSettings\"\220\001\332A\037ge" + + "nerative_settings,update_mask\202\323\344\223\002h2Q/v3" + + "/{generative_settings.name=projects/*/locations/*/agents/*/generativeSettings}:\023" + + "generative_settings\032x\312A\031dialogflow.googl" + + "eapis.com\322AYhttps://www.googleapis.com/a" + + "uth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\224\002\n" + "!com.google.cloud.dialogflow.cx.v3B\n" - + "AgentProtoP\001Z1cloud.google.com/" - + "go/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035" - + "Google.Cloud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3\352Ad\n" - + "*secretmanager.googleapis.com/SecretVersion\0226projec" - + "ts/{project}/secrets/{secret}/versions/{version}b\006proto3" + + "AgentProtoP\001Z1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;" + + "cxpb\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V" + + "3\352\002!Google::Cloud::Dialogflow::CX::V3\352Ad\n" + + "*secretmanager.googleapis.com/SecretVersion\0226projects/{project}/secrets/{secret" + + "}/versions/{version}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -383,6 +389,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AvatarUri", "SpeechToTextSettings", "StartFlow", + "StartPlaybook", "SecuritySettings", "EnableStackdriverLogging", "EnableSpellCorrection", @@ -397,6 +404,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ClientCertificateSettings", "SatisfiesPzs", "SatisfiesPzi", + "SessionEntryResource", }); internal_static_google_cloud_dialogflow_cx_v3_Agent_GitIntegrationSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3_Agent_descriptor.getNestedTypes().get(0); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentUtterance.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentUtterance.java new file mode 100644 index 000000000000..f944966fb31d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentUtterance.java @@ -0,0 +1,634 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * AgentUtterance represents one message sent by the agent.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AgentUtterance} + */ +public final class AgentUtterance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.AgentUtterance) + AgentUtteranceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AgentUtterance.newBuilder() to construct. + private AgentUtterance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AgentUtterance() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AgentUtterance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AgentUtterance.class, + com.google.cloud.dialogflow.cx.v3.AgentUtterance.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + 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(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + 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.v3.AgentUtterance)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.AgentUtterance other = + (com.google.cloud.dialogflow.cx.v3.AgentUtterance) obj; + + if (!getText().equals(other.getText())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.AgentUtterance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentUtterance 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.v3.AgentUtterance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentUtterance 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.v3.AgentUtterance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentUtterance 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.v3.AgentUtterance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentUtterance 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.v3.AgentUtterance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentUtterance 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.v3.AgentUtterance 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.v3.AgentUtterance 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.v3.AgentUtterance 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; + } + + /** + * + * + *
+   * AgentUtterance represents one message sent by the agent.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AgentUtterance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.AgentUtterance) + com.google.cloud.dialogflow.cx.v3.AgentUtteranceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AgentUtterance.class, + com.google.cloud.dialogflow.cx.v3.AgentUtterance.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.AgentUtterance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentUtterance getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentUtterance build() { + com.google.cloud.dialogflow.cx.v3.AgentUtterance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AgentUtterance buildPartial() { + com.google.cloud.dialogflow.cx.v3.AgentUtterance result = + new com.google.cloud.dialogflow.cx.v3.AgentUtterance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.AgentUtterance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + } + + @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.v3.AgentUtterance) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.AgentUtterance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.AgentUtterance other) { + if (other == com.google.cloud.dialogflow.cx.v3.AgentUtterance.getDefaultInstance()) + return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + 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: + { + text_ = input.readStringRequireUtf8(); + 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 java.lang.Object text_ = ""; + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + 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.v3.AgentUtterance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.AgentUtterance) + private static final com.google.cloud.dialogflow.cx.v3.AgentUtterance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.AgentUtterance(); + } + + public static com.google.cloud.dialogflow.cx.v3.AgentUtterance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentUtterance 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.v3.AgentUtterance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentUtteranceOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentUtteranceOrBuilder.java new file mode 100644 index 000000000000..e31ba9d30b2c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentUtteranceOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface AgentUtteranceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.AgentUtterance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioEncoding.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioEncoding.java index babf1674bc37..8ac8f1fddf65 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioEncoding.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioEncoding.java @@ -48,6 +48,7 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum { * *
    * Uncompressed 16-bit signed little-endian samples (Linear PCM).
+   * LINT: LEGACY_NAMES
    * 
* * AUDIO_ENCODING_LINEAR_16 = 1; @@ -160,6 +161,7 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum { * *
    * Uncompressed 16-bit signed little-endian samples (Linear PCM).
+   * LINT: LEGACY_NAMES
    * 
* * AUDIO_ENCODING_LINEAR_16 = 1; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlock.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlock.java new file mode 100644 index 000000000000..b48ad0844036 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlock.java @@ -0,0 +1,633 @@ +/* + * Copyright 2026 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/v3/code_block.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Represents a code block.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CodeBlock} + */ +public final class CodeBlock extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CodeBlock) + CodeBlockOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CodeBlock.newBuilder() to construct. + private CodeBlock(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CodeBlock() { + code_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CodeBlock(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.CodeBlockProto + .internal_static_google_cloud_dialogflow_cx_v3_CodeBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.CodeBlockProto + .internal_static_google_cloud_dialogflow_cx_v3_CodeBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CodeBlock.class, + com.google.cloud.dialogflow.cx.v3.CodeBlock.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object code_ = ""; + + /** + * + * + *
+   * Optional. Source code of the block in Python.
+   * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The code. + */ + @java.lang.Override + public java.lang.String getCode() { + java.lang.Object ref = code_; + 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(); + code_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Source code of the block in Python.
+   * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for code. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(code_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, code_); + } + 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(code_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, code_); + } + 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.v3.CodeBlock)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CodeBlock other = + (com.google.cloud.dialogflow.cx.v3.CodeBlock) obj; + + if (!getCode().equals(other.getCode())) 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) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CodeBlock parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CodeBlock 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.v3.CodeBlock parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CodeBlock 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.v3.CodeBlock parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CodeBlock 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.v3.CodeBlock parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CodeBlock 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.v3.CodeBlock parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CodeBlock 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.v3.CodeBlock 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.v3.CodeBlock 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.v3.CodeBlock 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; + } + + /** + * + * + *
+   * Represents a code block.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CodeBlock} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CodeBlock) + com.google.cloud.dialogflow.cx.v3.CodeBlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.CodeBlockProto + .internal_static_google_cloud_dialogflow_cx_v3_CodeBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.CodeBlockProto + .internal_static_google_cloud_dialogflow_cx_v3_CodeBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CodeBlock.class, + com.google.cloud.dialogflow.cx.v3.CodeBlock.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CodeBlock.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.CodeBlockProto + .internal_static_google_cloud_dialogflow_cx_v3_CodeBlock_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CodeBlock getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CodeBlock.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CodeBlock build() { + com.google.cloud.dialogflow.cx.v3.CodeBlock result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CodeBlock buildPartial() { + com.google.cloud.dialogflow.cx.v3.CodeBlock result = + new com.google.cloud.dialogflow.cx.v3.CodeBlock(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.CodeBlock result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + } + + @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.v3.CodeBlock) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CodeBlock) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CodeBlock other) { + if (other == com.google.cloud.dialogflow.cx.v3.CodeBlock.getDefaultInstance()) return this; + if (!other.getCode().isEmpty()) { + code_ = other.code_; + bitField0_ |= 0x00000001; + 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: + { + code_ = input.readStringRequireUtf8(); + 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 java.lang.Object code_ = ""; + + /** + * + * + *
+     * Optional. Source code of the block in Python.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Source code of the block in Python.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for code. + */ + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Source code of the block in Python.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Source code of the block in Python.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + code_ = getDefaultInstance().getCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Source code of the block in Python.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + code_ = value; + bitField0_ |= 0x00000001; + 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.v3.CodeBlock) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CodeBlock) + private static final com.google.cloud.dialogflow.cx.v3.CodeBlock DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CodeBlock(); + } + + public static com.google.cloud.dialogflow.cx.v3.CodeBlock getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CodeBlock 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.v3.CodeBlock getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlockOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlockOrBuilder.java new file mode 100644 index 000000000000..2b17b83de601 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlockOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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/v3/code_block.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface CodeBlockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CodeBlock) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Source code of the block in Python.
+   * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The code. + */ + java.lang.String getCode(); + + /** + * + * + *
+   * Optional. Source code of the block in Python.
+   * 
+ * + * string code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for code. + */ + com.google.protobuf.ByteString getCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlockProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlockProto.java new file mode 100644 index 000000000000..3bdfbbcd1e3c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CodeBlockProto.java @@ -0,0 +1,76 @@ +/* + * Copyright 2026 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/v3/code_block.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public final class CodeBlockProto { + private CodeBlockProto() {} + + 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_v3_CodeBlock_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CodeBlock_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/v3/code_blo" + + "ck.proto\022\035google.cloud.dialogflow.cx.v3\032" + + "\037google/api/field_behavior.proto\"\036\n\tCode" + + "Block\022\021\n\004code\030\001 \001(\tB\003\340A\001B\215\001\n!com.google." + + "cloud.dialogflow.cx.v3B\016CodeBlockProtoP\001" + + "Z1cloud.google.com/go/dialogflow/cx/apiv" + + "3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud.Dialogfl" + + "ow.Cx.V3b\006proto3" + }; + 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_v3_CodeBlock_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_CodeBlock_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CodeBlock_descriptor, + new java.lang.String[] { + "Code", + }); + 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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExampleRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExampleRequest.java new file mode 100644 index 000000000000..200974ff23d5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExampleRequest.java @@ -0,0 +1,980 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Examples.CreateExample][google.cloud.dialogflow.cx.v3.Examples.CreateExample].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateExampleRequest} + */ +public final class CreateExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreateExampleRequest) + CreateExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateExampleRequest.newBuilder() to construct. + private CreateExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateExampleRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateExampleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The playbook to create an example for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * 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 playbook to create an example for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * 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 EXAMPLE_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.Example example_; + + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + @java.lang.Override + public boolean hasExample() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Example getExample() { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance() + : example_; + } + + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExampleOrBuilder() { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance() + : example_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getExample()); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExample()); + } + 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.v3.CreateExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest other = + (com.google.cloud.dialogflow.cx.v3.CreateExampleRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasExample() != other.hasExample()) return false; + if (hasExample()) { + if (!getExample().equals(other.getExample())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasExample()) { + hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getExample().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExampleRequest 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.v3.CreateExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExampleRequest 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.v3.CreateExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExampleRequest 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.v3.CreateExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExampleRequest 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.v3.CreateExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExampleRequest 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.v3.CreateExampleRequest 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.v3.CreateExampleRequest 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.v3.CreateExampleRequest 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
+   * [Examples.CreateExample][google.cloud.dialogflow.cx.v3.Examples.CreateExample].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CreateExampleRequest) + com.google.cloud.dialogflow.cx.v3.CreateExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CreateExampleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExampleFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + example_ = null; + if (exampleBuilder_ != null) { + exampleBuilder_.dispose(); + exampleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateExampleRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CreateExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateExampleRequest build() { + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateExampleRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.CreateExampleRequest result = + new com.google.cloud.dialogflow.cx.v3.CreateExampleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.CreateExampleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.example_ = exampleBuilder_ == null ? example_ : exampleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.CreateExampleRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CreateExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CreateExampleRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.CreateExampleRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasExample()) { + mergeExample(other.getExample()); + } + 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: + { + input.readMessage(getExampleFieldBuilder().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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The playbook to create an example for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to create an example for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to create an example for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to create an example for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to create an example for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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.cloud.dialogflow.cx.v3.Example example_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder> + exampleBuilder_; + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + public boolean hasExample() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + public com.google.cloud.dialogflow.cx.v3.Example getExample() { + if (exampleBuilder_ == null) { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance() + : example_; + } else { + return exampleBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExample(com.google.cloud.dialogflow.cx.v3.Example value) { + if (exampleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + example_ = value; + } else { + exampleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExample(com.google.cloud.dialogflow.cx.v3.Example.Builder builderForValue) { + if (exampleBuilder_ == null) { + example_ = builderForValue.build(); + } else { + exampleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExample(com.google.cloud.dialogflow.cx.v3.Example value) { + if (exampleBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && example_ != null + && example_ != com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance()) { + getExampleBuilder().mergeFrom(value); + } else { + example_ = value; + } + } else { + exampleBuilder_.mergeFrom(value); + } + if (example_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExample() { + bitField0_ = (bitField0_ & ~0x00000002); + example_ = null; + if (exampleBuilder_ != null) { + exampleBuilder_.dispose(); + exampleBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Example.Builder getExampleBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getExampleFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExampleOrBuilder() { + if (exampleBuilder_ != null) { + return exampleBuilder_.getMessageOrBuilder(); + } else { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance() + : example_; + } + } + + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder> + getExampleFieldBuilder() { + if (exampleBuilder_ == null) { + exampleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder>( + getExample(), getParentForChildren(), isClean()); + example_ = null; + } + return exampleBuilder_; + } + + @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.v3.CreateExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CreateExampleRequest) + private static final com.google.cloud.dialogflow.cx.v3.CreateExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CreateExampleRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateExampleRequest 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.v3.CreateExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExampleRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExampleRequestOrBuilder.java new file mode 100644 index 000000000000..9f8edb076788 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateExampleRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface CreateExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreateExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to create an example for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The playbook to create an example for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + boolean hasExample(); + + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + com.google.cloud.dialogflow.cx.v3.Example getExample(); + + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExampleOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookRequest.java new file mode 100644 index 000000000000..a4633019c0a2 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookRequest.java @@ -0,0 +1,973 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.CreatePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreatePlaybookRequest} + */ +public final class CreatePlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreatePlaybookRequest) + CreatePlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreatePlaybookRequest.newBuilder() to construct. + private CreatePlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePlaybookRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The agent to create a playbook for.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 create a playbook for.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 PLAYBOOK_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.Playbook playbook_; + + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + @java.lang.Override + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlaybook()); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaybook()); + } + 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.v3.CreatePlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPlaybook() != other.hasPlaybook()) return false; + if (hasPlaybook()) { + if (!getPlaybook().equals(other.getPlaybook())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPlaybook()) { + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest 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.v3.CreatePlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest 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.v3.CreatePlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest 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.v3.CreatePlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest 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.v3.CreatePlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest 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.v3.CreatePlaybookRequest 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.v3.CreatePlaybookRequest 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.v3.CreatePlaybookRequest 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
+   * [Playbooks.CreatePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreatePlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CreatePlaybookRequest) + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.playbook_ = playbookBuilder_ == null ? playbook_ : playbookBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.CreatePlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPlaybook()) { + mergePlaybook(other.getPlaybook()); + } + 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: + { + input.readMessage(getPlaybookFieldBuilder().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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The agent to create a playbook for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 create a playbook for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 create a playbook for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 create a playbook for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 create a playbook for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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.cloud.dialogflow.cx.v3.Playbook playbook_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + playbookBuilder_; + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook() { + if (playbookBuilder_ == null) { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } else { + return playbookBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + } else { + playbookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3.Playbook.Builder builderForValue) { + if (playbookBuilder_ == null) { + playbook_ = builderForValue.build(); + } else { + playbookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePlaybook(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbookBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && playbook_ != null + && playbook_ != com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance()) { + getPlaybookBuilder().mergeFrom(value); + } else { + playbook_ = value; + } + } else { + playbookBuilder_.mergeFrom(value); + } + if (playbook_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPlaybook() { + bitField0_ = (bitField0_ & ~0x00000002); + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Builder getPlaybookBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPlaybookFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder() { + if (playbookBuilder_ != null) { + return playbookBuilder_.getMessageOrBuilder(); + } else { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + } + + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + getPlaybookFieldBuilder() { + if (playbookBuilder_ == null) { + playbookBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder>( + getPlaybook(), getParentForChildren(), isClean()); + playbook_ = null; + } + return playbookBuilder_; + } + + @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.v3.CreatePlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CreatePlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePlaybookRequest 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.v3.CreatePlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..e9bfe32ac0cf --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface CreatePlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreatePlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to create a playbook for.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The agent to create a playbook for.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + boolean hasPlaybook(); + + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook(); + + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookVersionRequest.java new file mode 100644 index 000000000000..ac075c6f0c53 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookVersionRequest.java @@ -0,0 +1,990 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.CreatePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest} + */ +public final class CreatePlaybookVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest) + CreatePlaybookVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreatePlaybookVersionRequest.newBuilder() to construct. + private CreatePlaybookVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePlaybookVersionRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePlaybookVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The playbook to create a version for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * 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 playbook to create a version for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * 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 PLAYBOOK_VERSION_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.PlaybookVersion playbookVersion_; + + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbookVersion field is set. + */ + @java.lang.Override + public boolean hasPlaybookVersion() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookVersion. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion getPlaybookVersion() { + return playbookVersion_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance() + : playbookVersion_; + } + + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder getPlaybookVersionOrBuilder() { + return playbookVersion_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance() + : playbookVersion_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlaybookVersion()); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaybookVersion()); + } + 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.v3.CreatePlaybookVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest other = + (com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPlaybookVersion() != other.hasPlaybookVersion()) return false; + if (hasPlaybookVersion()) { + if (!getPlaybookVersion().equals(other.getPlaybookVersion())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPlaybookVersion()) { + hash = (37 * hash) + PLAYBOOK_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest 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.v3.CreatePlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest 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.v3.CreatePlaybookVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest 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.v3.CreatePlaybookVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest 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.v3.CreatePlaybookVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest 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.v3.CreatePlaybookVersionRequest 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.v3.CreatePlaybookVersionRequest 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.v3.CreatePlaybookVersionRequest 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
+   * [Playbooks.CreatePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest) + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookVersionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + playbookVersion_ = null; + if (playbookVersionBuilder_ != null) { + playbookVersionBuilder_.dispose(); + playbookVersionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest build() { + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest result = + new com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.playbookVersion_ = + playbookVersionBuilder_ == null ? playbookVersion_ : playbookVersionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.CreatePlaybookVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPlaybookVersion()) { + mergePlaybookVersion(other.getPlaybookVersion()); + } + 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: + { + input.readMessage(getPlaybookVersionFieldBuilder().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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The playbook to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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.cloud.dialogflow.cx.v3.PlaybookVersion playbookVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder> + playbookVersionBuilder_; + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbookVersion field is set. + */ + public boolean hasPlaybookVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookVersion. + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion getPlaybookVersion() { + if (playbookVersionBuilder_ == null) { + return playbookVersion_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance() + : playbookVersion_; + } else { + return playbookVersionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybookVersion(com.google.cloud.dialogflow.cx.v3.PlaybookVersion value) { + if (playbookVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookVersion_ = value; + } else { + playbookVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybookVersion( + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder builderForValue) { + if (playbookVersionBuilder_ == null) { + playbookVersion_ = builderForValue.build(); + } else { + playbookVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePlaybookVersion(com.google.cloud.dialogflow.cx.v3.PlaybookVersion value) { + if (playbookVersionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && playbookVersion_ != null + && playbookVersion_ + != com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance()) { + getPlaybookVersionBuilder().mergeFrom(value); + } else { + playbookVersion_ = value; + } + } else { + playbookVersionBuilder_.mergeFrom(value); + } + if (playbookVersion_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPlaybookVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + playbookVersion_ = null; + if (playbookVersionBuilder_ != null) { + playbookVersionBuilder_.dispose(); + playbookVersionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder getPlaybookVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPlaybookVersionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder + getPlaybookVersionOrBuilder() { + if (playbookVersionBuilder_ != null) { + return playbookVersionBuilder_.getMessageOrBuilder(); + } else { + return playbookVersion_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance() + : playbookVersion_; + } + } + + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder> + getPlaybookVersionFieldBuilder() { + if (playbookVersionBuilder_ == null) { + playbookVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder>( + getPlaybookVersion(), getParentForChildren(), isClean()); + playbookVersion_ = null; + } + return playbookVersionBuilder_; + } + + @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.v3.CreatePlaybookVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePlaybookVersionRequest 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.v3.CreatePlaybookVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookVersionRequestOrBuilder.java new file mode 100644 index 000000000000..070341f2d8d0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreatePlaybookVersionRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface CreatePlaybookVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to create a version for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The playbook to create a version for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbookVersion field is set. + */ + boolean hasPlaybookVersion(); + + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookVersion. + */ + com.google.cloud.dialogflow.cx.v3.PlaybookVersion getPlaybookVersion(); + + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder getPlaybookVersionOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolRequest.java new file mode 100644 index 000000000000..d4017bc4bfa0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolRequest.java @@ -0,0 +1,952 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.CreateTool][google.cloud.dialogflow.cx.v3.Tools.CreateTool].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateToolRequest} + */ +public final class CreateToolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreateToolRequest) + CreateToolRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateToolRequest.newBuilder() to construct. + private CreateToolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateToolRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateToolRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreateToolRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateToolRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The agent to create a Tool for.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 create a Tool for.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 TOOL_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.Tool tool_; + + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + @java.lang.Override + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool getTool() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTool()); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTool()); + } + 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.v3.CreateToolRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CreateToolRequest other = + (com.google.cloud.dialogflow.cx.v3.CreateToolRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTool() != other.hasTool()) return false; + if (hasTool()) { + if (!getTool().equals(other.getTool())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasTool()) { + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolRequest 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.v3.CreateToolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolRequest 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.v3.CreateToolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolRequest 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.v3.CreateToolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolRequest 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.v3.CreateToolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolRequest 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.v3.CreateToolRequest 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.v3.CreateToolRequest 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.v3.CreateToolRequest 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
+   * [Tools.CreateTool][google.cloud.dialogflow.cx.v3.Tools.CreateTool].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateToolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CreateToolRequest) + com.google.cloud.dialogflow.cx.v3.CreateToolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreateToolRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateToolRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CreateToolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getToolFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateToolRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CreateToolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateToolRequest build() { + com.google.cloud.dialogflow.cx.v3.CreateToolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateToolRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.CreateToolRequest result = + new com.google.cloud.dialogflow.cx.v3.CreateToolRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.CreateToolRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tool_ = toolBuilder_ == null ? tool_ : toolBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.CreateToolRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CreateToolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CreateToolRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.CreateToolRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTool()) { + mergeTool(other.getTool()); + } + 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: + { + input.readMessage(getToolFieldBuilder().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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The agent to create a Tool for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 create a Tool for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 create a Tool for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 create a Tool for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 create a Tool for.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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.cloud.dialogflow.cx.v3.Tool tool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + toolBuilder_; + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + public boolean hasTool() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + public com.google.cloud.dialogflow.cx.v3.Tool getTool() { + if (toolBuilder_ == null) { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } else { + return toolBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + } else { + toolBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3.Tool.Builder builderForValue) { + if (toolBuilder_ == null) { + tool_ = builderForValue.build(); + } else { + toolBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTool(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && tool_ != null + && tool_ != com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance()) { + getToolBuilder().mergeFrom(value); + } else { + tool_ = value; + } + } else { + toolBuilder_.mergeFrom(value); + } + if (tool_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTool() { + bitField0_ = (bitField0_ & ~0x00000002); + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Builder getToolBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getToolFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder() { + if (toolBuilder_ != null) { + return toolBuilder_.getMessageOrBuilder(); + } else { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + } + + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + getToolFieldBuilder() { + if (toolBuilder_ == null) { + toolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder>( + getTool(), getParentForChildren(), isClean()); + tool_ = null; + } + return toolBuilder_; + } + + @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.v3.CreateToolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CreateToolRequest) + private static final com.google.cloud.dialogflow.cx.v3.CreateToolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CreateToolRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateToolRequest 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.v3.CreateToolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolRequestOrBuilder.java new file mode 100644 index 000000000000..bca6c070eb9c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface CreateToolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreateToolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to create a Tool for.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The agent to create a Tool for.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + boolean hasTool(); + + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + com.google.cloud.dialogflow.cx.v3.Tool getTool(); + + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolVersionRequest.java new file mode 100644 index 000000000000..ebc14d1a0387 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolVersionRequest.java @@ -0,0 +1,986 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.CreateToolVersion][google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion].
+ * The request message for
+ * [Tools.CreateToolVersion][google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateToolVersionRequest} + */ +public final class CreateToolVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.CreateToolVersionRequest) + CreateToolVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateToolVersionRequest.newBuilder() to construct. + private CreateToolVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateToolVersionRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateToolVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The tool to create a version for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * 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 tool to create a version for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * 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 TOOL_VERSION_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.ToolVersion toolVersion_; + + /** + * + * + *
+   * Required. The tool version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the toolVersion field is set. + */ + @java.lang.Override + public boolean hasToolVersion() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The tool version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The toolVersion. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolVersion getToolVersion() { + return toolVersion_ == null + ? com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance() + : toolVersion_; + } + + /** + * + * + *
+   * Required. The tool version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder getToolVersionOrBuilder() { + return toolVersion_ == null + ? com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance() + : toolVersion_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getToolVersion()); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getToolVersion()); + } + 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.v3.CreateToolVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest other = + (com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasToolVersion() != other.hasToolVersion()) return false; + if (hasToolVersion()) { + if (!getToolVersion().equals(other.getToolVersion())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasToolVersion()) { + hash = (37 * hash) + TOOL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getToolVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest 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.v3.CreateToolVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest 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.v3.CreateToolVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest 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.v3.CreateToolVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest 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.v3.CreateToolVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest 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.v3.CreateToolVersionRequest 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.v3.CreateToolVersionRequest 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.v3.CreateToolVersionRequest 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
+   * [Tools.CreateToolVersion][google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion].
+   * The request message for
+   * [Tools.CreateToolVersion][google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.CreateToolVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.CreateToolVersionRequest) + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getToolVersionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + toolVersion_ = null; + if (toolVersionBuilder_ != null) { + toolVersionBuilder_.dispose(); + toolVersionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest build() { + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest result = + new com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.toolVersion_ = + toolVersionBuilder_ == null ? toolVersion_ : toolVersionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.CreateToolVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasToolVersion()) { + mergeToolVersion(other.getToolVersion()); + } + 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: + { + input.readMessage(getToolVersionFieldBuilder().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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The tool to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 tool to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 tool to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 tool to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 tool to create a version for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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.cloud.dialogflow.cx.v3.ToolVersion toolVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolVersion, + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder, + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder> + toolVersionBuilder_; + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the toolVersion field is set. + */ + public boolean hasToolVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The toolVersion. + */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion getToolVersion() { + if (toolVersionBuilder_ == null) { + return toolVersion_ == null + ? com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance() + : toolVersion_; + } else { + return toolVersionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setToolVersion(com.google.cloud.dialogflow.cx.v3.ToolVersion value) { + if (toolVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + toolVersion_ = value; + } else { + toolVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setToolVersion( + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder builderForValue) { + if (toolVersionBuilder_ == null) { + toolVersion_ = builderForValue.build(); + } else { + toolVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeToolVersion(com.google.cloud.dialogflow.cx.v3.ToolVersion value) { + if (toolVersionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && toolVersion_ != null + && toolVersion_ != com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance()) { + getToolVersionBuilder().mergeFrom(value); + } else { + toolVersion_ = value; + } + } else { + toolVersionBuilder_.mergeFrom(value); + } + if (toolVersion_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearToolVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + toolVersion_ = null; + if (toolVersionBuilder_ != null) { + toolVersionBuilder_.dispose(); + toolVersionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder getToolVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getToolVersionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder getToolVersionOrBuilder() { + if (toolVersionBuilder_ != null) { + return toolVersionBuilder_.getMessageOrBuilder(); + } else { + return toolVersion_ == null + ? com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance() + : toolVersion_; + } + } + + /** + * + * + *
+     * Required. The tool version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolVersion, + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder, + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder> + getToolVersionFieldBuilder() { + if (toolVersionBuilder_ == null) { + toolVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolVersion, + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder, + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder>( + getToolVersion(), getParentForChildren(), isClean()); + toolVersion_ = null; + } + return toolVersionBuilder_; + } + + @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.v3.CreateToolVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.CreateToolVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateToolVersionRequest 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.v3.CreateToolVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolVersionRequestOrBuilder.java new file mode 100644 index 000000000000..696934be1ace --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/CreateToolVersionRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface CreateToolVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.CreateToolVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The tool to create a version for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The tool to create a version for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The tool version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the toolVersion field is set. + */ + boolean hasToolVersion(); + + /** + * + * + *
+   * Required. The tool version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The toolVersion. + */ + com.google.cloud.dialogflow.cx.v3.ToolVersion getToolVersion(); + + /** + * + * + *
+   * Required. The tool version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ToolVersion tool_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder getToolVersionOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionProto.java index cf1109ad7a9b..3c43c6fd3f03 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionProto.java @@ -73,103 +73,92 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n" - + "9google/cloud/dialogflow/cx/v3/data_store_connection.proto\022\035google.cloud.dialog" - + "flow.cx.v3\032\037google/api/field_behavior.proto\"\311\001\n" - + "\023DataStoreConnection\022E\n" - + "\017data_store_type\030\001" - + " \001(\0162,.google.cloud.dialogflow.cx.v3.DataStoreType\022\022\n\n" - + "data_store\030\002 \001(\t\022W\n" - + "\030document_processing_mode\030\004 \001(\01625.googl" - + "e.cloud.dialogflow.cx.v3.DocumentProcessingMode\"\242\022\n" - + "\032DataStoreConnectionSignals\022|\n" - + "\033rewriter_model_call_signals\030\001 \001(\0132R.go" - + "ogle.cloud.dialogflow.cx.v3.DataStoreCon" - + "nectionSignals.RewriterModelCallSignalsB\003\340A\001\022\034\n" - + "\017rewritten_query\030\002 \001(\tB\003\340A\001\022e\n" - + "\017search_snippets\030\003 \003(\0132G.google.cloud.dialo" - + "gflow.cx.v3.DataStoreConnectionSignals.SearchSnippetB\003\340A\001\022\215\001\n" - + "$answer_generation_model_call_signals\030\004 \001(\0132Z.google.cloud." - + "dialogflow.cx.v3.DataStoreConnectionSign" - + "als.AnswerGenerationModelCallSignalsB\003\340A\001\022\023\n" - + "\006answer\030\005 \001(\tB\003\340A\001\022_\n" - + "\014answer_parts\030\006 \003(\0132D.google.cloud.dialogflow.cx.v3.Dat" - + "aStoreConnectionSignals.AnswerPartB\003\340A\001\022c\n" - + "\016cited_snippets\030\007 \003(\0132F.google.cloud.d" - + "ialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippetB\003\340A\001\022j\n" - + "\021grounding_signals\030\010 \001(\0132J.google.cloud.dialogflow.cx.v3." - + "DataStoreConnectionSignals.GroundingSignalsB\003\340A\001\022d\n" - + "\016safety_signals\030\t \001(\0132G.googl" - + "e.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignalsB\003\340A\001\032X\n" - + "\030RewriterModelCallSignals\022\027\n" - + "\017rendered_prompt\030\001 \001(\t\022\024\n" - + "\014model_output\030\002 \001(\t\022\r\n" - + "\005model\030\003 \001(\t\032K\n\r" - + "SearchSnippet\022\026\n" - + "\016document_title\030\001 \001(\t\022\024\n" - + "\014document_uri\030\002 \001(\t\022\014\n" - + "\004text\030\003 \001(\t\032`\n" - + " AnswerGenerationModelCallSignals\022\027\n" - + "\017rendered_prompt\030\001 \001(\t\022\024\n" - + "\014model_output\030\002 \001(\t\022\r\n" - + "\005model\030\003 \001(\t\0326\n\n" - + "AnswerPart\022\014\n" - + "\004text\030\001 \001(\t\022\032\n" - + "\022supporting_indices\030\002 \003(\005\032\206\001\n" - + "\014CitedSnippet\022_\n" - + "\016search_snippet\030\001 \001(\0132G.googl" - + "e.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet\022\025\n\r" - + "snippet_index\030\002 \001(\005\032\335\003\n" - + "\020GroundingSignals\022n\n" - + "\010decision\030\001 \001(\0162\\.google.cloud.dialogflow.cx.v3." - + "DataStoreConnectionSignals.GroundingSignals.GroundingDecision\022n\n" - + "\005score\030\002 \001(\0162_.google.cloud.dialogflow.cx.v3.DataStoreCo" - + "nnectionSignals.GroundingSignals.GroundingScoreBucket\"m\n" - + "\021GroundingDecision\022\"\n" - + "\036GROUNDING_DECISION_UNSPECIFIED\020\000\022\031\n" - + "\025ACCEPTED_BY_GROUNDING\020\001\022\031\n" - + "\025REJECTED_BY_GROUNDING\020\002\"z\n" - + "\024GroundingScoreBucket\022&\n" - + "\"GROUNDING_SCORE_BUCKET_UNSPECIFIED\020\000\022\014\n" - + "\010VERY_LOW\020\001\022\007\n" - + "\003LOW\020\003\022\n\n" - + "\006MEDIUM\020\004\022\010\n" - + "\004HIGH\020\005\022\r\n" - + "\tVERY_HIGH\020\006\032\231\004\n\r" - + "SafetySignals\022h\n" - + "\010decision\030\001 \001(\0162V.google.cloud.dialogflow.cx.v3.Dat" - + "aStoreConnectionSignals.SafetySignals.SafetyDecision\022v\n" - + "\023banned_phrase_match\030\002 \001(\0162Y.google.cloud.dialogflow.cx.v3.DataSt" - + "oreConnectionSignals.SafetySignals.BannedPhraseMatch\022\035\n" - + "\025matched_banned_phrase\030\003 \001(\t\"m\n" - + "\016SafetyDecision\022\037\n" - + "\033SAFETY_DECISION_UNSPECIFIED\020\000\022\034\n" - + "\030ACCEPTED_BY_SAFETY_CHECK\020\001\022\034\n" - + "\030REJECTED_BY_SAFETY_CHECK\020\002\"\227\001\n" - + "\021BannedPhraseMatch\022#\n" - + "\037BANNED_PHRASE_MATCH_UNSPECIFIED\020\000\022\034\n" - + "\030BANNED_PHRASE_MATCH_NONE\020\001\022\035\n" - + "\031BANNED_PHRASE_MATCH_QUERY\020\002\022 \n" - + "\034BANNED_PHRASE_MATCH_RESPONSE\020\003*b\n\r" - + "DataStoreType\022\037\n" - + "\033DATA_STORE_TYPE_UNSPECIFIED\020\000\022\016\n\n" - + "PUBLIC_WEB\020\001\022\020\n" - + "\014UNSTRUCTURED\020\002\022\016\n\n" - + "STRUCTURED\020\003*]\n" - + "\026DocumentProcessingMode\022(\n" - + "$DOCUMENT_PROCESSING_MODE_UNSPECIFIED\020\000\022\r\n" - + "\tDOCUMENTS\020\001\022\n\n" - + "\006CHUNKS\020\002B\273\001\n" - + "!com.google.cloud.dialogflow.cx.v3B\030DataStoreConnecti" - + "onProtoP\001Z1cloud.google.com/go/dialogflo" - + "w/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud" - + ".Dialogflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3b\006proto3" + "\n9google/cloud/dialogflow/cx/v3/data_sto" + + "re_connection.proto\022\035google.cloud.dialog" + + "flow.cx.v3\032\037google/api/field_behavior.pr" + + "oto\032\034google/protobuf/struct.proto\"\311\001\n\023Da" + + "taStoreConnection\022E\n\017data_store_type\030\001 \001" + + "(\0162,.google.cloud.dialogflow.cx.v3.DataS" + + "toreType\022\022\n\ndata_store\030\002 \001(\t\022W\n\030document" + + "_processing_mode\030\004 \001(\01625.google.cloud.di" + + "alogflow.cx.v3.DocumentProcessingMode\"\315\022" + + "\n\032DataStoreConnectionSignals\022|\n\033rewriter" + + "_model_call_signals\030\001 \001(\0132R.google.cloud" + + ".dialogflow.cx.v3.DataStoreConnectionSig" + + "nals.RewriterModelCallSignalsB\003\340A\001\022\034\n\017re" + + "written_query\030\002 \001(\tB\003\340A\001\022e\n\017search_snipp" + + "ets\030\003 \003(\0132G.google.cloud.dialogflow.cx.v" + + "3.DataStoreConnectionSignals.SearchSnipp" + + "etB\003\340A\001\022\215\001\n$answer_generation_model_call" + + "_signals\030\004 \001(\0132Z.google.cloud.dialogflow" + + ".cx.v3.DataStoreConnectionSignals.Answer" + + "GenerationModelCallSignalsB\003\340A\001\022\023\n\006answe" + + "r\030\005 \001(\tB\003\340A\001\022_\n\014answer_parts\030\006 \003(\0132D.goo" + + "gle.cloud.dialogflow.cx.v3.DataStoreConn" + + "ectionSignals.AnswerPartB\003\340A\001\022c\n\016cited_s" + + "nippets\030\007 \003(\0132F.google.cloud.dialogflow." + + "cx.v3.DataStoreConnectionSignals.CitedSn" + + "ippetB\003\340A\001\022j\n\021grounding_signals\030\010 \001(\0132J." + + "google.cloud.dialogflow.cx.v3.DataStoreC" + + "onnectionSignals.GroundingSignalsB\003\340A\001\022d" + + "\n\016safety_signals\030\t \001(\0132G.google.cloud.di" + + "alogflow.cx.v3.DataStoreConnectionSignal" + + "s.SafetySignalsB\003\340A\001\032X\n\030RewriterModelCal" + + "lSignals\022\027\n\017rendered_prompt\030\001 \001(\t\022\024\n\014mod" + + "el_output\030\002 \001(\t\022\r\n\005model\030\003 \001(\t\032v\n\rSearch" + + "Snippet\022\026\n\016document_title\030\001 \001(\t\022\024\n\014docum" + + "ent_uri\030\002 \001(\t\022\014\n\004text\030\003 \001(\t\022)\n\010metadata\030" + + "\005 \001(\0132\027.google.protobuf.Struct\032`\n Answer" + + "GenerationModelCallSignals\022\027\n\017rendered_p" + + "rompt\030\001 \001(\t\022\024\n\014model_output\030\002 \001(\t\022\r\n\005mod" + + "el\030\003 \001(\t\0326\n\nAnswerPart\022\014\n\004text\030\001 \001(\t\022\032\n\022" + + "supporting_indices\030\002 \003(\005\032\206\001\n\014CitedSnippe" + + "t\022_\n\016search_snippet\030\001 \001(\0132G.google.cloud" + + ".dialogflow.cx.v3.DataStoreConnectionSig" + + "nals.SearchSnippet\022\025\n\rsnippet_index\030\002 \001(" + + "\005\032\335\003\n\020GroundingSignals\022n\n\010decision\030\001 \001(\016" + + "2\\.google.cloud.dialogflow.cx.v3.DataSto" + + "reConnectionSignals.GroundingSignals.Gro" + + "undingDecision\022n\n\005score\030\002 \001(\0162_.google.c" + + "loud.dialogflow.cx.v3.DataStoreConnectio" + + "nSignals.GroundingSignals.GroundingScore" + + "Bucket\"m\n\021GroundingDecision\022\"\n\036GROUNDING" + + "_DECISION_UNSPECIFIED\020\000\022\031\n\025ACCEPTED_BY_G" + + "ROUNDING\020\001\022\031\n\025REJECTED_BY_GROUNDING\020\002\"z\n" + + "\024GroundingScoreBucket\022&\n\"GROUNDING_SCORE" + + "_BUCKET_UNSPECIFIED\020\000\022\014\n\010VERY_LOW\020\001\022\007\n\003L" + + "OW\020\003\022\n\n\006MEDIUM\020\004\022\010\n\004HIGH\020\005\022\r\n\tVERY_HIGH\020" + + "\006\032\231\004\n\rSafetySignals\022h\n\010decision\030\001 \001(\0162V." + + "google.cloud.dialogflow.cx.v3.DataStoreC" + + "onnectionSignals.SafetySignals.SafetyDec" + + "ision\022v\n\023banned_phrase_match\030\002 \001(\0162Y.goo" + + "gle.cloud.dialogflow.cx.v3.DataStoreConn" + + "ectionSignals.SafetySignals.BannedPhrase" + + "Match\022\035\n\025matched_banned_phrase\030\003 \001(\t\"m\n\016" + + "SafetyDecision\022\037\n\033SAFETY_DECISION_UNSPEC" + + "IFIED\020\000\022\034\n\030ACCEPTED_BY_SAFETY_CHECK\020\001\022\034\n" + + "\030REJECTED_BY_SAFETY_CHECK\020\002\"\227\001\n\021BannedPh" + + "raseMatch\022#\n\037BANNED_PHRASE_MATCH_UNSPECI" + + "FIED\020\000\022\034\n\030BANNED_PHRASE_MATCH_NONE\020\001\022\035\n\031" + + "BANNED_PHRASE_MATCH_QUERY\020\002\022 \n\034BANNED_PH" + + "RASE_MATCH_RESPONSE\020\003*b\n\rDataStoreType\022\037" + + "\n\033DATA_STORE_TYPE_UNSPECIFIED\020\000\022\016\n\nPUBLI" + + "C_WEB\020\001\022\020\n\014UNSTRUCTURED\020\002\022\016\n\nSTRUCTURED\020" + + "\003*]\n\026DocumentProcessingMode\022(\n$DOCUMENT_" + + "PROCESSING_MODE_UNSPECIFIED\020\000\022\r\n\tDOCUMEN" + + "TS\020\001\022\n\n\006CHUNKS\020\002B\273\001\n!com.google.cloud.di" + + "alogflow.cx.v3B\030DataStoreConnectionProto" + + "P\001Z1cloud.google.com/go/dialogflow/cx/ap" + + "iv3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud.Dialog" + + "flow.Cx.V3\352\002!Google::Cloud::Dialogflow::" + + "CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), }); internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnection_descriptor = getDescriptor().getMessageTypes().get(0); @@ -213,7 +202,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnectionSignals_SearchSnippet_descriptor, new java.lang.String[] { - "DocumentTitle", "DocumentUri", "Text", + "DocumentTitle", "DocumentUri", "Text", "Metadata", }); internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnectionSignals_AnswerGenerationModelCallSignals_descriptor = internal_static_google_cloud_dialogflow_cx_v3_DataStoreConnectionSignals_descriptor @@ -271,6 +260,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionSignals.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionSignals.java index fba7f77e3c6e..711865e7abc4 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionSignals.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataStoreConnectionSignals.java @@ -1299,6 +1299,43 @@ public interface SearchSnippetOrBuilder * @return The bytes for text. */ com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+     * Metadata associated with the document.
+     * 
+ * + * .google.protobuf.Struct metadata = 5; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
+     * Metadata associated with the document.
+     * 
+ * + * .google.protobuf.Struct metadata = 5; + * + * @return The metadata. + */ + com.google.protobuf.Struct getMetadata(); + + /** + * + * + *
+     * Metadata associated with the document.
+     * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); } /** @@ -1349,6 +1386,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .class); } + private int bitField0_; public static final int DOCUMENT_TITLE_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1508,6 +1546,55 @@ public com.google.protobuf.ByteString getTextBytes() { } } + public static final int METADATA_FIELD_NUMBER = 5; + private com.google.protobuf.Struct metadata_; + + /** + * + * + *
+     * Metadata associated with the document.
+     * 
+ * + * .google.protobuf.Struct metadata = 5; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Metadata associated with the document.
+     * 
+ * + * .google.protobuf.Struct metadata = 5; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.protobuf.Struct getMetadata() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + + /** + * + * + *
+     * Metadata associated with the document.
+     * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1531,6 +1618,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getMetadata()); + } getUnknownFields().writeTo(output); } @@ -1549,6 +1639,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMetadata()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1569,6 +1662,10 @@ public boolean equals(final java.lang.Object obj) { if (!getDocumentTitle().equals(other.getDocumentTitle())) return false; if (!getDocumentUri().equals(other.getDocumentUri())) return false; if (!getText().equals(other.getText())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1586,6 +1683,10 @@ public int hashCode() { hash = (53 * hash) + getDocumentUri().hashCode(); hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1727,10 +1828,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } } @java.lang.Override @@ -1740,6 +1850,11 @@ public Builder clear() { documentTitle_ = ""; documentUri_ = ""; text_ = ""; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } return this; } @@ -1790,6 +1905,12 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000004) != 0)) { result.text_ = text_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1859,6 +1980,9 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1903,6 +2027,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 42: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2255,6 +2385,196 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Struct metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + metadataBuilder_; + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + * + * @return The metadata. + */ + public com.google.protobuf.Struct getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + public Builder setMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + public Builder mergeMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && metadata_ != null + && metadata_ != com.google.protobuf.Struct.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + public com.google.protobuf.Struct.Builder getMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + } + + /** + * + * + *
+       * Metadata associated with the document.
+       * 
+ * + * .google.protobuf.Struct metadata = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataType.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataType.java new file mode 100644 index 000000000000..67a5ab54ae22 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DataType.java @@ -0,0 +1,228 @@ +/* + * Copyright 2026 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/v3/parameter_definition.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Defines data types that are supported for inlined schemas. These types are
+ * consistent with [google.protobuf.Value][google.protobuf.Value].
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.DataType} + */ +public enum DataType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified.
+   * 
+ * + * DATA_TYPE_UNSPECIFIED = 0; + */ + DATA_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Represents any string value.
+   * 
+ * + * STRING = 1; + */ + STRING(1), + /** + * + * + *
+   * Represents any number value.
+   * 
+ * + * NUMBER = 2; + */ + NUMBER(2), + /** + * + * + *
+   * Represents a boolean value.
+   * 
+ * + * BOOLEAN = 3; + */ + BOOLEAN(3), + /** + * + * + *
+   * Represents a repeated value.
+   * 
+ * + * ARRAY = 6; + */ + ARRAY(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified.
+   * 
+ * + * DATA_TYPE_UNSPECIFIED = 0; + */ + public static final int DATA_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Represents any string value.
+   * 
+ * + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + + /** + * + * + *
+   * Represents any number value.
+   * 
+ * + * NUMBER = 2; + */ + public static final int NUMBER_VALUE = 2; + + /** + * + * + *
+   * Represents a boolean value.
+   * 
+ * + * BOOLEAN = 3; + */ + public static final int BOOLEAN_VALUE = 3; + + /** + * + * + *
+   * Represents a repeated value.
+   * 
+ * + * ARRAY = 6; + */ + public static final int ARRAY_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 DataType 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 DataType forNumber(int value) { + switch (value) { + case 0: + return DATA_TYPE_UNSPECIFIED; + case 1: + return STRING; + case 2: + return NUMBER; + case 3: + return BOOLEAN; + case 6: + return ARRAY; + 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 DataType findValueByNumber(int number) { + return DataType.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.v3.ParameterDefinitionProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataType[] VALUES = values(); + + public static DataType 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 DataType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.DataType) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExampleRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExampleRequest.java new file mode 100644 index 000000000000..ff46a4a7ea59 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExampleRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Examples.DeleteExample][google.cloud.dialogflow.cx.v3.Examples.DeleteExample].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteExampleRequest} + */ +public final class DeleteExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.DeleteExampleRequest) + DeleteExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteExampleRequest.newBuilder() to construct. + private DeleteExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteExampleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteExampleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.class, + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the example to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the example to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.DeleteExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest other = + (com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest 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.v3.DeleteExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest 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.v3.DeleteExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest 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.v3.DeleteExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest 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.v3.DeleteExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest 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.v3.DeleteExampleRequest 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.v3.DeleteExampleRequest 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.v3.DeleteExampleRequest 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
+   * [Examples.DeleteExample][google.cloud.dialogflow.cx.v3.Examples.DeleteExample].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeleteExampleRequest) + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.class, + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest build() { + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest result = + new com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.DeleteExampleRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.DeleteExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeleteExampleRequest) + private static final com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteExampleRequest 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.v3.DeleteExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExampleRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExampleRequestOrBuilder.java new file mode 100644 index 000000000000..da53c6a7d6ac --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteExampleRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface DeleteExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeleteExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the example to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the example to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookRequest.java new file mode 100644 index 000000000000..88ecc912d62d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.DeletePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeletePlaybookRequest} + */ +public final class DeletePlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.DeletePlaybookRequest) + DeletePlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeletePlaybookRequest.newBuilder() to construct. + private DeletePlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePlaybookRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the playbook to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the playbook to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.DeletePlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest 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.v3.DeletePlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest 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.v3.DeletePlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest 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.v3.DeletePlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest 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.v3.DeletePlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest 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.v3.DeletePlaybookRequest 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.v3.DeletePlaybookRequest 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.v3.DeletePlaybookRequest 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
+   * [Playbooks.DeletePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeletePlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeletePlaybookRequest) + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.DeletePlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.DeletePlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeletePlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePlaybookRequest 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.v3.DeletePlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..cc53de7f2d70 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface DeletePlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeletePlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the playbook to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookVersionRequest.java new file mode 100644 index 000000000000..677ec60aea36 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookVersionRequest.java @@ -0,0 +1,671 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.DeletePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest} + */ +public final class DeletePlaybookVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest) + DeletePlaybookVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeletePlaybookVersionRequest.newBuilder() to construct. + private DeletePlaybookVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePlaybookVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePlaybookVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the playbook version to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the playbook version to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.DeletePlaybookVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest other = + (com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest 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.v3.DeletePlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest 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.v3.DeletePlaybookVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest 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.v3.DeletePlaybookVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest 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.v3.DeletePlaybookVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest 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.v3.DeletePlaybookVersionRequest 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.v3.DeletePlaybookVersionRequest 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.v3.DeletePlaybookVersionRequest 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
+   * [Playbooks.DeletePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest) + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest build() { + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest result = + new com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.DeletePlaybookVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.DeletePlaybookVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePlaybookVersionRequest 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.v3.DeletePlaybookVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookVersionRequestOrBuilder.java new file mode 100644 index 000000000000..16846626b23d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeletePlaybookVersionRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface DeletePlaybookVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook version to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the playbook version to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolRequest.java new file mode 100644 index 000000000000..f22cb76768ee --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolRequest.java @@ -0,0 +1,785 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.DeleteTool][google.cloud.dialogflow.cx.v3.Tools.DeleteTool].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteToolRequest} + */ +public final class DeleteToolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.DeleteToolRequest) + DeleteToolRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteToolRequest.newBuilder() to construct. + private DeleteToolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteToolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteToolRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest.class, + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Tool to be deleted.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the Tool to be deleted.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_ = false; + + /** + * + * + *
+   * This field has no effect for Tools not being used.
+   * For Tools that are used:
+   *
+   * *  If `force` is set to false, an error will be returned with message
+   *    indicating the referenced resources.
+   * *  If `force` is set to true, Dialogflow will remove the tool, as well
+   *    as any references to the tool.
+   * 
+ * + * bool force = 2; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, force_); + } + 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.v3.DeleteToolRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest other = + (com.google.cloud.dialogflow.cx.v3.DeleteToolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolRequest 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.v3.DeleteToolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolRequest 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.v3.DeleteToolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolRequest 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.v3.DeleteToolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolRequest 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.v3.DeleteToolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolRequest 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.v3.DeleteToolRequest 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.v3.DeleteToolRequest 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.v3.DeleteToolRequest 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
+   * [Tools.DeleteTool][google.cloud.dialogflow.cx.v3.Tools.DeleteTool].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteToolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeleteToolRequest) + com.google.cloud.dialogflow.cx.v3.DeleteToolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest.class, + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.DeleteToolRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteToolRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeleteToolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteToolRequest build() { + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteToolRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeleteToolRequest result = + new com.google.cloud.dialogflow.cx.v3.DeleteToolRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.DeleteToolRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.force_ = force_; + } + } + + @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.v3.DeleteToolRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeleteToolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeleteToolRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.DeleteToolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + force_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000002); + force_ = false; + 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.v3.DeleteToolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeleteToolRequest) + private static final com.google.cloud.dialogflow.cx.v3.DeleteToolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeleteToolRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteToolRequest 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.v3.DeleteToolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolRequestOrBuilder.java new file mode 100644 index 000000000000..94a88e620923 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolRequestOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface DeleteToolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeleteToolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Tool to be deleted.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Tool to be deleted.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * This field has no effect for Tools not being used.
+   * For Tools that are used:
+   *
+   * *  If `force` is set to false, an error will be returned with message
+   *    indicating the referenced resources.
+   * *  If `force` is set to true, Dialogflow will remove the tool, as well
+   *    as any references to the tool.
+   * 
+ * + * bool force = 2; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolVersionRequest.java new file mode 100644 index 000000000000..229e0fcf434d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolVersionRequest.java @@ -0,0 +1,786 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.DeleteToolVersion][google.cloud.dialogflow.cx.v3.Tools.DeleteToolVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest} + */ +public final class DeleteToolVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest) + DeleteToolVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteToolVersionRequest.newBuilder() to construct. + private DeleteToolVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteToolVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteToolVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the tool version to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the tool version to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. This field has no effect for Tools not being used.
+   * For Tools that are used:
+   *
+   * *  If `force` is set to false, an error will be returned with message
+   *    indicating the referenced resources.
+   * *  If `force` is set to true, Dialogflow will remove the tool, as well
+   *    as any references to the tool.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, force_); + } + 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.v3.DeleteToolVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest other = + (com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest 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.v3.DeleteToolVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest 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.v3.DeleteToolVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest 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.v3.DeleteToolVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest 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.v3.DeleteToolVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest 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.v3.DeleteToolVersionRequest 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.v3.DeleteToolVersionRequest 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.v3.DeleteToolVersionRequest 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
+   * [Tools.DeleteToolVersion][google.cloud.dialogflow.cx.v3.Tools.DeleteToolVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest) + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest build() { + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest result = + new com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.force_ = force_; + } + } + + @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.v3.DeleteToolVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + force_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the tool version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool version to delete.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000002); + force_ = false; + 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.v3.DeleteToolVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteToolVersionRequest 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.v3.DeleteToolVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolVersionRequestOrBuilder.java new file mode 100644 index 000000000000..f3624367cdd2 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeleteToolVersionRequestOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface DeleteToolVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tool version to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the tool version to delete.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. This field has no effect for Tools not being used.
+   * For Tools that are used:
+   *
+   * *  If `force` is set to false, an error will be returned with message
+   *    indicating the referenced resources.
+   * *  If `force` is set to true, Dialogflow will remove the tool, as well
+   *    as any references to the tool.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentRequest.java index d3a5e4a8211a..c795218b8d50 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentRequest.java @@ -41,6 +41,7 @@ private DetectIntentRequest(com.google.protobuf.GeneratedMessageV3.Builder bu private DetectIntentRequest() { session_ = ""; + responseView_ = 0; } @java.lang.Override @@ -320,6 +321,53 @@ public com.google.cloud.dialogflow.cx.v3.OutputAudioConfig getOutputAudioConfig( : outputAudioConfig_; } + public static final int RESPONSE_VIEW_FIELD_NUMBER = 9; + private int responseView_ = 0; + + /** + * + * + *
+   * Optional. Specifies which fields in the
+   * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+   * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseView. + */ + @java.lang.Override + public int getResponseViewValue() { + return responseView_; + } + + /** + * + * + *
+   * Optional. Specifies which fields in the
+   * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+   * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseView. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView getResponseView() { + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView result = + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView.forNumber(responseView_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -346,6 +394,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getOutputAudioConfig()); } + if (responseView_ + != com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView + .DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, responseView_); + } getUnknownFields().writeTo(output); } @@ -367,6 +421,12 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOutputAudioConfig()); } + if (responseView_ + != com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView + .DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, responseView_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -396,6 +456,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputAudioConfig()) { if (!getOutputAudioConfig().equals(other.getOutputAudioConfig())) return false; } + if (responseView_ != other.responseView_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -421,6 +482,8 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_AUDIO_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getOutputAudioConfig().hashCode(); } + hash = (37 * hash) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -589,6 +652,7 @@ public Builder clear() { outputAudioConfigBuilder_.dispose(); outputAudioConfigBuilder_ = null; } + responseView_ = 0; return this; } @@ -645,6 +709,9 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.DetectIntentRequest : outputAudioConfigBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.responseView_ = responseView_; + } result.bitField0_ |= to_bitField0_; } @@ -708,6 +775,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DetectIntentRequest o if (other.hasOutputAudioConfig()) { mergeOutputAudioConfig(other.getOutputAudioConfig()); } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -759,6 +829,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 34 + case 72: + { + responseView_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 72 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1587,6 +1663,124 @@ public Builder clearOutputAudioConfig() { return outputAudioConfigBuilder_; } + private int responseView_ = 0; + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseView. + */ + @java.lang.Override + public int getResponseViewValue() { + return responseView_; + } + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for responseView to set. + * @return This builder for chaining. + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseView. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView getResponseView() { + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView result = + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView.forNumber(responseView_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The responseView to set. + * @return This builder for chaining. + */ + public Builder setResponseView( + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + responseView_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearResponseView() { + bitField0_ = (bitField0_ & ~0x00000010); + responseView_ = 0; + 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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentRequestOrBuilder.java index 6a02968340c4..f4ed4b3ca2e4 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentRequestOrBuilder.java @@ -202,4 +202,38 @@ public interface DetectIntentRequestOrBuilder * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ com.google.cloud.dialogflow.cx.v3.OutputAudioConfigOrBuilder getOutputAudioConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Specifies which fields in the
+   * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+   * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseView. + */ + int getResponseViewValue(); + + /** + * + * + *
+   * Optional. Specifies which fields in the
+   * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+   * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseView. + */ + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView getResponseView(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentResponseView.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentResponseView.java new file mode 100644 index 000000000000..ea9797f2afb9 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DetectIntentResponseView.java @@ -0,0 +1,214 @@ +/* + * Copyright 2026 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/v3/session.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response view specifies which fields in the
+ * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.DetectIntentResponseView} + */ +public enum DetectIntentResponseView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified. `DETECT_INTENT_RESPONSE_VIEW_DEFAULT` will be used.
+   * 
+ * + * DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED = 0; + */ + DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Full response view includes all fields.
+   * 
+ * + * DETECT_INTENT_RESPONSE_VIEW_FULL = 1; + */ + DETECT_INTENT_RESPONSE_VIEW_FULL(1), + /** + * + * + *
+   * Basic response view omits the following fields:
+   * -
+   * [QueryResult.diagnostic_info][google.cloud.dialogflow.cx.v3.QueryResult.diagnostic_info]
+   * 
+ * + * DETECT_INTENT_RESPONSE_VIEW_BASIC = 2; + */ + DETECT_INTENT_RESPONSE_VIEW_BASIC(2), + /** + * + * + *
+   * Default response view omits the following fields:
+   * -
+   * [QueryResult.trace_blocks][google.cloud.dialogflow.cx.v3.QueryResult.trace_blocks]
+   * 
+ * + * DETECT_INTENT_RESPONSE_VIEW_DEFAULT = 3; + */ + DETECT_INTENT_RESPONSE_VIEW_DEFAULT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified. `DETECT_INTENT_RESPONSE_VIEW_DEFAULT` will be used.
+   * 
+ * + * DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED = 0; + */ + public static final int DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Full response view includes all fields.
+   * 
+ * + * DETECT_INTENT_RESPONSE_VIEW_FULL = 1; + */ + public static final int DETECT_INTENT_RESPONSE_VIEW_FULL_VALUE = 1; + + /** + * + * + *
+   * Basic response view omits the following fields:
+   * -
+   * [QueryResult.diagnostic_info][google.cloud.dialogflow.cx.v3.QueryResult.diagnostic_info]
+   * 
+ * + * DETECT_INTENT_RESPONSE_VIEW_BASIC = 2; + */ + public static final int DETECT_INTENT_RESPONSE_VIEW_BASIC_VALUE = 2; + + /** + * + * + *
+   * Default response view omits the following fields:
+   * -
+   * [QueryResult.trace_blocks][google.cloud.dialogflow.cx.v3.QueryResult.trace_blocks]
+   * 
+ * + * DETECT_INTENT_RESPONSE_VIEW_DEFAULT = 3; + */ + public static final int DETECT_INTENT_RESPONSE_VIEW_DEFAULT_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 DetectIntentResponseView 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 DetectIntentResponseView forNumber(int value) { + switch (value) { + case 0: + return DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED; + case 1: + return DETECT_INTENT_RESPONSE_VIEW_FULL; + case 2: + return DETECT_INTENT_RESPONSE_VIEW_BASIC; + case 3: + return DETECT_INTENT_RESPONSE_VIEW_DEFAULT; + 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 DetectIntentResponseView findValueByNumber(int number) { + return DetectIntentResponseView.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.v3.SessionProto.getDescriptor().getEnumTypes().get(0); + } + + private static final DetectIntentResponseView[] VALUES = values(); + + public static DetectIntentResponseView 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 DetectIntentResponseView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.DetectIntentResponseView) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Environment.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Environment.java index bc38f6e8de86..774e61b14aa7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Environment.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Environment.java @@ -83,11 +83,13 @@ public interface VersionConfigOrBuilder * * *
-     * Required. Both flow and playbook versions are supported.
+     * Required. Flow, playbook and tool versions are supported.
      * Format for flow version:
      * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
      * Format for playbook version:
      * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+     * Format for tool version:
+     * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
      * 
* * @@ -102,11 +104,13 @@ public interface VersionConfigOrBuilder * * *
-     * Required. Both flow and playbook versions are supported.
+     * Required. Flow, playbook and tool versions are supported.
      * Format for flow version:
      * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
      * Format for playbook version:
      * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+     * Format for tool version:
+     * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
      * 
* * @@ -172,11 +176,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * Required. Both flow and playbook versions are supported.
+     * Required. Flow, playbook and tool versions are supported.
      * Format for flow version:
      * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
      * Format for playbook version:
      * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+     * Format for tool version:
+     * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
      * 
* * @@ -202,11 +208,13 @@ public java.lang.String getVersion() { * * *
-     * Required. Both flow and playbook versions are supported.
+     * Required. Flow, playbook and tool versions are supported.
      * Format for flow version:
      * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
      * Format for playbook version:
      * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+     * Format for tool version:
+     * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
      * 
* * @@ -585,11 +593,13 @@ public Builder mergeFrom( * * *
-       * Required. Both flow and playbook versions are supported.
+       * Required. Flow, playbook and tool versions are supported.
        * Format for flow version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
        * Format for playbook version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+       * Format for tool version:
+       * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
        * 
* * @@ -614,11 +624,13 @@ public java.lang.String getVersion() { * * *
-       * Required. Both flow and playbook versions are supported.
+       * Required. Flow, playbook and tool versions are supported.
        * Format for flow version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
        * Format for playbook version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+       * Format for tool version:
+       * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
        * 
* * @@ -643,11 +655,13 @@ public com.google.protobuf.ByteString getVersionBytes() { * * *
-       * Required. Both flow and playbook versions are supported.
+       * Required. Flow, playbook and tool versions are supported.
        * Format for flow version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
        * Format for playbook version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+       * Format for tool version:
+       * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
        * 
* * @@ -671,11 +685,13 @@ public Builder setVersion(java.lang.String value) { * * *
-       * Required. Both flow and playbook versions are supported.
+       * Required. Flow, playbook and tool versions are supported.
        * Format for flow version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
        * Format for playbook version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+       * Format for tool version:
+       * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
        * 
* * @@ -695,11 +711,13 @@ public Builder clearVersion() { * * *
-       * Required. Both flow and playbook versions are supported.
+       * Required. Flow, playbook and tool versions are supported.
        * Format for flow version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
        * Format for playbook version:
        * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
+       * Format for tool version:
+       * projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
        * 
* * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandler.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandler.java index 16349dc85fa8..2efca43ef6a3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandler.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandler.java @@ -92,6 +92,7 @@ public enum TargetCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { TARGET_PAGE(2), TARGET_FLOW(3), + TARGET_PLAYBOOK(7), TARGET_NOT_SET(0); private final int value; @@ -115,6 +116,8 @@ public static TargetCase forNumber(int value) { return TARGET_PAGE; case 3: return TARGET_FLOW; + case 7: + return TARGET_PLAYBOOK; case 0: return TARGET_NOT_SET; default: @@ -457,6 +460,85 @@ public com.google.protobuf.ByteString getTargetFlowBytes() { } } + public static final int TARGET_PLAYBOOK_FIELD_NUMBER = 7; + + /** + * + * + *
+   * The target playbook to transition to.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPlaybook field is set. + */ + public boolean hasTargetPlaybook() { + return targetCase_ == 7; + } + + /** + * + * + *
+   * The target playbook to transition to.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return The targetPlaybook. + */ + public java.lang.String getTargetPlaybook() { + java.lang.Object ref = ""; + if (targetCase_ == 7) { + ref = target_; + } + 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 (targetCase_ == 7) { + target_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The target playbook to transition to.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPlaybook. + */ + public com.google.protobuf.ByteString getTargetPlaybookBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 7) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 7) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -486,6 +568,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); } + if (targetCase_ == 7) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, target_); + } getUnknownFields().writeTo(output); } @@ -510,6 +595,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); } + if (targetCase_ == 7) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, target_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -540,6 +628,9 @@ public boolean equals(final java.lang.Object obj) { case 3: if (!getTargetFlow().equals(other.getTargetFlow())) return false; break; + case 7: + if (!getTargetPlaybook().equals(other.getTargetPlaybook())) return false; + break; case 0: default: } @@ -571,6 +662,10 @@ public int hashCode() { hash = (37 * hash) + TARGET_FLOW_FIELD_NUMBER; hash = (53 * hash) + getTargetFlow().hashCode(); break; + case 7: + hash = (37 * hash) + TARGET_PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getTargetPlaybook().hashCode(); + break; case 0: default: } @@ -879,6 +974,13 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.EventHandler other) { onChanged(); break; } + case TARGET_PLAYBOOK: + { + targetCase_ = 7; + target_ = other.target_; + onChanged(); + break; + } case TARGET_NOT_SET: { break; @@ -943,6 +1045,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 7; + target_ = s; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1723,6 +1832,157 @@ public Builder setTargetFlowBytes(com.google.protobuf.ByteString value) { return this; } + /** + * + * + *
+     * The target playbook to transition to.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPlaybook field is set. + */ + @java.lang.Override + public boolean hasTargetPlaybook() { + return targetCase_ == 7; + } + + /** + * + * + *
+     * The target playbook to transition to.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return The targetPlaybook. + */ + @java.lang.Override + public java.lang.String getTargetPlaybook() { + java.lang.Object ref = ""; + if (targetCase_ == 7) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 7) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The target playbook to transition to.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPlaybook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetPlaybookBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 7) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 7) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The target playbook to transition to.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The targetPlaybook to set. + * @return This builder for chaining. + */ + public Builder setTargetPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 7; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The target playbook to transition to.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTargetPlaybook() { + if (targetCase_ == 7) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The target playbook to transition to.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for targetPlaybook to set. + * @return This builder for chaining. + */ + public Builder setTargetPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 7; + target_ = value; + 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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandlerOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandlerOrBuilder.java index e0e95f72277c..b42fb6d8b76d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandlerOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EventHandlerOrBuilder.java @@ -212,5 +212,50 @@ public interface EventHandlerOrBuilder */ com.google.protobuf.ByteString getTargetFlowBytes(); + /** + * + * + *
+   * The target playbook to transition to.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetPlaybook field is set. + */ + boolean hasTargetPlaybook(); + + /** + * + * + *
+   * The target playbook to transition to.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return The targetPlaybook. + */ + java.lang.String getTargetPlaybook(); + + /** + * + * + *
+   * The target playbook to transition to.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string target_playbook = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetPlaybook. + */ + com.google.protobuf.ByteString getTargetPlaybookBytes(); + com.google.cloud.dialogflow.cx.v3.EventHandler.TargetCase getTargetCase(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Example.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Example.java new file mode 100644 index 000000000000..237dc6227bfa --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Example.java @@ -0,0 +1,3323 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Example represents a sample execution of the playbook in the conversation.
+ *
+ * An example consists of a list of ordered actions performed by end user
+ * or Dialogflow agent according the playbook instructions to fulfill the task.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Example} + */ +public final class Example extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Example) + ExampleOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Example.newBuilder() to construct. + private Example(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Example() { + name_ = ""; + actions_ = java.util.Collections.emptyList(); + displayName_ = ""; + description_ = ""; + conversationState_ = 0; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Example(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_Example_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_Example_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Example.class, + com.google.cloud.dialogflow.cx.v3.Example.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * The unique identifier of the playbook example.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique identifier of the playbook example.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_INPUT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.PlaybookInput playbookInput_; + + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + @java.lang.Override + public boolean hasPlaybookInput() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInput getPlaybookInput() { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder getPlaybookInputOrBuilder() { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + + public static final int PLAYBOOK_OUTPUT_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3.PlaybookOutput playbookOutput_; + + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + @java.lang.Override + public boolean hasPlaybookOutput() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput getPlaybookOutput() { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder getPlaybookOutputOrBuilder() { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + + public static final int ACTIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List actions_; + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Action getActions(int index) { + return actions_.get(index); + } + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ActionOrBuilder getActionsOrBuilder(int index) { + return actions_.get(index); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Required. The display name of the example.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The display name of the example.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The high level concise description of the example. The max number
+   * of characters is 200.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The high level concise description of the example. The max number
+   * of characters is 200.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_COUNT_FIELD_NUMBER = 9; + private long tokenCount_ = 0L; + + /** + * + * + *
+   * Output only. Estimated number of tokes current example takes when sent to
+   * the LLM.
+   * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + @java.lang.Override + public long getTokenCount() { + return tokenCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int CONVERSATION_STATE_FIELD_NUMBER = 12; + private int conversationState_ = 0; + + /** + * + * + *
+   * Required. Example's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for conversationState. + */ + @java.lang.Override + public int getConversationStateValue() { + return conversationState_; + } + + /** + * + * + *
+   * Required. Example's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversationState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.OutputState getConversationState() { + com.google.cloud.dialogflow.cx.v3.OutputState result = + com.google.cloud.dialogflow.cx.v3.OutputState.forNumber(conversationState_); + return result == null ? com.google.cloud.dialogflow.cx.v3.OutputState.UNRECOGNIZED : result; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + + /** + * + * + *
+   * Optional. The language code of the example.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * Note: example's language code is not currently used in dialogflow agents.
+   * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The language code of the example.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * Note: example's language code is not currently used in dialogflow agents.
+   * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(2, actions_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPlaybookInput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getPlaybookOutput()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); + } + if (tokenCount_ != 0L) { + output.writeInt64(9, tokenCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getUpdateTime()); + } + if (conversationState_ + != com.google.cloud.dialogflow.cx.v3.OutputState.OUTPUT_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(12, conversationState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, languageCode_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, actions_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPlaybookInput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPlaybookOutput()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); + } + if (tokenCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, tokenCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (conversationState_ + != com.google.cloud.dialogflow.cx.v3.OutputState.OUTPUT_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, conversationState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, languageCode_); + } + 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.v3.Example)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Example other = + (com.google.cloud.dialogflow.cx.v3.Example) obj; + + if (!getName().equals(other.getName())) return false; + if (hasPlaybookInput() != other.hasPlaybookInput()) return false; + if (hasPlaybookInput()) { + if (!getPlaybookInput().equals(other.getPlaybookInput())) return false; + } + if (hasPlaybookOutput() != other.hasPlaybookOutput()) return false; + if (hasPlaybookOutput()) { + if (!getPlaybookOutput().equals(other.getPlaybookOutput())) return false; + } + if (!getActionsList().equals(other.getActionsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getTokenCount() != other.getTokenCount()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (conversationState_ != other.conversationState_) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasPlaybookInput()) { + hash = (37 * hash) + PLAYBOOK_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookInput().hashCode(); + } + if (hasPlaybookOutput()) { + hash = (37 * hash) + PLAYBOOK_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookOutput().hashCode(); + } + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TOKEN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTokenCount()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + CONVERSATION_STATE_FIELD_NUMBER; + hash = (53 * hash) + conversationState_; + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Example parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Example 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.v3.Example parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Example 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.v3.Example parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Example 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.v3.Example parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Example 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.v3.Example parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Example 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.v3.Example 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.v3.Example 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.v3.Example 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; + } + + /** + * + * + *
+   * Example represents a sample execution of the playbook in the conversation.
+   *
+   * An example consists of a list of ordered actions performed by end user
+   * or Dialogflow agent according the playbook instructions to fulfill the task.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Example} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Example) + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_Example_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_Example_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Example.class, + com.google.cloud.dialogflow.cx.v3.Example.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Example.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookInputFieldBuilder(); + getPlaybookOutputFieldBuilder(); + getActionsFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + playbookInput_ = null; + if (playbookInputBuilder_ != null) { + playbookInputBuilder_.dispose(); + playbookInputBuilder_ = null; + } + playbookOutput_ = null; + if (playbookOutputBuilder_ != null) { + playbookOutputBuilder_.dispose(); + playbookOutputBuilder_ = null; + } + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + displayName_ = ""; + description_ = ""; + tokenCount_ = 0L; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + conversationState_ = 0; + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_Example_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Example getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Example build() { + com.google.cloud.dialogflow.cx.v3.Example result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Example buildPartial() { + com.google.cloud.dialogflow.cx.v3.Example result = + new com.google.cloud.dialogflow.cx.v3.Example(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.Example result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Example result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.playbookInput_ = + playbookInputBuilder_ == null ? playbookInput_ : playbookInputBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.playbookOutput_ = + playbookOutputBuilder_ == null ? playbookOutput_ : playbookOutputBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.tokenCount_ = tokenCount_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.conversationState_ = conversationState_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.languageCode_ = languageCode_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.Example) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Example) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Example other) { + if (other == com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPlaybookInput()) { + mergePlaybookInput(other.getPlaybookInput()); + } + if (other.hasPlaybookOutput()) { + mergePlaybookOutput(other.getPlaybookOutput()); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000008); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getActionsFieldBuilder() + : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getTokenCount() != 0L) { + setTokenCount(other.getTokenCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.conversationState_ != 0) { + setConversationStateValue(other.getConversationStateValue()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000400; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3.Action m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Action.parser(), extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getPlaybookInputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getPlaybookOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 50: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 66: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 72: + { + tokenCount_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 72 + case 82: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 90 + case 96: + { + conversationState_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 96 + case 106: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 106 + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.PlaybookInput playbookInput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInput, + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder> + playbookInputBuilder_; + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + public boolean hasPlaybookInput() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookInput getPlaybookInput() { + if (playbookInputBuilder_ == null) { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance() + : playbookInput_; + } else { + return playbookInputBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInput(com.google.cloud.dialogflow.cx.v3.PlaybookInput value) { + if (playbookInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookInput_ = value; + } else { + playbookInputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInput( + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder builderForValue) { + if (playbookInputBuilder_ == null) { + playbookInput_ = builderForValue.build(); + } else { + playbookInputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookInput(com.google.cloud.dialogflow.cx.v3.PlaybookInput value) { + if (playbookInputBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && playbookInput_ != null + && playbookInput_ + != com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance()) { + getPlaybookInputBuilder().mergeFrom(value); + } else { + playbookInput_ = value; + } + } else { + playbookInputBuilder_.mergeFrom(value); + } + if (playbookInput_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookInput() { + bitField0_ = (bitField0_ & ~0x00000002); + playbookInput_ = null; + if (playbookInputBuilder_ != null) { + playbookInputBuilder_.dispose(); + playbookInputBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder getPlaybookInputBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPlaybookInputFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder getPlaybookInputOrBuilder() { + if (playbookInputBuilder_ != null) { + return playbookInputBuilder_.getMessageOrBuilder(); + } else { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + } + + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInput, + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder> + getPlaybookInputFieldBuilder() { + if (playbookInputBuilder_ == null) { + playbookInputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInput, + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder>( + getPlaybookInput(), getParentForChildren(), isClean()); + playbookInput_ = null; + } + return playbookInputBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.PlaybookOutput playbookOutput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder> + playbookOutputBuilder_; + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + public boolean hasPlaybookOutput() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput getPlaybookOutput() { + if (playbookOutputBuilder_ == null) { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } else { + return playbookOutputBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookOutput(com.google.cloud.dialogflow.cx.v3.PlaybookOutput value) { + if (playbookOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookOutput_ = value; + } else { + playbookOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookOutput( + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder builderForValue) { + if (playbookOutputBuilder_ == null) { + playbookOutput_ = builderForValue.build(); + } else { + playbookOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookOutput(com.google.cloud.dialogflow.cx.v3.PlaybookOutput value) { + if (playbookOutputBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && playbookOutput_ != null + && playbookOutput_ + != com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance()) { + getPlaybookOutputBuilder().mergeFrom(value); + } else { + playbookOutput_ = value; + } + } else { + playbookOutputBuilder_.mergeFrom(value); + } + if (playbookOutput_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookOutput() { + bitField0_ = (bitField0_ & ~0x00000004); + playbookOutput_ = null; + if (playbookOutputBuilder_ != null) { + playbookOutputBuilder_.dispose(); + playbookOutputBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder getPlaybookOutputBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPlaybookOutputFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder getPlaybookOutputOrBuilder() { + if (playbookOutputBuilder_ != null) { + return playbookOutputBuilder_.getMessageOrBuilder(); + } else { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + } + + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder> + getPlaybookOutputFieldBuilder() { + if (playbookOutputBuilder_ == null) { + playbookOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder>( + getPlaybookOutput(), getParentForChildren(), isClean()); + playbookOutput_ = null; + } + return playbookOutputBuilder_; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Action, + com.google.cloud.dialogflow.cx.v3.Action.Builder, + com.google.cloud.dialogflow.cx.v3.ActionOrBuilder> + actionsBuilder_; + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setActions(int index, com.google.cloud.dialogflow.cx.v3.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setActions( + int index, com.google.cloud.dialogflow.cx.v3.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActions(com.google.cloud.dialogflow.cx.v3.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActions(int index, com.google.cloud.dialogflow.cx.v3.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActions(com.google.cloud.dialogflow.cx.v3.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActions( + int index, com.google.cloud.dialogflow.cx.v3.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Action.Builder getActionsBuilder(int index) { + return getActionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ActionOrBuilder getActionsOrBuilder(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Action.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Action.Builder addActionsBuilder(int index) { + return getActionsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Action.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Action, + com.google.cloud.dialogflow.cx.v3.Action.Builder, + com.google.cloud.dialogflow.cx.v3.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Action, + com.google.cloud.dialogflow.cx.v3.Action.Builder, + com.google.cloud.dialogflow.cx.v3.ActionOrBuilder>( + actions_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private long tokenCount_; + + /** + * + * + *
+     * Output only. Estimated number of tokes current example takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + @java.lang.Override + public long getTokenCount() { + return tokenCount_; + } + + /** + * + * + *
+     * Output only. Estimated number of tokes current example takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tokenCount to set. + * @return This builder for chaining. + */ + public Builder setTokenCount(long value) { + + tokenCount_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Estimated number of tokes current example takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTokenCount() { + bitField0_ = (bitField0_ & ~0x00000040); + tokenCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int conversationState_ = 0; + + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for conversationState. + */ + @java.lang.Override + public int getConversationStateValue() { + return conversationState_; + } + + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for conversationState to set. + * @return This builder for chaining. + */ + public Builder setConversationStateValue(int value) { + conversationState_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversationState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.OutputState getConversationState() { + com.google.cloud.dialogflow.cx.v3.OutputState result = + com.google.cloud.dialogflow.cx.v3.OutputState.forNumber(conversationState_); + return result == null ? com.google.cloud.dialogflow.cx.v3.OutputState.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The conversationState to set. + * @return This builder for chaining. + */ + public Builder setConversationState(com.google.cloud.dialogflow.cx.v3.OutputState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + conversationState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearConversationState() { + bitField0_ = (bitField0_ & ~0x00000200); + conversationState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * Note: example's language code is not currently used in dialogflow agents.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * Note: example's language code is not currently used in dialogflow agents.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * Note: example's language code is not currently used in dialogflow agents.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * Note: example's language code is not currently used in dialogflow agents.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * Note: example's language code is not currently used in dialogflow agents.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000400; + 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.v3.Example) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Example) + private static final com.google.cloud.dialogflow.cx.v3.Example DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Example(); + } + + public static com.google.cloud.dialogflow.cx.v3.Example getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Example 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.v3.Example getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleName.java new file mode 100644 index 000000000000..d4464c7ca9b3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ExampleName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_PLAYBOOK_EXAMPLE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String playbook; + private final String example; + + @Deprecated + protected ExampleName() { + project = null; + location = null; + agent = null; + playbook = null; + example = null; + } + + private ExampleName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + playbook = Preconditions.checkNotNull(builder.getPlaybook()); + example = Preconditions.checkNotNull(builder.getExample()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public String getExample() { + return example; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ExampleName of( + String project, String location, String agent, String playbook, String example) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .setExample(example) + .build(); + } + + public static String format( + String project, String location, String agent, String playbook, String example) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .setExample(example) + .build() + .toString(); + } + + public static ExampleName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_PLAYBOOK_EXAMPLE.validatedMatch( + formattedString, "ExampleName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("playbook"), + matchMap.get("example")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ExampleName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_PLAYBOOK_EXAMPLE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (playbook != null) { + fieldMapBuilder.put("playbook", playbook); + } + if (example != null) { + fieldMapBuilder.put("example", example); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_PLAYBOOK_EXAMPLE.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "playbook", + playbook, + "example", + example); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ExampleName that = ((ExampleName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.playbook, that.playbook) + && Objects.equals(this.example, that.example); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(playbook); + h *= 1000003; + h ^= Objects.hashCode(example); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String playbook; + private String example; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public String getExample() { + return example; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setPlaybook(String playbook) { + this.playbook = playbook; + return this; + } + + public Builder setExample(String example) { + this.example = example; + return this; + } + + private Builder(ExampleName exampleName) { + this.project = exampleName.project; + this.location = exampleName.location; + this.agent = exampleName.agent; + this.playbook = exampleName.playbook; + this.example = exampleName.example; + } + + public ExampleName build() { + return new ExampleName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleOrBuilder.java new file mode 100644 index 000000000000..375b160fe620 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleOrBuilder.java @@ -0,0 +1,423 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ExampleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Example) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the playbook example.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * The unique identifier of the playbook example.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + boolean hasPlaybookInput(); + + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + com.google.cloud.dialogflow.cx.v3.PlaybookInput getPlaybookInput(); + + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder getPlaybookInputOrBuilder(); + + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + boolean hasPlaybookOutput(); + + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOutput getPlaybookOutput(); + + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder getPlaybookOutputOrBuilder(); + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getActionsList(); + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.Action getActions(int index); + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getActionsCount(); + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getActionsOrBuilderList(); + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ActionOrBuilder getActionsOrBuilder(int index); + + /** + * + * + *
+   * Required. The display name of the example.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Required. The display name of the example.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The high level concise description of the example. The max number
+   * of characters is 200.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The high level concise description of the example. The max number
+   * of characters is 200.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Estimated number of tokes current example takes when sent to
+   * the LLM.
+   * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + long getTokenCount(); + + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. Example's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for conversationState. + */ + int getConversationStateValue(); + + /** + * + * + *
+   * Required. Example's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversationState. + */ + com.google.cloud.dialogflow.cx.v3.OutputState getConversationState(); + + /** + * + * + *
+   * Optional. The language code of the example.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * Note: example's language code is not currently used in dialogflow agents.
+   * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + + /** + * + * + *
+   * Optional. The language code of the example.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * Note: example's language code is not currently used in dialogflow agents.
+   * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleProto.java new file mode 100644 index 000000000000..9182ae09833c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExampleProto.java @@ -0,0 +1,246 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public final class ExampleProto { + private ExampleProto() {} + + 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_v3_CreateExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Example_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Example_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/v3/example." + + "proto\022\035google.cloud.dialogflow.cx.v3\032\034go" + + "ogle/api/annotations.proto\032\027google/api/c" + + "lient.proto\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\032)google/" + + "cloud/dialogflow/cx/v3/trace.proto\032\033goog" + + "le/protobuf/empty.proto\032 google/protobuf" + + "/field_mask.proto\032\037google/protobuf/times" + + "tamp.proto\"\217\001\n\024CreateExampleRequest\0229\n\006p" + + "arent\030\001 \001(\tB)\340A\002\372A#\022!dialogflow.googleap" + + "is.com/Example\022<\n\007example\030\002 \001(\0132&.google" + + ".cloud.dialogflow.cx.v3.ExampleB\003\340A\002\"O\n\024" + + "DeleteExampleRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372" + + "A#\n!dialogflow.googleapis.com/Example\"\235\001" + + "\n\023ListExamplesRequest\0229\n\006parent\030\001 \001(\tB)\340" + + "A\002\372A#\022!dialogflow.googleapis.com/Example" + + "\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003" + + " \001(\tB\003\340A\001\022\032\n\rlanguage_code\030\004 \001(\tB\003\340A\001\"i\n" + + "\024ListExamplesResponse\0228\n\010examples\030\001 \003(\0132" + + "&.google.cloud.dialogflow.cx.v3.Example\022" + + "\027\n\017next_page_token\030\002 \001(\t\"L\n\021GetExampleRe" + + "quest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!dialogflow." + + "googleapis.com/Example\"\212\001\n\024UpdateExample" + + "Request\022<\n\007example\030\001 \001(\0132&.google.cloud." + + "dialogflow.cx.v3.ExampleB\003\340A\002\0224\n\013update_" + + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003" + + "\340A\001\"\255\005\n\007Example\022\014\n\004name\030\001 \001(\t\022I\n\016playboo" + + "k_input\030\003 \001(\0132,.google.cloud.dialogflow." + + "cx.v3.PlaybookInputB\003\340A\001\022K\n\017playbook_out" + + "put\030\004 \001(\0132-.google.cloud.dialogflow.cx.v" + + "3.PlaybookOutputB\003\340A\001\022;\n\007actions\030\002 \003(\0132%" + + ".google.cloud.dialogflow.cx.v3.ActionB\003\340" + + "A\002\022\031\n\014display_name\030\006 \001(\tB\003\340A\002\022\030\n\013descrip" + + "tion\030\010 \001(\tB\003\340A\001\022\030\n\013token_count\030\t \001(\003B\003\340A" + + "\003\0224\n\013create_time\030\n \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\0224\n\013update_time\030\013 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\003\022K\n\022convers" + + "ation_state\030\014 \001(\0162*.google.cloud.dialogf" + + "low.cx.v3.OutputStateB\003\340A\002\022\032\n\rlanguage_c" + + "ode\030\r \001(\tB\003\340A\001:\232\001\352A\226\001\n!dialogflow.google" + + "apis.com/Example\022^projects/{project}/loc" + + "ations/{location}/agents/{agent}/playboo" + + "ks/{playbook}/examples/{example}*\010exampl" + + "es2\007example2\363\010\n\010Examples\022\321\001\n\rCreateExamp" + + "le\0223.google.cloud.dialogflow.cx.v3.Creat" + + "eExampleRequest\032&.google.cloud.dialogflo" + + "w.cx.v3.Example\"c\332A\016parent,example\202\323\344\223\002L" + + "\"A/v3/{parent=projects/*/locations/*/age" + + "nts/*/playbooks/*}/examples:\007example\022\256\001\n" + + "\rDeleteExample\0223.google.cloud.dialogflow" + + ".cx.v3.DeleteExampleRequest\032\026.google.pro" + + "tobuf.Empty\"P\332A\004name\202\323\344\223\002C*A/v3/{name=pr" + + "ojects/*/locations/*/agents/*/playbooks/" + + "*/examples/*}\022\313\001\n\014ListExamples\0222.google." + + "cloud.dialogflow.cx.v3.ListExamplesReque" + + "st\0323.google.cloud.dialogflow.cx.v3.ListE" + + "xamplesResponse\"R\332A\006parent\202\323\344\223\002C\022A/v3/{p" + + "arent=projects/*/locations/*/agents/*/pl" + + "aybooks/*}/examples\022\270\001\n\nGetExample\0220.goo" + + "gle.cloud.dialogflow.cx.v3.GetExampleReq" + + "uest\032&.google.cloud.dialogflow.cx.v3.Exa" + + "mple\"P\332A\004name\202\323\344\223\002C\022A/v3/{name=projects/" + + "*/locations/*/agents/*/playbooks/*/examp" + + "les/*}\022\336\001\n\rUpdateExample\0223.google.cloud." + + "dialogflow.cx.v3.UpdateExampleRequest\032&." + + "google.cloud.dialogflow.cx.v3.Example\"p\332" + + "A\023example,update_mask\202\323\344\223\002T2I/v3/{exampl" + + "e.name=projects/*/locations/*/agents/*/p" + + "laybooks/*/examples/*}:\007example\032x\312A\031dial" + + "ogflow.googleapis.com\322AYhttps://www.goog" + + "leapis.com/auth/cloud-platform,https://w" + + "ww.googleapis.com/auth/dialogflowB\213\001\n!co" + + "m.google.cloud.dialogflow.cx.v3B\014Example" + + "ProtoP\001Z1cloud.google.com/go/dialogflow/" + + "cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud.D" + + "ialogflow.Cx.V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + 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.v3.TraceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CreateExampleRequest_descriptor, + new java.lang.String[] { + "Parent", "Example", + }); + internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DeleteExampleRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_descriptor, + new java.lang.String[] { + "Examples", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_descriptor, + new java.lang.String[] { + "Example", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3_Example_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3_Example_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Example_descriptor, + new java.lang.String[] { + "Name", + "PlaybookInput", + "PlaybookOutput", + "Actions", + "DisplayName", + "Description", + "TokenCount", + "CreateTime", + "UpdateTime", + "ConversationState", + "LanguageCode", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + 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.v3.TraceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookRequest.java new file mode 100644 index 000000000000..614aea7f7a51 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookRequest.java @@ -0,0 +1,1265 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.ExportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportPlaybookRequest} + */ +public final class ExportPlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportPlaybookRequest) + ExportPlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ExportPlaybookRequest.newBuilder() to construct. + private ExportPlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportPlaybookRequest() { + name_ = ""; + playbookUri_ = ""; + dataFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportPlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.Builder.class); + } + + /** + * + * + *
+   * Data format of the exported playbook.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat} + */ + public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified format.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+     * Flow content will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + BLOB(1), + /** + * + * + *
+     * Flow content will be exported in JSON format.
+     * 
+ * + * JSON = 2; + */ + JSON(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified format.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Flow content will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + public static final int BLOB_VALUE = 1; + + /** + * + * + *
+     * Flow content will be exported in JSON format.
+     * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + + 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; + 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.v3.ExportPlaybookRequest.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.v3.ExportPlaybookRequest.DataFormat) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the playbook to export.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the playbook to export.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object playbookUri_ = ""; + + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+   * left unspecified, the serialized playbook is returned inline.
+   *
+   * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The playbookUri. + */ + @java.lang.Override + public java.lang.String getPlaybookUri() { + java.lang.Object ref = playbookUri_; + 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(); + playbookUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+   * left unspecified, the serialized playbook is returned inline.
+   *
+   * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for playbookUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookUriBytes() { + java.lang.Object ref = playbookUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbookUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 3; + private int dataFormat_ = 0; + + /** + * + * + *
+   * Optional. The data format of the exported agent. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.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 agent. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat getDataFormat() { + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat.forNumber(dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playbookUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, playbookUri_); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playbookUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, playbookUri_); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, 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.v3.ExportPlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPlaybookUri().equals(other.getPlaybookUri())) return false; + if (dataFormat_ != other.dataFormat_) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PLAYBOOK_URI_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookUri().hashCode(); + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest 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.v3.ExportPlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest 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.v3.ExportPlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest 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.v3.ExportPlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest 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.v3.ExportPlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest 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.v3.ExportPlaybookRequest 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.v3.ExportPlaybookRequest 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.v3.ExportPlaybookRequest 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
+   * [Playbooks.ExportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportPlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportPlaybookRequest) + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + playbookUri_ = ""; + dataFormat_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.playbookUri_ = playbookUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataFormat_ = dataFormat_; + } + } + + @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.v3.ExportPlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPlaybookUri().isEmpty()) { + playbookUri_ = other.playbookUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + playbookUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + dataFormat_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the playbook to export.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook to export.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook to export.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook to export.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook to export.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object playbookUri_ = ""; + + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+     * left unspecified, the serialized playbook is returned inline.
+     *
+     * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The playbookUri. + */ + public java.lang.String getPlaybookUri() { + java.lang.Object ref = playbookUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + playbookUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+     * left unspecified, the serialized playbook is returned inline.
+     *
+     * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for playbookUri. + */ + public com.google.protobuf.ByteString getPlaybookUriBytes() { + java.lang.Object ref = playbookUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbookUri_ = 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 playbook
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+     * left unspecified, the serialized playbook is returned inline.
+     *
+     * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The playbookUri to set. + * @return This builder for chaining. + */ + public Builder setPlaybookUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + playbookUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+     * left unspecified, the serialized playbook is returned inline.
+     *
+     * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPlaybookUri() { + playbookUri_ = getDefaultInstance().getPlaybookUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+     * left unspecified, the serialized playbook is returned inline.
+     *
+     * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for playbookUri to set. + * @return This builder for chaining. + */ + public Builder setPlaybookUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + playbookUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int dataFormat_ = 0; + + /** + * + * + *
+     * Optional. The data format of the exported agent. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.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 agent. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The data format of the exported agent. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat getDataFormat() { + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat.forNumber(dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The data format of the exported agent. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The data format of the exported agent. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + bitField0_ = (bitField0_ & ~0x00000004); + 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.v3.ExportPlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportPlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportPlaybookRequest 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.v3.ExportPlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..3b1d6fb238e3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ExportPlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ExportPlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook to export.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the playbook to export.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+   * left unspecified, the serialized playbook is returned inline.
+   *
+   * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The playbookUri. + */ + java.lang.String getPlaybookUri(); + + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
+   * left unspecified, the serialized playbook is returned inline.
+   *
+   * 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 playbook_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for playbookUri. + */ + com.google.protobuf.ByteString getPlaybookUriBytes(); + + /** + * + * + *
+   * Optional. The data format of the exported agent. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + + /** + * + * + *
+   * Optional. The data format of the exported agent. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat data_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat getDataFormat(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookResponse.java new file mode 100644 index 000000000000..69677f5b81fe --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookResponse.java @@ -0,0 +1,930 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Playbooks.ExportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportPlaybookResponse} + */ +public final class ExportPlaybookResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportPlaybookResponse) + ExportPlaybookResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ExportPlaybookResponse.newBuilder() to construct. + private ExportPlaybookResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportPlaybookResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportPlaybookResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.class, + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.Builder.class); + } + + private int playbookCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object playbook_; + + public enum PlaybookCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLAYBOOK_URI(1), + PLAYBOOK_CONTENT(2), + PLAYBOOK_NOT_SET(0); + private final int value; + + private PlaybookCase(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 PlaybookCase valueOf(int value) { + return forNumber(value); + } + + public static PlaybookCase forNumber(int value) { + switch (value) { + case 1: + return PLAYBOOK_URI; + case 2: + return PLAYBOOK_CONTENT; + case 0: + return PLAYBOOK_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PlaybookCase getPlaybookCase() { + return PlaybookCase.forNumber(playbookCase_); + } + + public static final int PLAYBOOK_URI_FIELD_NUMBER = 1; + + /** + * + * + *
+   * The URI to a file containing the exported playbook. This field is
+   * populated only if `playbook_uri` is specified in
+   * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+   * 
+ * + * string playbook_uri = 1; + * + * @return Whether the playbookUri field is set. + */ + public boolean hasPlaybookUri() { + return playbookCase_ == 1; + } + + /** + * + * + *
+   * The URI to a file containing the exported playbook. This field is
+   * populated only if `playbook_uri` is specified in
+   * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+   * 
+ * + * string playbook_uri = 1; + * + * @return The playbookUri. + */ + public java.lang.String getPlaybookUri() { + java.lang.Object ref = ""; + if (playbookCase_ == 1) { + ref = playbook_; + } + 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 (playbookCase_ == 1) { + playbook_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The URI to a file containing the exported playbook. This field is
+   * populated only if `playbook_uri` is specified in
+   * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+   * 
+ * + * string playbook_uri = 1; + * + * @return The bytes for playbookUri. + */ + public com.google.protobuf.ByteString getPlaybookUriBytes() { + java.lang.Object ref = ""; + if (playbookCase_ == 1) { + ref = playbook_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (playbookCase_ == 1) { + playbook_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_CONTENT_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Uncompressed raw byte content for playbook.
+   * 
+ * + * bytes playbook_content = 2; + * + * @return Whether the playbookContent field is set. + */ + @java.lang.Override + public boolean hasPlaybookContent() { + return playbookCase_ == 2; + } + + /** + * + * + *
+   * Uncompressed raw byte content for playbook.
+   * 
+ * + * bytes playbook_content = 2; + * + * @return The playbookContent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookContent() { + if (playbookCase_ == 2) { + return (com.google.protobuf.ByteString) playbook_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + 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 (playbookCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, playbook_); + } + if (playbookCase_ == 2) { + output.writeBytes(2, (com.google.protobuf.ByteString) playbook_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (playbookCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, playbook_); + } + if (playbookCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 2, (com.google.protobuf.ByteString) playbook_); + } + 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.v3.ExportPlaybookResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse other = + (com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse) obj; + + if (!getPlaybookCase().equals(other.getPlaybookCase())) return false; + switch (playbookCase_) { + case 1: + if (!getPlaybookUri().equals(other.getPlaybookUri())) return false; + break; + case 2: + if (!getPlaybookContent().equals(other.getPlaybookContent())) 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 (playbookCase_) { + case 1: + hash = (37 * hash) + PLAYBOOK_URI_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookUri().hashCode(); + break; + case 2: + hash = (37 * hash) + PLAYBOOK_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse 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.v3.ExportPlaybookResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse 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.v3.ExportPlaybookResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse 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.v3.ExportPlaybookResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse 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.v3.ExportPlaybookResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse 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.v3.ExportPlaybookResponse 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.v3.ExportPlaybookResponse 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.v3.ExportPlaybookResponse 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
+   * [Playbooks.ExportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportPlaybookResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportPlaybookResponse) + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.class, + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playbookCase_ = 0; + playbook_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse build() { + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse result = + new com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse result) { + result.playbookCase_ = playbookCase_; + result.playbook_ = this.playbook_; + } + + @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.v3.ExportPlaybookResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.getDefaultInstance()) + return this; + switch (other.getPlaybookCase()) { + case PLAYBOOK_URI: + { + playbookCase_ = 1; + playbook_ = other.playbook_; + onChanged(); + break; + } + case PLAYBOOK_CONTENT: + { + setPlaybookContent(other.getPlaybookContent()); + break; + } + case PLAYBOOK_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(); + playbookCase_ = 1; + playbook_ = s; + break; + } // case 10 + case 18: + { + playbook_ = input.readBytes(); + playbookCase_ = 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 playbookCase_ = 0; + private java.lang.Object playbook_; + + public PlaybookCase getPlaybookCase() { + return PlaybookCase.forNumber(playbookCase_); + } + + public Builder clearPlaybook() { + playbookCase_ = 0; + playbook_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The URI to a file containing the exported playbook. This field is
+     * populated only if `playbook_uri` is specified in
+     * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+     * 
+ * + * string playbook_uri = 1; + * + * @return Whether the playbookUri field is set. + */ + @java.lang.Override + public boolean hasPlaybookUri() { + return playbookCase_ == 1; + } + + /** + * + * + *
+     * The URI to a file containing the exported playbook. This field is
+     * populated only if `playbook_uri` is specified in
+     * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+     * 
+ * + * string playbook_uri = 1; + * + * @return The playbookUri. + */ + @java.lang.Override + public java.lang.String getPlaybookUri() { + java.lang.Object ref = ""; + if (playbookCase_ == 1) { + ref = playbook_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (playbookCase_ == 1) { + playbook_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URI to a file containing the exported playbook. This field is
+     * populated only if `playbook_uri` is specified in
+     * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+     * 
+ * + * string playbook_uri = 1; + * + * @return The bytes for playbookUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookUriBytes() { + java.lang.Object ref = ""; + if (playbookCase_ == 1) { + ref = playbook_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (playbookCase_ == 1) { + playbook_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URI to a file containing the exported playbook. This field is
+     * populated only if `playbook_uri` is specified in
+     * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+     * 
+ * + * string playbook_uri = 1; + * + * @param value The playbookUri to set. + * @return This builder for chaining. + */ + public Builder setPlaybookUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + playbookCase_ = 1; + playbook_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI to a file containing the exported playbook. This field is
+     * populated only if `playbook_uri` is specified in
+     * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+     * 
+ * + * string playbook_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearPlaybookUri() { + if (playbookCase_ == 1) { + playbookCase_ = 0; + playbook_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The URI to a file containing the exported playbook. This field is
+     * populated only if `playbook_uri` is specified in
+     * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+     * 
+ * + * string playbook_uri = 1; + * + * @param value The bytes for playbookUri to set. + * @return This builder for chaining. + */ + public Builder setPlaybookUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + playbookCase_ = 1; + playbook_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Uncompressed raw byte content for playbook.
+     * 
+ * + * bytes playbook_content = 2; + * + * @return Whether the playbookContent field is set. + */ + public boolean hasPlaybookContent() { + return playbookCase_ == 2; + } + + /** + * + * + *
+     * Uncompressed raw byte content for playbook.
+     * 
+ * + * bytes playbook_content = 2; + * + * @return The playbookContent. + */ + public com.google.protobuf.ByteString getPlaybookContent() { + if (playbookCase_ == 2) { + return (com.google.protobuf.ByteString) playbook_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + /** + * + * + *
+     * Uncompressed raw byte content for playbook.
+     * 
+ * + * bytes playbook_content = 2; + * + * @param value The playbookContent to set. + * @return This builder for chaining. + */ + public Builder setPlaybookContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + playbookCase_ = 2; + playbook_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Uncompressed raw byte content for playbook.
+     * 
+ * + * bytes playbook_content = 2; + * + * @return This builder for chaining. + */ + public Builder clearPlaybookContent() { + if (playbookCase_ == 2) { + playbookCase_ = 0; + playbook_ = null; + 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.v3.ExportPlaybookResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportPlaybookResponse) + private static final com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportPlaybookResponse 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.v3.ExportPlaybookResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookResponseOrBuilder.java new file mode 100644 index 000000000000..05fa88411ff6 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportPlaybookResponseOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ExportPlaybookResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ExportPlaybookResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI to a file containing the exported playbook. This field is
+   * populated only if `playbook_uri` is specified in
+   * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+   * 
+ * + * string playbook_uri = 1; + * + * @return Whether the playbookUri field is set. + */ + boolean hasPlaybookUri(); + + /** + * + * + *
+   * The URI to a file containing the exported playbook. This field is
+   * populated only if `playbook_uri` is specified in
+   * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+   * 
+ * + * string playbook_uri = 1; + * + * @return The playbookUri. + */ + java.lang.String getPlaybookUri(); + + /** + * + * + *
+   * The URI to a file containing the exported playbook. This field is
+   * populated only if `playbook_uri` is specified in
+   * [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest].
+   * 
+ * + * string playbook_uri = 1; + * + * @return The bytes for playbookUri. + */ + com.google.protobuf.ByteString getPlaybookUriBytes(); + + /** + * + * + *
+   * Uncompressed raw byte content for playbook.
+   * 
+ * + * bytes playbook_content = 2; + * + * @return Whether the playbookContent field is set. + */ + boolean hasPlaybookContent(); + + /** + * + * + *
+   * Uncompressed raw byte content for playbook.
+   * 
+ * + * bytes playbook_content = 2; + * + * @return The playbookContent. + */ + com.google.protobuf.ByteString getPlaybookContent(); + + com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.PlaybookCase getPlaybookCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java index c5ccac060f62..417e12be7d89 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Flow.java @@ -59,6 +59,8 @@ private Flow() { transitionRoutes_ = java.util.Collections.emptyList(); eventHandlers_ = java.util.Collections.emptyList(); transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + inputParameterDefinitions_ = java.util.Collections.emptyList(); + outputParameterDefinitions_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -1903,6 +1905,186 @@ public boolean hasKnowledgeConnectorSettings() { : knowledgeConnectorSettings_; } + public static final int INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private java.util.List + inputParameterDefinitions_; + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getInputParameterDefinitionsList() { + return inputParameterDefinitions_; + } + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getInputParameterDefinitionsOrBuilderList() { + return inputParameterDefinitions_; + } + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getInputParameterDefinitionsCount() { + return inputParameterDefinitions_.size(); + } + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getInputParameterDefinitions( + int index) { + return inputParameterDefinitions_.get(index); + } + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index) { + return inputParameterDefinitions_.get(index); + } + + public static final int OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private java.util.List + outputParameterDefinitions_; + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getOutputParameterDefinitionsList() { + return outputParameterDefinitions_; + } + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getOutputParameterDefinitionsOrBuilderList() { + return outputParameterDefinitions_; + } + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getOutputParameterDefinitionsCount() { + return outputParameterDefinitions_.size(); + } + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getOutputParameterDefinitions( + int index) { + return outputParameterDefinitions_.get(index); + } + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index) { + return outputParameterDefinitions_.get(index); + } + public static final int MULTI_LANGUAGE_SETTINGS_FIELD_NUMBER = 28; private com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multiLanguageSettings_; @@ -2025,6 +2207,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(18, getKnowledgeConnectorSettings()); } + for (int i = 0; i < inputParameterDefinitions_.size(); i++) { + output.writeMessage(26, inputParameterDefinitions_.get(i)); + } + for (int i = 0; i < outputParameterDefinitions_.size(); i++) { + output.writeMessage(27, outputParameterDefinitions_.get(i)); + } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(28, getMultiLanguageSettings()); } @@ -2074,6 +2262,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 18, getKnowledgeConnectorSettings()); } + for (int i = 0; i < inputParameterDefinitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 26, inputParameterDefinitions_.get(i)); + } + for (int i = 0; i < outputParameterDefinitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, outputParameterDefinitions_.get(i)); + } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getMultiLanguageSettings()); @@ -2115,6 +2313,10 @@ public boolean equals(final java.lang.Object obj) { if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings())) return false; } + if (!getInputParameterDefinitionsList().equals(other.getInputParameterDefinitionsList())) + return false; + if (!getOutputParameterDefinitionsList().equals(other.getOutputParameterDefinitionsList())) + return false; if (hasMultiLanguageSettings() != other.hasMultiLanguageSettings()) return false; if (hasMultiLanguageSettings()) { if (!getMultiLanguageSettings().equals(other.getMultiLanguageSettings())) return false; @@ -2161,6 +2363,14 @@ public int hashCode() { hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode(); } + if (getInputParameterDefinitionsCount() > 0) { + hash = (37 * hash) + INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getInputParameterDefinitionsList().hashCode(); + } + if (getOutputParameterDefinitionsCount() > 0) { + hash = (37 * hash) + OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getOutputParameterDefinitionsList().hashCode(); + } if (hasMultiLanguageSettings()) { hash = (37 * hash) + MULTI_LANGUAGE_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getMultiLanguageSettings().hashCode(); @@ -2326,6 +2536,8 @@ private void maybeForceBuilderInitialization() { getNluSettingsFieldBuilder(); getAdvancedSettingsFieldBuilder(); getKnowledgeConnectorSettingsFieldBuilder(); + getInputParameterDefinitionsFieldBuilder(); + getOutputParameterDefinitionsFieldBuilder(); getMultiLanguageSettingsFieldBuilder(); } } @@ -2367,6 +2579,20 @@ public Builder clear() { knowledgeConnectorSettingsBuilder_.dispose(); knowledgeConnectorSettingsBuilder_ = null; } + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitions_ = java.util.Collections.emptyList(); + } else { + inputParameterDefinitions_ = null; + inputParameterDefinitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitions_ = java.util.Collections.emptyList(); + } else { + outputParameterDefinitions_ = null; + outputParameterDefinitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); multiLanguageSettings_ = null; if (multiLanguageSettingsBuilder_ != null) { multiLanguageSettingsBuilder_.dispose(); @@ -2427,6 +2653,26 @@ private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.Flow r } else { result.eventHandlers_ = eventHandlersBuilder_.build(); } + if (inputParameterDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + inputParameterDefinitions_ = + java.util.Collections.unmodifiableList(inputParameterDefinitions_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.inputParameterDefinitions_ = inputParameterDefinitions_; + } else { + result.inputParameterDefinitions_ = inputParameterDefinitionsBuilder_.build(); + } + if (outputParameterDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + outputParameterDefinitions_ = + java.util.Collections.unmodifiableList(outputParameterDefinitions_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.outputParameterDefinitions_ = outputParameterDefinitions_; + } else { + result.outputParameterDefinitions_ = outputParameterDefinitionsBuilder_.build(); + } } private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Flow result) { @@ -2462,14 +2708,14 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Flow result) { : knowledgeConnectorSettingsBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.multiLanguageSettings_ = multiLanguageSettingsBuilder_ == null ? multiLanguageSettings_ : multiLanguageSettingsBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.locked_ = locked_; } result.bitField0_ |= to_bitField0_; @@ -2608,6 +2854,60 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Flow other) { if (other.hasKnowledgeConnectorSettings()) { mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings()); } + if (inputParameterDefinitionsBuilder_ == null) { + if (!other.inputParameterDefinitions_.isEmpty()) { + if (inputParameterDefinitions_.isEmpty()) { + inputParameterDefinitions_ = other.inputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.addAll(other.inputParameterDefinitions_); + } + onChanged(); + } + } else { + if (!other.inputParameterDefinitions_.isEmpty()) { + if (inputParameterDefinitionsBuilder_.isEmpty()) { + inputParameterDefinitionsBuilder_.dispose(); + inputParameterDefinitionsBuilder_ = null; + inputParameterDefinitions_ = other.inputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000200); + inputParameterDefinitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputParameterDefinitionsFieldBuilder() + : null; + } else { + inputParameterDefinitionsBuilder_.addAllMessages(other.inputParameterDefinitions_); + } + } + } + if (outputParameterDefinitionsBuilder_ == null) { + if (!other.outputParameterDefinitions_.isEmpty()) { + if (outputParameterDefinitions_.isEmpty()) { + outputParameterDefinitions_ = other.outputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.addAll(other.outputParameterDefinitions_); + } + onChanged(); + } + } else { + if (!other.outputParameterDefinitions_.isEmpty()) { + if (outputParameterDefinitionsBuilder_.isEmpty()) { + outputParameterDefinitionsBuilder_.dispose(); + outputParameterDefinitionsBuilder_ = null; + outputParameterDefinitions_ = other.outputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000400); + outputParameterDefinitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputParameterDefinitionsFieldBuilder() + : null; + } else { + outputParameterDefinitionsBuilder_.addAllMessages(other.outputParameterDefinitions_); + } + } + } if (other.hasMultiLanguageSettings()) { mergeMultiLanguageSettings(other.getMultiLanguageSettings()); } @@ -2712,17 +3012,45 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 146 + case 210: + { + com.google.cloud.dialogflow.cx.v3.ParameterDefinition m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.parser(), + extensionRegistry); + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(m); + } else { + inputParameterDefinitionsBuilder_.addMessage(m); + } + break; + } // case 210 + case 218: + { + com.google.cloud.dialogflow.cx.v3.ParameterDefinition m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.parser(), + extensionRegistry); + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(m); + } else { + outputParameterDefinitionsBuilder_.addMessage(m); + } + break; + } // case 218 case 226: { input.readMessage( getMultiLanguageSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; break; } // case 226 case 240: { locked_ = input.readBool(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; break; } // case 240 default: @@ -5265,50 +5593,80 @@ public Builder clearKnowledgeConnectorSettings() { return knowledgeConnectorSettingsBuilder_; } - private com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multiLanguageSettings_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings, - com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.Builder, - com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettingsOrBuilder> - multiLanguageSettingsBuilder_; + private java.util.List + inputParameterDefinitions_ = java.util.Collections.emptyList(); + + private void ensureInputParameterDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + inputParameterDefinitions_ = + new java.util.ArrayList( + inputParameterDefinitions_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder> + inputParameterDefinitionsBuilder_; /** * * *
-     * Optional. Multi-lingual agent settings for this flow.
+     * Optional. Defined structured input parameters for this flow.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the multiLanguageSettings field is set. */ - public boolean hasMultiLanguageSettings() { - return ((bitField0_ & 0x00000200) != 0); + public java.util.List + getInputParameterDefinitionsList() { + if (inputParameterDefinitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputParameterDefinitions_); + } else { + return inputParameterDefinitionsBuilder_.getMessageList(); + } } /** * * *
-     * Optional. Multi-lingual agent settings for this flow.
+     * Optional. Defined structured input parameters for this flow.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; * + */ + public int getInputParameterDefinitionsCount() { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.size(); + } else { + return inputParameterDefinitionsBuilder_.getCount(); + } + } + + /** * - * @return The multiLanguageSettings. + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings getMultiLanguageSettings() { - if (multiLanguageSettingsBuilder_ == null) { - return multiLanguageSettings_ == null - ? com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.getDefaultInstance() - : multiLanguageSettings_; + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getInputParameterDefinitions( + int index) { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.get(index); } else { - return multiLanguageSettingsBuilder_.getMessage(); + return inputParameterDefinitionsBuilder_.getMessage(index); } } @@ -5316,25 +5674,25 @@ public com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings getMultiLang * * *
-     * Optional. Multi-lingual agent settings for this flow.
+     * Optional. Defined structured input parameters for this flow.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setMultiLanguageSettings( - com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings value) { - if (multiLanguageSettingsBuilder_ == null) { + public Builder setInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - multiLanguageSettings_ = value; + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.set(index, value); + onChanged(); } else { - multiLanguageSettingsBuilder_.setMessage(value); + inputParameterDefinitionsBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000200; - onChanged(); return this; } @@ -5342,22 +5700,22 @@ public Builder setMultiLanguageSettings( * * *
-     * Optional. Multi-lingual agent settings for this flow.
+     * Optional. Defined structured input parameters for this flow.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setMultiLanguageSettings( - com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.Builder builderForValue) { - if (multiLanguageSettingsBuilder_ == null) { - multiLanguageSettings_ = builderForValue.build(); + public Builder setInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.set(index, builderForValue.build()); + onChanged(); } else { - multiLanguageSettingsBuilder_.setMessage(builderForValue.build()); + inputParameterDefinitionsBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000200; - onChanged(); return this; } @@ -5365,30 +5723,838 @@ public Builder setMultiLanguageSettings( * * *
-     * Optional. Multi-lingual agent settings for this flow.
+     * Optional. Defined structured input parameters for this flow.
      * 
* * - * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeMultiLanguageSettings( - com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings value) { - if (multiLanguageSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && multiLanguageSettings_ != null - && multiLanguageSettings_ - != com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings - .getDefaultInstance()) { - getMultiLanguageSettingsBuilder().mergeFrom(value); - } else { - multiLanguageSettings_ = value; - } + public Builder addInputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(value); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(index, value); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(builderForValue.build()); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(index, builderForValue.build()); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllInputParameterDefinitions( + java.lang.Iterable + values) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputParameterDefinitions_); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputParameterDefinitions() { + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeInputParameterDefinitions(int index) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.remove(index); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + getInputParameterDefinitionsBuilder(int index) { + return getInputParameterDefinitionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index) { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.get(index); + } else { + return inputParameterDefinitionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInputParameterDefinitionsOrBuilderList() { + if (inputParameterDefinitionsBuilder_ != null) { + return inputParameterDefinitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputParameterDefinitions_); + } + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + addInputParameterDefinitionsBuilder() { + return getInputParameterDefinitionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + addInputParameterDefinitionsBuilder(int index) { + return getInputParameterDefinitionsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInputParameterDefinitionsBuilderList() { + return getInputParameterDefinitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder> + getInputParameterDefinitionsFieldBuilder() { + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder>( + inputParameterDefinitions_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + inputParameterDefinitions_ = null; + } + return inputParameterDefinitionsBuilder_; + } + + private java.util.List + outputParameterDefinitions_ = java.util.Collections.emptyList(); + + private void ensureOutputParameterDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + outputParameterDefinitions_ = + new java.util.ArrayList( + outputParameterDefinitions_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder> + outputParameterDefinitionsBuilder_; + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutputParameterDefinitionsList() { + if (outputParameterDefinitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputParameterDefinitions_); + } else { + return outputParameterDefinitionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getOutputParameterDefinitionsCount() { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.size(); + } else { + return outputParameterDefinitionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getOutputParameterDefinitions( + int index) { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.get(index); + } else { + return outputParameterDefinitionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.set(index, value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.set(index, builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(index, value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(index, builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllOutputParameterDefinitions( + java.lang.Iterable + values) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputParameterDefinitions_); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOutputParameterDefinitions() { + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeOutputParameterDefinitions(int index) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.remove(index); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + getOutputParameterDefinitionsBuilder(int index) { + return getOutputParameterDefinitionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index) { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.get(index); + } else { + return outputParameterDefinitionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutputParameterDefinitionsOrBuilderList() { + if (outputParameterDefinitionsBuilder_ != null) { + return outputParameterDefinitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputParameterDefinitions_); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + addOutputParameterDefinitionsBuilder() { + return getOutputParameterDefinitionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + addOutputParameterDefinitionsBuilder(int index) { + return getOutputParameterDefinitionsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this flow.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutputParameterDefinitionsBuilderList() { + return getOutputParameterDefinitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder> + getOutputParameterDefinitionsFieldBuilder() { + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder>( + outputParameterDefinitions_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + outputParameterDefinitions_ = null; + } + return outputParameterDefinitionsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multiLanguageSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings, + com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.Builder, + com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettingsOrBuilder> + multiLanguageSettingsBuilder_; + + /** + * + * + *
+     * Optional. Multi-lingual agent settings for this flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiLanguageSettings field is set. + */ + public boolean hasMultiLanguageSettings() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Optional. Multi-lingual agent settings for this flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiLanguageSettings. + */ + public com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings getMultiLanguageSettings() { + if (multiLanguageSettingsBuilder_ == null) { + return multiLanguageSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.getDefaultInstance() + : multiLanguageSettings_; + } else { + return multiLanguageSettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Multi-lingual agent settings for this flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiLanguageSettings( + com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings value) { + if (multiLanguageSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + multiLanguageSettings_ = value; + } else { + multiLanguageSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Multi-lingual agent settings for this flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiLanguageSettings( + com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.Builder builderForValue) { + if (multiLanguageSettingsBuilder_ == null) { + multiLanguageSettings_ = builderForValue.build(); + } else { + multiLanguageSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Multi-lingual agent settings for this flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings multi_language_settings = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMultiLanguageSettings( + com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings value) { + if (multiLanguageSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && multiLanguageSettings_ != null + && multiLanguageSettings_ + != com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings + .getDefaultInstance()) { + getMultiLanguageSettingsBuilder().mergeFrom(value); + } else { + multiLanguageSettings_ = value; + } } else { multiLanguageSettingsBuilder_.mergeFrom(value); } if (multiLanguageSettings_ != null) { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); } return this; @@ -5406,7 +6572,7 @@ public Builder mergeMultiLanguageSettings( *
*/ public Builder clearMultiLanguageSettings() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000800); multiLanguageSettings_ = null; if (multiLanguageSettingsBuilder_ != null) { multiLanguageSettingsBuilder_.dispose(); @@ -5429,7 +6595,7 @@ public Builder clearMultiLanguageSettings() { */ public com.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.Builder getMultiLanguageSettingsBuilder() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); return getMultiLanguageSettingsFieldBuilder().getBuilder(); } @@ -5519,7 +6685,7 @@ public boolean getLocked() { public Builder setLocked(boolean value) { locked_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -5537,7 +6703,7 @@ public Builder setLocked(boolean value) { * @return This builder for chaining. */ public Builder clearLocked() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00001000); locked_ = false; onChanged(); return this; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowInvocation.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowInvocation.java new file mode 100644 index 000000000000..666c93dee8a6 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowInvocation.java @@ -0,0 +1,1022 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Stores metadata of the invocation of a CX flow.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FlowInvocation} + */ +public final class FlowInvocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.FlowInvocation) + FlowInvocationOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FlowInvocation.newBuilder() to construct. + private FlowInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FlowInvocation() { + flow_ = ""; + displayName_ = ""; + flowState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FlowInvocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FlowInvocation.class, + com.google.cloud.dialogflow.cx.v3.FlowInvocation.Builder.class); + } + + public static final int FLOW_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object flow_ = ""; + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + @java.lang.Override + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + 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(); + flow_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. The display name of the flow.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The display name of the flow.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FLOW_STATE_FIELD_NUMBER = 4; + private int flowState_ = 0; + + /** + * + * + *
+   * Required. Flow invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for flowState. + */ + @java.lang.Override + public int getFlowStateValue() { + return flowState_; + } + + /** + * + * + *
+   * Required. Flow invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The flowState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.OutputState getFlowState() { + com.google.cloud.dialogflow.cx.v3.OutputState result = + com.google.cloud.dialogflow.cx.v3.OutputState.forNumber(flowState_); + return result == null ? com.google.cloud.dialogflow.cx.v3.OutputState.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(flow_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, flow_); + } + if (flowState_ + != com.google.cloud.dialogflow.cx.v3.OutputState.OUTPUT_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, flowState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, displayName_); + } + 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(flow_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, flow_); + } + if (flowState_ + != com.google.cloud.dialogflow.cx.v3.OutputState.OUTPUT_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, flowState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, displayName_); + } + 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.v3.FlowInvocation)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.FlowInvocation other = + (com.google.cloud.dialogflow.cx.v3.FlowInvocation) obj; + + if (!getFlow().equals(other.getFlow())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (flowState_ != other.flowState_) 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) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + getFlow().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + FLOW_STATE_FIELD_NUMBER; + hash = (53 * hash) + flowState_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.FlowInvocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowInvocation 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.v3.FlowInvocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowInvocation 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.v3.FlowInvocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowInvocation 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.v3.FlowInvocation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowInvocation 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.v3.FlowInvocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowInvocation 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.v3.FlowInvocation 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.v3.FlowInvocation 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.v3.FlowInvocation 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; + } + + /** + * + * + *
+   * Stores metadata of the invocation of a CX flow.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FlowInvocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.FlowInvocation) + com.google.cloud.dialogflow.cx.v3.FlowInvocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FlowInvocation.class, + com.google.cloud.dialogflow.cx.v3.FlowInvocation.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.FlowInvocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + flow_ = ""; + displayName_ = ""; + flowState_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowInvocation getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowInvocation build() { + com.google.cloud.dialogflow.cx.v3.FlowInvocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowInvocation buildPartial() { + com.google.cloud.dialogflow.cx.v3.FlowInvocation result = + new com.google.cloud.dialogflow.cx.v3.FlowInvocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.FlowInvocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.flow_ = flow_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.flowState_ = flowState_; + } + } + + @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.v3.FlowInvocation) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.FlowInvocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.FlowInvocation other) { + if (other == com.google.cloud.dialogflow.cx.v3.FlowInvocation.getDefaultInstance()) + return this; + if (!other.getFlow().isEmpty()) { + flow_ = other.flow_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.flowState_ != 0) { + setFlowStateValue(other.getFlowStateValue()); + } + 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: + { + flow_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 32: + { + flowState_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 58: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 58 + 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 java.lang.Object flow_ = ""; + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flow_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The flow to set. + * @return This builder for chaining. + */ + public Builder setFlow(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + flow_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearFlow() { + flow_ = getDefaultInstance().getFlow(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for flow to set. + * @return This builder for chaining. + */ + public Builder setFlowBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + flow_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int flowState_ = 0; + + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for flowState. + */ + @java.lang.Override + public int getFlowStateValue() { + return flowState_; + } + + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for flowState to set. + * @return This builder for chaining. + */ + public Builder setFlowStateValue(int value) { + flowState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The flowState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.OutputState getFlowState() { + com.google.cloud.dialogflow.cx.v3.OutputState result = + com.google.cloud.dialogflow.cx.v3.OutputState.forNumber(flowState_); + return result == null ? com.google.cloud.dialogflow.cx.v3.OutputState.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The flowState to set. + * @return This builder for chaining. + */ + public Builder setFlowState(com.google.cloud.dialogflow.cx.v3.OutputState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + flowState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearFlowState() { + bitField0_ = (bitField0_ & ~0x00000004); + flowState_ = 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.v3.FlowInvocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.FlowInvocation) + private static final com.google.cloud.dialogflow.cx.v3.FlowInvocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.FlowInvocation(); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowInvocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlowInvocation 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.v3.FlowInvocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowInvocationOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowInvocationOrBuilder.java new file mode 100644 index 000000000000..d4170f70df3a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowInvocationOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface FlowInvocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.FlowInvocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + java.lang.String getFlow(); + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + com.google.protobuf.ByteString getFlowBytes(); + + /** + * + * + *
+   * Output only. The display name of the flow.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. The display name of the flow.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Flow invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for flowState. + */ + int getFlowStateValue(); + + /** + * + * + *
+   * Required. Flow invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The flowState. + */ + com.google.cloud.dialogflow.cx.v3.OutputState getFlowState(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java index da7ddb3c25a9..804096c1bebb 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowOrBuilder.java @@ -583,6 +583,142 @@ com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOr com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsOrBuilder getKnowledgeConnectorSettingsOrBuilder(); + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getInputParameterDefinitionsList(); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ParameterDefinition getInputParameterDefinitions(int index); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getInputParameterDefinitionsCount(); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getInputParameterDefinitionsOrBuilderList(); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getOutputParameterDefinitionsList(); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ParameterDefinition getOutputParameterDefinitions(int index); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getOutputParameterDefinitionsCount(); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getOutputParameterDefinitionsOrBuilderList(); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this flow.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java index 0d2a225b5e91..4c4eb3e09b61 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java @@ -116,17 +116,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "nt.proto\032\037google/api/field_behavior.prot" + "o\032\031google/api/resource.proto\0325google/clo" + "ud/dialogflow/cx/v3/advanced_settings.proto\0323google/cloud/dialogflow/cx/v3/impor" - + "t_strategy.proto\032(google/cloud/dialogflow/cx/v3/page.proto\0326google/cloud/dialogf" - + "low/cx/v3/validation_message.proto\032#goog" - + "le/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" - + " google/protobuf/field_mask.proto\032\034google/protobuf/struct.p" - + "roto\032\037google/protobuf/timestamp.proto\"\254\003\n" + + "t_strategy.proto\032(google/cloud/dialogflow/cx/v3/page.proto\0328google/cloud/dialogf" + + "low/cx/v3/parameter_definition.proto\0326google/cloud/dialogflow/cx/v3/validation_m" + + "essage.proto\032#google/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\034google" + + "/protobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\254\003\n" + "\013NluSettings\022H\n\n" + "model_type\030\001 \001(\01624.google.cloud.dialogflow.cx.v3.NluSettings.ModelType\022" + " \n" + "\030classification_threshold\030\003 \001(\002\022Y\n" - + "\023model_training_mode\030\004 \001(\0162<.google." - + "cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode\"Y\n" + + "\023model_training_mode\030\004" + + " \001(\0162<.google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode\"Y\n" + "\tModelType\022\032\n" + "\026MODEL_TYPE_UNSPECIFIED\020\000\022\027\n" + "\023MODEL_TYPE_STANDARD\020\001\022\027\n" @@ -134,7 +134,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021ModelTrainingMode\022#\n" + "\037MODEL_TRAINING_MODE_UNSPECIFIED\020\000\022!\n" + "\035MODEL_TRAINING_MODE_AUTOMATIC\020\001\022\036\n" - + "\032MODEL_TRAINING_MODE_MANUAL\020\002\"\360\006\n" + + "\032MODEL_TRAINING_MODE_MANUAL\020\002\"\255\010\n" + "\004Flow\022\014\n" + "\004name\030\001 \001(\t\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022\023\n" @@ -146,23 +146,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027transition_route_groups\030\017 \003(\tB3\372A0\n" + ".dialogflow.googleapis.com/TransitionRouteGroup\022@\n" + "\014nlu_settings\030\013 \001(\0132*.google.cloud.dialogflow.cx.v3.NluSettings\022J\n" - + "\021advanced_settings\030\016" - + " \001(\0132/.google.cloud.dialogflow.cx.v3.AdvancedSettings\022d\n" - + "\034knowledge_connector_settings\030\022 \001(\01329.google.c" - + "loud.dialogflow.cx.v3.KnowledgeConnectorSettingsB\003\340A\001\022_\n" + + "\021advanced_settings\030\016 \001(\013" + + "2/.google.cloud.dialogflow.cx.v3.AdvancedSettings\022d\n" + + "\034knowledge_connector_settings\030\022" + + " \001(\01329.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettingsB\003\340A\001\022\\\n" + + "\033input_parameter_definitions\030\032 \003(\01322.google.cl" + + "oud.dialogflow.cx.v3.ParameterDefinitionB\003\340A\001\022]\n" + + "\034output_parameter_definitions\030\033 " + + "\003(\01322.google.cloud.dialogflow.cx.v3.ParameterDefinitionB\003\340A\001\022_\n" + "\027multi_language_settings\030\034" + " \001(\01329.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettingsB\003\340A\001\022\016\n" + "\006locked\030\036 \001(\010\032u\n" + "\025MultiLanguageSettings\022,\n" + "\037enable_multi_language_detection\030\001 \001(\010B\003\340A\001\022.\n" + "!supported_response_language_codes\030\002 \003(\tB\003\340A\001:h\352Ae\n" - + "\036dialogflow.googleapis.com/Fl" - + "ow\022Cprojects/{project}/locations/{location}/agents/{agent}/flows/{flow}\"\232\001\n" + + "\036dialogflow.googleapis.com/Flow\022Cprojects/{project}/locations/" + + "{location}/agents/{agent}/flows/{flow}\"\232\001\n" + "\021CreateFlowRequest\0226\n" + "\006parent\030\001 \001(\tB&\340A\002\372A" + " \022\036dialogflow.googleapis.com/Flow\0226\n" - + "\004flow\030\002 " - + "\001(\0132#.google.cloud.dialogflow.cx.v3.FlowB\003\340A\002\022\025\n\r" + + "\004flow\030\002" + + " \001(\0132#.google.cloud.dialogflow.cx.v3.FlowB\003\340A\002\022\025\n\r" + "language_code\030\003 \001(\t\"X\n" + "\021DeleteFlowRequest\0224\n" + "\004name\030\001 \001(\tB&\340A\002\372A \n" @@ -202,16 +206,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \003(\01320.google.cloud.dialogflow.cx.v3.ValidationMessage\022/\n" + "\013update_time\030\003" + " \001(\0132\032.google.protobuf.Timestamp:\212\001\352A\206\001\n" - + ".dialogflow.googleapis.com/FlowValidationRes" - + "ult\022Tprojects/{project}/locations/{locat" - + "ion}/agents/{agent}/flows/{flow}/validationResult\"\362\002\n" + + ".dialogflow.googleapis.com/FlowValidationResult\022Tprojects/{project}/locations" + + "/{location}/agents/{agent}/flows/{flow}/validationResult\"\362\002\n" + "\021ImportFlowRequest\0226\n" + "\006parent\030\001 \001(\tB&\340A\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\022T\n\r" - + "import_option\030\004 \001(\0162=.goo" - + "gle.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption\022T\n" + + "import_option\030\004 \001(" + + "\0162=.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption\022T\n" + "\024flow_import_strategy\030\005" + " \001(\01321.google.cloud.dialogflow.cx.v3.FlowImportStrategyB\003\340A\001\"E\n" + "\014ImportOption\022\035\n" @@ -220,8 +223,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010FALLBACK\020\002B\006\n" + "\004flow\"h\n" + "\022FlowImportStrategy\022R\n" - + "\026global_import_strategy\030\001 \001(\0162-.g" - + "oogle.cloud.dialogflow.cx.v3.ImportStrategyB\003\340A\001\"G\n" + + "\026global_import_strategy\030\001 " + + "\001(\0162-.google.cloud.dialogflow.cx.v3.ImportStrategyB\003\340A\001\"G\n" + "\022ImportFlowResponse\0221\n" + "\004flow\030\001 \001(\tB#\372A \n" + "\036dialogflow.googleapis.com/Flow\"\207\001\n" @@ -235,50 +238,52 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014flow_content\030\002 \001(\014H\000B\006\n" + "\004flow2\230\020\n" + "\005Flows\022\263\001\n\n" - + "CreateFlow\0220.google.cloud.dialogflow.cx.v3.CreateFlo" - + "wRequest\032#.google.cloud.dialogflow.cx.v3" - + ".Flow\"N\332A\013parent,flow\202\323\344\223\002:\"2/v3/{parent" - + "=projects/*/locations/*/agents/*}/flows:\004flow\022\231\001\n\n" - + "DeleteFlow\0220.google.cloud.dialogflow.cx.v3.DeleteFlowRequest\032\026.google." - + "protobuf.Empty\"A\332A\004name\202\323\344\223\0024*2/v3/{name" - + "=projects/*/locations/*/agents/*/flows/*}\022\263\001\n" - + "\tListFlows\022/.google.cloud.dialogflow.cx.v3.ListFlowsRequest\0320.google.cloud." - + "dialogflow.cx.v3.ListFlowsResponse\"C\332A\006p" - + "arent\202\323\344\223\0024\0222/v3/{parent=projects/*/locations/*/agents/*}/flows\022\240\001\n" - + "\007GetFlow\022-.google.cloud.dialogflow.cx.v3.GetFlowReque" - + "st\032#.google.cloud.dialogflow.cx.v3.Flow\"" - + "A\332A\004name\202\323\344\223\0024\0222/v3/{name=projects/*/locations/*/agents/*/flows/*}\022\275\001\n\n" - + "UpdateFlow\0220.google.cloud.dialogflow.cx.v3.Update" - + "FlowRequest\032#.google.cloud.dialogflow.cx" - + ".v3.Flow\"X\332A\020flow,update_mask\202\323\344\223\002?27/v3" - + "/{flow.name=projects/*/locations/*/agents/*/flows/*}:\004flow\022\331\001\n" - + "\tTrainFlow\022/.googl" - + "e.cloud.dialogflow.cx.v3.TrainFlowRequest\032\035.google.longrunning.Operation\"|\312A/\n" - + "\025google.protobuf.Empty\022\026google.protobuf.St" - + "ruct\332A\004name\202\323\344\223\002=\"8/v3/{name=projects/*/" - + "locations/*/agents/*/flows/*}:train:\001*\022\277\001\n" - + "\014ValidateFlow\0222.google.cloud.dialogflo" - + "w.cx.v3.ValidateFlowRequest\0323.google.cloud.dialogflow.cx.v3.FlowValidationResult" - + "\"F\202\323\344\223\002@\";/v3/{name=projects/*/locations/*/agents/*/flows/*}:validate:\001*\022\341\001\n" - + "\027GetFlowValidationResult\022=.google.cloud.dial" - + "ogflow.cx.v3.GetFlowValidationResultRequest\0323.google.cloud.dialogflow.cx.v3.Flow" - + "ValidationResult\"R\332A\004name\202\323\344\223\002E\022C/v3/{na" - + "me=projects/*/locations/*/agents/*/flows/*/validationResult}\022\322\001\n\n" - + "ImportFlow\0220.google.cloud.dialogflow.cx.v3.ImportFlowRe" - + "quest\032\035.google.longrunning.Operation\"s\312A,\n" - + "\022ImportFlowResponse\022\026google.protobuf.S" - + "truct\202\323\344\223\002>\"9/v3/{parent=projects/*/locations/*/agents/*}/flows:import:\001*\022\322\001\n\n" - + "ExportFlow\0220.google.cloud.dialogflow.cx.v3" - + ".ExportFlowRequest\032\035.google.longrunning.Operation\"s\312A,\n" - + "\022ExportFlowResponse\022\026goog" - + "le.protobuf.Struct\202\323\344\223\002>\"9/v3/{name=proj" - + "ects/*/locations/*/agents/*/flows/*}:exp" - + "ort:\001*\032x\312A\031dialogflow.googleapis.com\322AYh" - + "ttps://www.googleapis.com/auth/cloud-pla" - + "tform,https://www.googleapis.com/auth/dialogflowB\254\001\n" - + "!com.google.cloud.dialogflow.cx.v3B\tFlowProtoP\001Z1cloud.google.com/go" - + "/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Go" - + "ogle.Cloud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3b\006proto3" + + "CreateFlow\0220.google.cloud.dialogflow.cx.v3.Cr" + + "eateFlowRequest\032#.google.cloud.dialogflo" + + "w.cx.v3.Flow\"N\332A\013parent,flow\202\323\344\223\002:\"2/v3/" + + "{parent=projects/*/locations/*/agents/*}/flows:\004flow\022\231\001\n\n" + + "DeleteFlow\0220.google.cloud.dialogflow.cx.v3.DeleteFlowRequest\032\026." + + "google.protobuf.Empty\"A\332A\004name\202\323\344\223\0024*2/v" + + "3/{name=projects/*/locations/*/agents/*/flows/*}\022\263\001\n" + + "\tListFlows\022/.google.cloud.dialogflow.cx.v3.ListFlowsRequest\0320.google" + + ".cloud.dialogflow.cx.v3.ListFlowsRespons" + + "e\"C\332A\006parent\202\323\344\223\0024\0222/v3/{parent=projects/*/locations/*/agents/*}/flows\022\240\001\n" + + "\007GetFlow\022-.google.cloud.dialogflow.cx.v3.GetFl" + + "owRequest\032#.google.cloud.dialogflow.cx.v" + + "3.Flow\"A\332A\004name\202\323\344\223\0024\0222/v3/{name=projects/*/locations/*/agents/*/flows/*}\022\275\001\n\n" + + "UpdateFlow\0220.google.cloud.dialogflow.cx.v3" + + ".UpdateFlowRequest\032#.google.cloud.dialog" + + "flow.cx.v3.Flow\"X\332A\020flow,update_mask\202\323\344\223" + + "\002?27/v3/{flow.name=projects/*/locations/*/agents/*/flows/*}:\004flow\022\331\001\n" + + "\tTrainFlow\022/.google.cloud.dialogflow.cx.v3.TrainFlo" + + "wRequest\032\035.google.longrunning.Operation\"|\312A/\n" + + "\025google.protobuf.Empty\022\026google.prot" + + "obuf.Struct\332A\004name\202\323\344\223\002=\"8/v3/{name=proj" + + "ects/*/locations/*/agents/*/flows/*}:train:\001*\022\277\001\n" + + "\014ValidateFlow\0222.google.cloud.dialogflow.cx.v3.ValidateFlowRequest\0323.goo" + + "gle.cloud.dialogflow.cx.v3.FlowValidatio" + + "nResult\"F\202\323\344\223\002@\";/v3/{name=projects/*/lo" + + "cations/*/agents/*/flows/*}:validate:\001*\022\341\001\n" + + "\027GetFlowValidationResult\022=.google.cloud.dialogflow.cx.v3.GetFlowValidationRes" + + "ultRequest\0323.google.cloud.dialogflow.cx." + + "v3.FlowValidationResult\"R\332A\004name\202\323\344\223\002E\022C" + + "/v3/{name=projects/*/locations/*/agents/*/flows/*/validationResult}\022\322\001\n\n" + + "ImportFlow\0220.google.cloud.dialogflow.cx.v3.Impor" + + "tFlowRequest\032\035.google.longrunning.Operation\"s\312A,\n" + + "\022ImportFlowResponse\022\026google.pro" + + "tobuf.Struct\202\323\344\223\002>\"9/v3/{parent=projects" + + "/*/locations/*/agents/*}/flows:import:\001*\022\322\001\n\n" + + "ExportFlow\0220.google.cloud.dialogflo" + + "w.cx.v3.ExportFlowRequest\032\035.google.longrunning.Operation\"s\312A,\n" + + "\022ExportFlowResponse\022\026google.protobuf.Struct\202\323\344\223\002>\"9/v3/{na" + + "me=projects/*/locations/*/agents/*/flows" + + "/*}:export:\001*\032x\312A\031dialogflow.googleapis." + + "com\322AYhttps://www.googleapis.com/auth/cl" + + "oud-platform,https://www.googleapis.com/auth/dialogflowB\254\001\n" + + "!com.google.cloud.dialogflow.cx.v3B\tFlowProtoP\001Z1cloud.google" + + ".com/go/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002" + + "DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!Goo" + + "gle::Cloud::Dialogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -291,6 +296,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.ImportStrategyProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.ValidationMessageProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), @@ -321,6 +327,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NluSettings", "AdvancedSettings", "KnowledgeConnectorSettings", + "InputParameterDefinitions", + "OutputParameterDefinitions", "MultiLanguageSettings", "Locked", }); @@ -471,6 +479,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.ImportStrategyProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.ValidationMessageProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowTransition.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowTransition.java new file mode 100644 index 000000000000..e30cd87d620d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowTransition.java @@ -0,0 +1,853 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Stores metadata of the transition to a target CX flow. Flow transition
+ * actions exit the caller playbook and enter the child flow.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FlowTransition} + */ +public final class FlowTransition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.FlowTransition) + FlowTransitionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FlowTransition.newBuilder() to construct. + private FlowTransition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FlowTransition() { + flow_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FlowTransition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FlowTransition.class, + com.google.cloud.dialogflow.cx.v3.FlowTransition.Builder.class); + } + + public static final int FLOW_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object flow_ = ""; + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + @java.lang.Override + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + 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(); + flow_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. The display name of the flow.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The display name of the flow.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flow_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, flow_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + 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(flow_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, flow_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + 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.v3.FlowTransition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.FlowTransition other = + (com.google.cloud.dialogflow.cx.v3.FlowTransition) obj; + + if (!getFlow().equals(other.getFlow())) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + getFlow().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.FlowTransition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowTransition 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.v3.FlowTransition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowTransition 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.v3.FlowTransition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowTransition 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.v3.FlowTransition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowTransition 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.v3.FlowTransition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowTransition 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.v3.FlowTransition 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.v3.FlowTransition 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.v3.FlowTransition 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; + } + + /** + * + * + *
+   * Stores metadata of the transition to a target CX flow. Flow transition
+   * actions exit the caller playbook and enter the child flow.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.FlowTransition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.FlowTransition) + com.google.cloud.dialogflow.cx.v3.FlowTransitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.FlowTransition.class, + com.google.cloud.dialogflow.cx.v3.FlowTransition.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.FlowTransition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + flow_ = ""; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowTransition getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.FlowTransition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowTransition build() { + com.google.cloud.dialogflow.cx.v3.FlowTransition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowTransition buildPartial() { + com.google.cloud.dialogflow.cx.v3.FlowTransition result = + new com.google.cloud.dialogflow.cx.v3.FlowTransition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.FlowTransition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.flow_ = flow_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + } + + @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.v3.FlowTransition) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.FlowTransition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.FlowTransition other) { + if (other == com.google.cloud.dialogflow.cx.v3.FlowTransition.getDefaultInstance()) + return this; + if (!other.getFlow().isEmpty()) { + flow_ = other.flow_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + 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: + { + flow_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 java.lang.Object flow_ = ""; + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flow_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The flow to set. + * @return This builder for chaining. + */ + public Builder setFlow(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + flow_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearFlow() { + flow_ = getDefaultInstance().getFlow(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for flow to set. + * @return This builder for chaining. + */ + public Builder setFlowBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + flow_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the flow.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = 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.v3.FlowTransition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.FlowTransition) + private static final com.google.cloud.dialogflow.cx.v3.FlowTransition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.FlowTransition(); + } + + public static com.google.cloud.dialogflow.cx.v3.FlowTransition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlowTransition 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.v3.FlowTransition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowTransitionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowTransitionOrBuilder.java new file mode 100644 index 000000000000..06d07ca737f7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowTransitionOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface FlowTransitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.FlowTransition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + java.lang.String getFlow(); + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<Agentflows/<FlowID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + com.google.protobuf.ByteString getFlowBytes(); + + /** + * + * + *
+   * Output only. The display name of the flow.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. The display name of the flow.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java index 44fab4162e17..3ef3f143e3e1 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java @@ -4512,6 +4512,60 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { } } + public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 8; + private com.google.cloud.dialogflow.cx.v3.LlmModelSettings llmModelSettings_; + + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * + * @return Whether the llmModelSettings field is set. + */ + @java.lang.Override + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * + * @return The llmModelSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4541,6 +4595,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(7, getKnowledgeConnectorSettings()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(8, getLlmModelSettings()); + } getUnknownFields().writeTo(output); } @@ -4569,6 +4626,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, getKnowledgeConnectorSettings()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLlmModelSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4600,6 +4660,10 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false; + if (hasLlmModelSettings()) { + if (!getLlmModelSettings().equals(other.getLlmModelSettings())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4627,6 +4691,10 @@ public int hashCode() { } hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); + if (hasLlmModelSettings()) { + hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLlmModelSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -4771,6 +4839,7 @@ private void maybeForceBuilderInitialization() { getFallbackSettingsFieldBuilder(); getGenerativeSafetySettingsFieldBuilder(); getKnowledgeConnectorSettingsFieldBuilder(); + getLlmModelSettingsFieldBuilder(); } } @@ -4795,6 +4864,11 @@ public Builder clear() { knowledgeConnectorSettingsBuilder_ = null; } languageCode_ = ""; + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } return this; } @@ -4857,6 +4931,11 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.GenerativeSettings if (((from_bitField0_ & 0x00000010) != 0)) { result.languageCode_ = languageCode_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.llmModelSettings_ = + llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -4925,6 +5004,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GenerativeSettings ot bitField0_ |= 0x00000010; onChanged(); } + if (other.hasLlmModelSettings()) { + mergeLlmModelSettings(other.getLlmModelSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4984,6 +5066,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 58 + case 66: + { + input.readMessage( + getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5881,6 +5970,203 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.dialogflow.cx.v3.LlmModelSettings llmModelSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder> + llmModelSettingsBuilder_; + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * + * @return Whether the llmModelSettings field is set. + */ + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * + * @return The llmModelSettings. + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings() { + if (llmModelSettingsBuilder_ == null) { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } else { + return llmModelSettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + public Builder setLlmModelSettings(com.google.cloud.dialogflow.cx.v3.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + llmModelSettings_ = value; + } else { + llmModelSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder builderForValue) { + if (llmModelSettingsBuilder_ == null) { + llmModelSettings_ = builderForValue.build(); + } else { + llmModelSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + public Builder mergeLlmModelSettings(com.google.cloud.dialogflow.cx.v3.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && llmModelSettings_ != null + && llmModelSettings_ + != com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance()) { + getLlmModelSettingsBuilder().mergeFrom(value); + } else { + llmModelSettings_ = value; + } + } else { + llmModelSettingsBuilder_.mergeFrom(value); + } + if (llmModelSettings_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + public Builder clearLlmModelSettings() { + bitField0_ = (bitField0_ & ~0x00000020); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder getLlmModelSettingsBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getLlmModelSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + if (llmModelSettingsBuilder_ != null) { + return llmModelSettingsBuilder_.getMessageOrBuilder(); + } else { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + } + + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder> + getLlmModelSettingsFieldBuilder() { + if (llmModelSettingsBuilder_ == null) { + llmModelSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder>( + getLlmModelSettings(), getParentForChildren(), isClean()); + llmModelSettings_ = null; + } + return llmModelSettingsBuilder_; + } + @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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsOrBuilder.java index 1abd65a14dfe..19b849ea528d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsOrBuilder.java @@ -200,4 +200,41 @@ public interface GenerativeSettingsOrBuilder * @return The bytes for languageCode. */ com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * + * @return Whether the llmModelSettings field is set. + */ + boolean hasLlmModelSettings(); + + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + * + * @return The llmModelSettings. + */ + com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings(); + + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 8; + */ + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java index c6aab3d33648..bcf60d5390fe 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java @@ -44,6 +44,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -53,40 +57,41 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n" - + "7google/cloud/dialogflow/cx/v3/generative_settings.proto\022\035google.cloud.dialogfl" + "\n7google/cloud/dialogflow/cx/v3/generati" + + "ve_settings.proto\022\035google.cloud.dialogfl" + "ow.cx.v3\032\031google/api/resource.proto\0323goo" - + "gle/cloud/dialogflow/cx/v3/safety_settings.proto\"\373\006\n" - + "\022GenerativeSettings\022\014\n" - + "\004name\030\005 \001(\t\022]\n" - + "\021fallback_settings\030\001 \001(\0132B.googl" - + "e.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings\022Q\n" - + "\032generative_safety_settings\030\003" - + " \001(\0132-.google.cloud.dialogflow.cx.v3.SafetySettings\022r\n" - + "\034knowledge_connector_settings\030\007 \001(\0132L.google.cloud.dia" - + "logflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings\022\025\n\r" - + "language_code\030\004 \001(\t\032\345\001\n" - + "\020FallbackSettings\022\027\n" - + "\017selected_prompt\030\003 \001(\t\022k\n" - + "\020prompt_templates\030\004 \003(\0132Q.goo" - + "gle.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate\032K\n" - + "\016PromptTemplate\022\024\n" - + "\014display_name\030\001 \001(\t\022\023\n" - + "\013prompt_text\030\002 \001(\t\022\016\n" - + "\006frozen\030\003 \001(\010\032\255\001\n" - + "\032KnowledgeConnectorSettings\022\020\n" - + "\010business\030\001 \001(\t\022\r\n" - + "\005agent\030\002 \001(\t\022\026\n" - + "\016agent_identity\030\003 \001(\t\022\034\n" - + "\024business_description\030\004 \001(\t\022\023\n" - + "\013agent_scope\030\005 \001(\t\022#\n" - + "\033disable_data_store_fallback\030\010 \001(\010:\201\001\352A~\n" - + "1dialogflow.googleapis.com/AgentGenerativeSettings\022Iprojects/{p" - + "roject}/locations/{location}/agents/{agent}/generativeSettingsB\272\001\n" - + "!com.google.cloud.dialogflow.cx.v3B\027GenerativeSettings" - + "ProtoP\001Z1cloud.google.com/go/dialogflow/" - + "cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud.D" - + "ialogflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3b\006proto3" + + "gle/cloud/dialogflow/cx/v3/safety_settin" + + "gs.proto\"\310\007\n\022GenerativeSettings\022\014\n\004name\030" + + "\005 \001(\t\022]\n\021fallback_settings\030\001 \001(\0132B.googl" + + "e.cloud.dialogflow.cx.v3.GenerativeSetti" + + "ngs.FallbackSettings\022Q\n\032generative_safet" + + "y_settings\030\003 \001(\0132-.google.cloud.dialogfl" + + "ow.cx.v3.SafetySettings\022r\n\034knowledge_con" + + "nector_settings\030\007 \001(\0132L.google.cloud.dia" + + "logflow.cx.v3.GenerativeSettings.Knowled" + + "geConnectorSettings\022\025\n\rlanguage_code\030\004 \001" + + "(\t\022K\n\022llm_model_settings\030\010 \001(\0132/.google." + + "cloud.dialogflow.cx.v3.LlmModelSettings\032" + + "\345\001\n\020FallbackSettings\022\027\n\017selected_prompt\030" + + "\003 \001(\t\022k\n\020prompt_templates\030\004 \003(\0132Q.google" + + ".cloud.dialogflow.cx.v3.GenerativeSettin" + + "gs.FallbackSettings.PromptTemplate\032K\n\016Pr" + + "omptTemplate\022\024\n\014display_name\030\001 \001(\t\022\023\n\013pr" + + "ompt_text\030\002 \001(\t\022\016\n\006frozen\030\003 \001(\010\032\255\001\n\032Know" + + "ledgeConnectorSettings\022\020\n\010business\030\001 \001(\t" + + "\022\r\n\005agent\030\002 \001(\t\022\026\n\016agent_identity\030\003 \001(\t\022" + + "\034\n\024business_description\030\004 \001(\t\022\023\n\013agent_s" + + "cope\030\005 \001(\t\022#\n\033disable_data_store_fallbac" + + "k\030\010 \001(\010:\201\001\352A~\n1dialogflow.googleapis.com" + + "/AgentGenerativeSettings\022Iprojects/{proj" + + "ect}/locations/{location}/agents/{agent}" + + "/generativeSettings\"6\n\020LlmModelSettings\022" + + "\r\n\005model\030\001 \001(\t\022\023\n\013prompt_text\030\002 \001(\tB\272\001\n!" + + "com.google.cloud.dialogflow.cx.v3B\027Gener" + + "ativeSettingsProtoP\001Z1cloud.google.com/g" + + "o/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035G" + + "oogle.Cloud.Dialogflow.Cx.V3\352\002!Google::C" + + "loud::Dialogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -106,6 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GenerativeSafetySettings", "KnowledgeConnectorSettings", "LanguageCode", + "LlmModelSettings", }); internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor @@ -142,6 +148,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AgentScope", "DisableDataStoreFallback", }); + internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_descriptor, + new java.lang.String[] { + "Model", "PromptText", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ResourceProto.resource); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Generator.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Generator.java index 93c17db21e99..479888fb9e46 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Generator.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Generator.java @@ -2387,6 +2387,60 @@ public com.google.cloud.dialogflow.cx.v3.Generator.PlaceholderOrBuilder getPlace return placeholders_.get(index); } + public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 9; + private com.google.cloud.dialogflow.cx.v3.LlmModelSettings llmModelSettings_; + + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * + * @return Whether the llmModelSettings field is set. + */ + @java.lang.Override + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * + * @return The llmModelSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + public static final int MODEL_PARAMETER_FIELD_NUMBER = 8; private com.google.cloud.dialogflow.cx.v3.Generator.ModelParameter modelParameter_; @@ -2403,7 +2457,7 @@ public com.google.cloud.dialogflow.cx.v3.Generator.PlaceholderOrBuilder getPlace */ @java.lang.Override public boolean hasModelParameter() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** @@ -2467,9 +2521,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < placeholders_.size(); i++) { output.writeMessage(5, placeholders_.get(i)); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(8, getModelParameter()); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getLlmModelSettings()); + } getUnknownFields().writeTo(output); } @@ -2491,9 +2548,12 @@ public int getSerializedSize() { for (int i = 0; i < placeholders_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, placeholders_.get(i)); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getModelParameter()); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLlmModelSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2517,6 +2577,10 @@ public boolean equals(final java.lang.Object obj) { if (!getPromptText().equals(other.getPromptText())) return false; } if (!getPlaceholdersList().equals(other.getPlaceholdersList())) return false; + if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false; + if (hasLlmModelSettings()) { + if (!getLlmModelSettings().equals(other.getLlmModelSettings())) return false; + } if (hasModelParameter() != other.hasModelParameter()) return false; if (hasModelParameter()) { if (!getModelParameter().equals(other.getModelParameter())) return false; @@ -2544,6 +2608,10 @@ public int hashCode() { hash = (37 * hash) + PLACEHOLDERS_FIELD_NUMBER; hash = (53 * hash) + getPlaceholdersList().hashCode(); } + if (hasLlmModelSettings()) { + hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLlmModelSettings().hashCode(); + } if (hasModelParameter()) { hash = (37 * hash) + MODEL_PARAMETER_FIELD_NUMBER; hash = (53 * hash) + getModelParameter().hashCode(); @@ -2694,6 +2762,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getPromptTextFieldBuilder(); getPlaceholdersFieldBuilder(); + getLlmModelSettingsFieldBuilder(); getModelParameterFieldBuilder(); } } @@ -2716,6 +2785,11 @@ public Builder clear() { placeholdersBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } modelParameter_ = null; if (modelParameterBuilder_ != null) { modelParameterBuilder_.dispose(); @@ -2782,9 +2856,14 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Generator result) { to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000010) != 0)) { + result.llmModelSettings_ = + llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { result.modelParameter_ = modelParameterBuilder_ == null ? modelParameter_ : modelParameterBuilder_.build(); - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @@ -2874,6 +2953,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Generator other) { } } } + if (other.hasLlmModelSettings()) { + mergeLlmModelSettings(other.getLlmModelSettings()); + } if (other.hasModelParameter()) { mergeModelParameter(other.getModelParameter()); } @@ -2938,9 +3020,16 @@ public Builder mergeFrom( case 66: { input.readMessage(getModelParameterFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 66 + case 74: + { + input.readMessage( + getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3851,6 +3940,203 @@ public com.google.cloud.dialogflow.cx.v3.Generator.Placeholder.Builder addPlaceh return placeholdersBuilder_; } + private com.google.cloud.dialogflow.cx.v3.LlmModelSettings llmModelSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder> + llmModelSettingsBuilder_; + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * + * @return Whether the llmModelSettings field is set. + */ + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * + * @return The llmModelSettings. + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings() { + if (llmModelSettingsBuilder_ == null) { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } else { + return llmModelSettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + public Builder setLlmModelSettings(com.google.cloud.dialogflow.cx.v3.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + llmModelSettings_ = value; + } else { + llmModelSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder builderForValue) { + if (llmModelSettingsBuilder_ == null) { + llmModelSettings_ = builderForValue.build(); + } else { + llmModelSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + public Builder mergeLlmModelSettings(com.google.cloud.dialogflow.cx.v3.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && llmModelSettings_ != null + && llmModelSettings_ + != com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance()) { + getLlmModelSettingsBuilder().mergeFrom(value); + } else { + llmModelSettings_ = value; + } + } else { + llmModelSettingsBuilder_.mergeFrom(value); + } + if (llmModelSettings_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + public Builder clearLlmModelSettings() { + bitField0_ = (bitField0_ & ~0x00000010); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder getLlmModelSettingsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLlmModelSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + if (llmModelSettingsBuilder_ != null) { + return llmModelSettingsBuilder_.getMessageOrBuilder(); + } else { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + } + + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder> + getLlmModelSettingsFieldBuilder() { + if (llmModelSettingsBuilder_ == null) { + llmModelSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder>( + getLlmModelSettings(), getParentForChildren(), isClean()); + llmModelSettings_ = null; + } + return llmModelSettingsBuilder_; + } + private com.google.cloud.dialogflow.cx.v3.Generator.ModelParameter modelParameter_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.Generator.ModelParameter, @@ -3870,7 +4156,7 @@ public com.google.cloud.dialogflow.cx.v3.Generator.Placeholder.Builder addPlaceh * @return Whether the modelParameter field is set. */ public boolean hasModelParameter() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** @@ -3913,7 +4199,7 @@ public Builder setModelParameter( } else { modelParameterBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3934,7 +4220,7 @@ public Builder setModelParameter( } else { modelParameterBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3951,7 +4237,7 @@ public Builder setModelParameter( public Builder mergeModelParameter( com.google.cloud.dialogflow.cx.v3.Generator.ModelParameter value) { if (modelParameterBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && modelParameter_ != null && modelParameter_ != com.google.cloud.dialogflow.cx.v3.Generator.ModelParameter @@ -3964,7 +4250,7 @@ public Builder mergeModelParameter( modelParameterBuilder_.mergeFrom(value); } if (modelParameter_ != null) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } return this; @@ -3980,7 +4266,7 @@ public Builder mergeModelParameter( * .google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8; */ public Builder clearModelParameter() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); modelParameter_ = null; if (modelParameterBuilder_ != null) { modelParameterBuilder_.dispose(); @@ -4001,7 +4287,7 @@ public Builder clearModelParameter() { */ public com.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.Builder getModelParameterBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getModelParameterFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GeneratorOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GeneratorOrBuilder.java index c497a39eda77..153c67347124 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GeneratorOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GeneratorOrBuilder.java @@ -202,6 +202,43 @@ public interface GeneratorOrBuilder com.google.cloud.dialogflow.cx.v3.Generator.PlaceholderOrBuilder getPlaceholdersOrBuilder( int index); + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * + * @return Whether the llmModelSettings field is set. + */ + boolean hasLlmModelSettings(); + + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + * + * @return The llmModelSettings. + */ + com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings(); + + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 9; + */ + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GeneratorProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GeneratorProto.java index b28cdc8f4d64..bc51d4c0989f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GeneratorProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GeneratorProto.java @@ -82,17 +82,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "r.proto\022\035google.cloud.dialogflow.cx.v3\032\034" + "google/api/annotations.proto\032\027google/api" + "/client.proto\032\037google/api/field_behavior" - + ".proto\032\031google/api/resource.proto\032\033google/protobuf/empty.proto\032" - + " google/protobuf/field_mask.proto\"\347\004\n" + + ".proto\032\031google/api/resource.proto\0327googl" + + "e/cloud/dialogflow/cx/v3/generative_sett" + + "ings.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\"\264\005\n" + "\tGenerator\022\014\n" + "\004name\030\001 \001(\t\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022?\n" + "\013prompt_text\030\003" + " \001(\0132%.google.cloud.dialogflow.cx.v3.PhraseB\003\340A\002\022O\n" - + "\014placeholders\030\005 \003(\01324" - + ".google.cloud.dialogflow.cx.v3.Generator.PlaceholderB\003\340A\001\022P\n" - + "\017model_parameter\030\010 \001" - + "(\01327.google.cloud.dialogflow.cx.v3.Generator.ModelParameter\032\'\n" + + "\014placeholders\030\005" + + " \003(\01324.google.cloud.dialogflow.cx.v3.Generator.PlaceholderB\003\340A\001\022K\n" + + "\022llm_model_settings\030\t" + + " \001(\0132/.google.cloud.dialogflow.cx.v3.LlmModelSettings\022P\n" + + "\017model_parameter\030\010" + + " \001(\01327.google.cloud.dialogflow.cx.v3.Generator.ModelParameter\032\'\n" + "\013Placeholder\022\n\n" + "\002id\030\001 \001(\t\022\014\n" + "\004name\030\002 \001(\t\032\252\001\n" @@ -105,13 +109,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021_max_decode_stepsB\010\n" + "\006_top_pB\010\n" + "\006_top_k:w\352At\n" - + "#dialogflow.googleapis.com/Generator\022Mpro" - + "jects/{project}/locations/{location}/agents/{agent}/generators/{generator}\"\033\n" + + "#dialogflow.googleapis.com/Generator\022Mprojects/{project}/locations/" + + "{location}/agents/{agent}/generators/{generator}\"\033\n" + "\006Phrase\022\021\n" + "\004text\030\001 \001(\tB\003\340A\002\"\222\001\n" + "\025ListGeneratorsRequest\022;\n" - + "\006parent\030\001 \001(" - + "\tB+\340A\002\372A%\022#dialogflow.googleapis.com/Generator\022\025\n\r" + + "\006parent\030\001 \001(\tB" + + "+\340A\002\372A%\022#dialogflow.googleapis.com/Generator\022\025\n\r" + "language_code\030\002 \001(\t\022\021\n" + "\tpage_size\030\003 \001(\005\022\022\n\n" + "page_token\030\004 \001(\t\"o\n" @@ -123,10 +127,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "#dialogflow.googleapis.com/Generator\022\025\n\r" + "language_code\030\002 \001(\t\"\256\001\n" + "\026CreateGeneratorRequest\022;\n" - + "\006parent\030\001 \001(\tB+\340A\002\372A" - + "%\022#dialogflow.googleapis.com/Generator\022@\n" - + "\tgenerator\030\002" - + " \001(\0132(.google.cloud.dialogflow.cx.v3.GeneratorB\003\340A\002\022\025\n\r" + + "\006parent\030\001 \001(" + + "\tB+\340A\002\372A%\022#dialogflow.googleapis.com/Generator\022@\n" + + "\tgenerator\030\002 \001(\0132(.google" + + ".cloud.dialogflow.cx.v3.GeneratorB\003\340A\002\022\025\n\r" + "language_code\030\003 \001(\t\"\242\001\n" + "\026UpdateGeneratorRequest\022@\n" + "\tgenerator\030\001" @@ -138,32 +142,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "#dialogflow.googleapis.com/Generator\022\r\n" + "\005force\030\002 \001(\0102\351\010\n\n" + "Generators\022\307\001\n" - + "\016ListGenerators\0224.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest" - + "\0325.google.cloud.dialogflow.cx.v3.ListGen" - + "eratorsResponse\"H\332A\006parent\202\323\344\223\0029\0227/v3/{p" - + "arent=projects/*/locations/*/agents/*}/generators\022\264\001\n" - + "\014GetGenerator\0222.google.cloud.dialogflow.cx.v3.GetGeneratorRequest\032(" - + ".google.cloud.dialogflow.cx.v3.Generator" - + "\"F\332A\004name\202\323\344\223\0029\0227/v3/{name=projects/*/locations/*/agents/*/generators/*}\022\321\001\n" - + "\017CreateGenerator\0225.google.cloud.dialogflow.c" - + "x.v3.CreateGeneratorRequest\032(.google.clo" - + "ud.dialogflow.cx.v3.Generator\"]\332A\020parent" - + ",generator\202\323\344\223\002D\"7/v3/{parent=projects/*/locations/*/agents/*}/generators:" - + "\tgenerator\022\340\001\n" - + "\017UpdateGenerator\0225.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest\032" - + "(.google.cloud.dialogflow.cx.v3.Generato" - + "r\"l\332A\025generator,update_mask\202\323\344\223\002N2A/v3/{" - + "generator.name=projects/*/locations/*/agents/*/generators/*}:\tgenerator\022\250\001\n" - + "\017DeleteGenerator\0225.google.cloud.dialogflow.cx" - + ".v3.DeleteGeneratorRequest\032\026.google.prot" - + "obuf.Empty\"F\332A\004name\202\323\344\223\0029*7/v3/{name=pro" - + "jects/*/locations/*/agents/*/generators/" - + "*}\032x\312A\031dialogflow.googleapis.com\322AYhttps" - + "://www.googleapis.com/auth/cloud-platfor" - + "m,https://www.googleapis.com/auth/dialogflowB\261\001\n" - + "!com.google.cloud.dialogflow.cx.v3B\016GeneratorProtoP\001Z1cloud.google.com/g" - + "o/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035G" - + "oogle.Cloud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3b\006proto3" + + "\016ListGenerators\0224.google.cloud.dialogflow.cx.v3.ListGen" + + "eratorsRequest\0325.google.cloud.dialogflow" + + ".cx.v3.ListGeneratorsResponse\"H\332A\006parent" + + "\202\323\344\223\0029\0227/v3/{parent=projects/*/locations/*/agents/*}/generators\022\264\001\n" + + "\014GetGenerator\0222.google.cloud.dialogflow.cx.v3.GetGene" + + "ratorRequest\032(.google.cloud.dialogflow.c" + + "x.v3.Generator\"F\332A\004name\202\323\344\223\0029\0227/v3/{name" + + "=projects/*/locations/*/agents/*/generators/*}\022\321\001\n" + + "\017CreateGenerator\0225.google.cloud.dialogflow.cx.v3.CreateGeneratorReques" + + "t\032(.google.cloud.dialogflow.cx.v3.Genera" + + "tor\"]\332A\020parent,generator\202\323\344\223\002D\"7/v3/{par" + + "ent=projects/*/locations/*/agents/*}/generators:\tgenerator\022\340\001\n" + + "\017UpdateGenerator\0225.google.cloud.dialogflow.cx.v3.UpdateGen" + + "eratorRequest\032(.google.cloud.dialogflow." + + "cx.v3.Generator\"l\332A\025generator,update_mas" + + "k\202\323\344\223\002N2A/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}:" + + "\tgenerator\022\250\001\n" + + "\017DeleteGenerator\0225.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest" + + "\032\026.google.protobuf.Empty\"F\332A\004name\202\323\344\223\0029*" + + "7/v3/{name=projects/*/locations/*/agents" + + "/*/generators/*}\032x\312A\031dialogflow.googleap" + + "is.com\322AYhttps://www.googleapis.com/auth" + + "/cloud-platform,https://www.googleapis.com/auth/dialogflowB\261\001\n" + + "!com.google.cloud.dialogflow.cx.v3B\016GeneratorProtoP\001Z1clou" + + "d.google.com/go/dialogflow/cx/apiv3/cxpb" + + ";cxpb\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx." + + "V3\352\002!Google::Cloud::Dialogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -173,6 +178,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.v3.GenerativeSettingsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), }); @@ -182,7 +188,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_Generator_descriptor, new java.lang.String[] { - "Name", "DisplayName", "PromptText", "Placeholders", "ModelParameter", + "Name", + "DisplayName", + "PromptText", + "Placeholders", + "LlmModelSettings", + "ModelParameter", }); internal_static_google_cloud_dialogflow_cx_v3_Generator_Placeholder_descriptor = internal_static_google_cloud_dialogflow_cx_v3_Generator_descriptor.getNestedTypes().get(0); @@ -271,6 +282,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.v3.GenerativeSettingsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExampleRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExampleRequest.java new file mode 100644 index 000000000000..fb1afc332351 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExampleRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Examples.GetExample][google.cloud.dialogflow.cx.v3.Examples.GetExample].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetExampleRequest} + */ +public final class GetExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetExampleRequest) + GetExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetExampleRequest.newBuilder() to construct. + private GetExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetExampleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetExampleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetExampleRequest.class, + com.google.cloud.dialogflow.cx.v3.GetExampleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the example.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the example.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.GetExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetExampleRequest other = + (com.google.cloud.dialogflow.cx.v3.GetExampleRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExampleRequest 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.v3.GetExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExampleRequest 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.v3.GetExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExampleRequest 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.v3.GetExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExampleRequest 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.v3.GetExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExampleRequest 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.v3.GetExampleRequest 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.v3.GetExampleRequest 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.v3.GetExampleRequest 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
+   * [Examples.GetExample][google.cloud.dialogflow.cx.v3.Examples.GetExample].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetExampleRequest) + com.google.cloud.dialogflow.cx.v3.GetExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetExampleRequest.class, + com.google.cloud.dialogflow.cx.v3.GetExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GetExampleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_GetExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetExampleRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetExampleRequest build() { + com.google.cloud.dialogflow.cx.v3.GetExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetExampleRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetExampleRequest result = + new com.google.cloud.dialogflow.cx.v3.GetExampleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.GetExampleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.GetExampleRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetExampleRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.GetExampleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the example.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.GetExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetExampleRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetExampleRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetExampleRequest 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.v3.GetExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExampleRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExampleRequestOrBuilder.java new file mode 100644 index 000000000000..4efb1b7d1de0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetExampleRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface GetExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the example.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the example.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookRequest.java new file mode 100644 index 000000000000..ea0e81bb8c7a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.GetPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetPlaybookRequest} + */ +public final class GetPlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetPlaybookRequest) + GetPlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetPlaybookRequest.newBuilder() to construct. + private GetPlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPlaybookRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.GetPlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest 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.v3.GetPlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest 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.v3.GetPlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest 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.v3.GetPlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest 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.v3.GetPlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest 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.v3.GetPlaybookRequest 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.v3.GetPlaybookRequest 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.v3.GetPlaybookRequest 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
+   * [Playbooks.GetPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetPlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetPlaybookRequest) + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.GetPlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.GetPlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetPlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPlaybookRequest 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.v3.GetPlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..a87f562a8b01 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface GetPlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetPlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookVersionRequest.java new file mode 100644 index 000000000000..3e24a0f8a6c2 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookVersionRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.GetPlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest} + */ +public final class GetPlaybookVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest) + GetPlaybookVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetPlaybookVersionRequest.newBuilder() to construct. + private GetPlaybookVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPlaybookVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPlaybookVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.GetPlaybookVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest other = + (com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest 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.v3.GetPlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest 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.v3.GetPlaybookVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest 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.v3.GetPlaybookVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest 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.v3.GetPlaybookVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest 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.v3.GetPlaybookVersionRequest 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.v3.GetPlaybookVersionRequest 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.v3.GetPlaybookVersionRequest 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
+   * [Playbooks.GetPlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest) + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest build() { + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest result = + new com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.GetPlaybookVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.GetPlaybookVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPlaybookVersionRequest 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.v3.GetPlaybookVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookVersionRequestOrBuilder.java new file mode 100644 index 000000000000..ffab0f167bca --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetPlaybookVersionRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface GetPlaybookVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolRequest.java new file mode 100644 index 000000000000..dbfcc564e185 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.GetTool][google.cloud.dialogflow.cx.v3.Tools.GetTool].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetToolRequest} + */ +public final class GetToolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetToolRequest) + GetToolRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetToolRequest.newBuilder() to construct. + private GetToolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetToolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetToolRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetToolRequest.class, + com.google.cloud.dialogflow.cx.v3.GetToolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Tool.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the Tool.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.GetToolRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetToolRequest other = + (com.google.cloud.dialogflow.cx.v3.GetToolRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolRequest 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.v3.GetToolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolRequest 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.v3.GetToolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolRequest 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.v3.GetToolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolRequest 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.v3.GetToolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolRequest 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.v3.GetToolRequest 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.v3.GetToolRequest 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.v3.GetToolRequest 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
+   * [Tools.GetTool][google.cloud.dialogflow.cx.v3.Tools.GetTool].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetToolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetToolRequest) + com.google.cloud.dialogflow.cx.v3.GetToolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetToolRequest.class, + com.google.cloud.dialogflow.cx.v3.GetToolRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GetToolRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetToolRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetToolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetToolRequest build() { + com.google.cloud.dialogflow.cx.v3.GetToolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetToolRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetToolRequest result = + new com.google.cloud.dialogflow.cx.v3.GetToolRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.GetToolRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.GetToolRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetToolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetToolRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.GetToolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.GetToolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetToolRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetToolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetToolRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetToolRequest 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.v3.GetToolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolRequestOrBuilder.java new file mode 100644 index 000000000000..f000991e614c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface GetToolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetToolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Tool.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Tool.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolVersionRequest.java new file mode 100644 index 000000000000..9b8bd958e867 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolVersionRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.GetToolVersion][google.cloud.dialogflow.cx.v3.Tools.GetToolVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetToolVersionRequest} + */ +public final class GetToolVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GetToolVersionRequest) + GetToolVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetToolVersionRequest.newBuilder() to construct. + private GetToolVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetToolVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetToolVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the tool version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the tool version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.GetToolVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest other = + (com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest 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.v3.GetToolVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest 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.v3.GetToolVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest 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.v3.GetToolVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest 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.v3.GetToolVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest 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.v3.GetToolVersionRequest 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.v3.GetToolVersionRequest 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.v3.GetToolVersionRequest 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
+   * [Tools.GetToolVersion][google.cloud.dialogflow.cx.v3.Tools.GetToolVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.GetToolVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GetToolVersionRequest) + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest build() { + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest result = + new com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.GetToolVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.GetToolVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.GetToolVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetToolVersionRequest 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.v3.GetToolVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolVersionRequestOrBuilder.java new file mode 100644 index 000000000000..3cdfe129c9a9 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetToolVersionRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface GetToolVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetToolVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tool version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the tool version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Handler.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Handler.java new file mode 100644 index 000000000000..4f1c392fe64b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Handler.java @@ -0,0 +1,3656 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Handler can be used to define custom logic to be executed based on the
+ * user-specified triggers.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Handler} + */ +public final class Handler extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Handler) + HandlerOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Handler.newBuilder() to construct. + private Handler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Handler() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Handler(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Handler.class, + com.google.cloud.dialogflow.cx.v3.Handler.Builder.class); + } + + public interface EventHandlerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Handler.EventHandler) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the event that triggers this handler.
+     * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The event. + */ + java.lang.String getEvent(); + + /** + * + * + *
+     * Required. The name of the event that triggers this handler.
+     * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for event. + */ + com.google.protobuf.ByteString getEventBytes(); + + /** + * + * + *
+     * Optional. The condition that must be satisfied to trigger this handler.
+     * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + java.lang.String getCondition(); + + /** + * + * + *
+     * Optional. The condition that must be satisfied to trigger this handler.
+     * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + com.google.protobuf.ByteString getConditionBytes(); + + /** + * + * + *
+     * Required. The fulfillment to call when the event occurs.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillment field is set. + */ + boolean hasFulfillment(); + + /** + * + * + *
+     * Required. The fulfillment to call when the event occurs.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillment. + */ + com.google.cloud.dialogflow.cx.v3.Fulfillment getFulfillment(); + + /** + * + * + *
+     * Required. The fulfillment to call when the event occurs.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getFulfillmentOrBuilder(); + } + + /** + * + * + *
+   * A handler that is triggered by the specified
+   * [event][google.cloud.dialogflow.cx.v3.Handler.EventHandler.event].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Handler.EventHandler} + */ + public static final class EventHandler extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Handler.EventHandler) + EventHandlerOrBuilder { + private static final long serialVersionUID = 0L; + + // Use EventHandler.newBuilder() to construct. + private EventHandler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EventHandler() { + event_ = ""; + condition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EventHandler(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.class, + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.Builder.class); + } + + private int bitField0_; + public static final int EVENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object event_ = ""; + + /** + * + * + *
+     * Required. The name of the event that triggers this handler.
+     * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The event. + */ + @java.lang.Override + public java.lang.String getEvent() { + java.lang.Object ref = event_; + 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(); + event_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The name of the event that triggers this handler.
+     * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for event. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object condition_ = ""; + + /** + * + * + *
+     * Optional. The condition that must be satisfied to trigger this handler.
+     * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + 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(); + condition_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The condition that must be satisfied to trigger this handler.
+     * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULFILLMENT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.Fulfillment fulfillment_; + + /** + * + * + *
+     * Required. The fulfillment to call when the event occurs.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillment field is set. + */ + @java.lang.Override + public boolean hasFulfillment() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The fulfillment to call when the event occurs.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Fulfillment getFulfillment() { + return fulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : fulfillment_; + } + + /** + * + * + *
+     * Required. The fulfillment to call when the event occurs.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getFulfillmentOrBuilder() { + return fulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : fulfillment_; + } + + 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(event_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, event_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getFulfillment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, condition_); + } + 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(event_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, event_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFulfillment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, condition_); + } + 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.v3.Handler.EventHandler)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler other = + (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) obj; + + if (!getEvent().equals(other.getEvent())) return false; + if (!getCondition().equals(other.getCondition())) return false; + if (hasFulfillment() != other.hasFulfillment()) return false; + if (hasFulfillment()) { + if (!getFulfillment().equals(other.getFulfillment())) 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) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + if (hasFulfillment()) { + hash = (37 * hash) + FULFILLMENT_FIELD_NUMBER; + hash = (53 * hash) + getFulfillment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.EventHandler parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.EventHandler 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.v3.Handler.EventHandler parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.EventHandler 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.v3.Handler.EventHandler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.EventHandler 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.v3.Handler.EventHandler parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.EventHandler 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.v3.Handler.EventHandler parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.EventHandler 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.v3.Handler.EventHandler 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.v3.Handler.EventHandler 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.v3.Handler.EventHandler 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; + } + + /** + * + * + *
+     * A handler that is triggered by the specified
+     * [event][google.cloud.dialogflow.cx.v3.Handler.EventHandler.event].
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Handler.EventHandler} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Handler.EventHandler) + com.google.cloud.dialogflow.cx.v3.Handler.EventHandlerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.class, + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFulfillmentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + event_ = ""; + condition_ = ""; + fulfillment_ = null; + if (fulfillmentBuilder_ != null) { + fulfillmentBuilder_.dispose(); + fulfillmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.EventHandler getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.EventHandler build() { + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.EventHandler buildPartial() { + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler result = + new com.google.cloud.dialogflow.cx.v3.Handler.EventHandler(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Handler.EventHandler result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = event_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.condition_ = condition_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fulfillment_ = + fulfillmentBuilder_ == null ? fulfillment_ : fulfillmentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.Handler.EventHandler) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Handler.EventHandler other) { + if (other == com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance()) + return this; + if (!other.getEvent().isEmpty()) { + event_ = other.event_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasFulfillment()) { + mergeFulfillment(other.getFulfillment()); + } + 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: + { + event_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getFulfillmentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + condition_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 java.lang.Object event_ = ""; + + /** + * + * + *
+       * Required. The name of the event that triggers this handler.
+       * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The event. + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The name of the event that triggers this handler.
+       * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for event. + */ + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The name of the event that triggers this handler.
+       * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the event that triggers this handler.
+       * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEvent() { + event_ = getDefaultInstance().getEvent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the event that triggers this handler.
+       * 
+ * + * string event = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for event to set. + * @return This builder for chaining. + */ + public Builder setEventBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + event_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object condition_ = ""; + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + condition_ = getDefaultInstance().getCondition(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + condition_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Fulfillment fulfillment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder> + fulfillmentBuilder_; + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillment field is set. + */ + public boolean hasFulfillment() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillment. + */ + public com.google.cloud.dialogflow.cx.v3.Fulfillment getFulfillment() { + if (fulfillmentBuilder_ == null) { + return fulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : fulfillment_; + } else { + return fulfillmentBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment value) { + if (fulfillmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fulfillment_ = value; + } else { + fulfillmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFulfillment( + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder builderForValue) { + if (fulfillmentBuilder_ == null) { + fulfillment_ = builderForValue.build(); + } else { + fulfillmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment value) { + if (fulfillmentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && fulfillment_ != null + && fulfillment_ + != com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance()) { + getFulfillmentBuilder().mergeFrom(value); + } else { + fulfillment_ = value; + } + } else { + fulfillmentBuilder_.mergeFrom(value); + } + if (fulfillment_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFulfillment() { + bitField0_ = (bitField0_ & ~0x00000004); + fulfillment_ = null; + if (fulfillmentBuilder_ != null) { + fulfillmentBuilder_.dispose(); + fulfillmentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder getFulfillmentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFulfillmentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getFulfillmentOrBuilder() { + if (fulfillmentBuilder_ != null) { + return fulfillmentBuilder_.getMessageOrBuilder(); + } else { + return fulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : fulfillment_; + } + } + + /** + * + * + *
+       * Required. The fulfillment to call when the event occurs.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder> + getFulfillmentFieldBuilder() { + if (fulfillmentBuilder_ == null) { + fulfillmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder>( + getFulfillment(), getParentForChildren(), isClean()); + fulfillment_ = null; + } + return fulfillmentBuilder_; + } + + @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.v3.Handler.EventHandler) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Handler.EventHandler) + private static final com.google.cloud.dialogflow.cx.v3.Handler.EventHandler DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Handler.EventHandler(); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.EventHandler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EventHandler 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.v3.Handler.EventHandler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LifecycleHandlerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the lifecycle stage that triggers this handler.
+     * Supported values:
+     * * `playbook-start`
+     * * `pre-action-selection`
+     * * `pre-action-execution`
+     * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lifecycleStage. + */ + java.lang.String getLifecycleStage(); + + /** + * + * + *
+     * Required. The name of the lifecycle stage that triggers this handler.
+     * Supported values:
+     * * `playbook-start`
+     * * `pre-action-selection`
+     * * `pre-action-execution`
+     * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lifecycleStage. + */ + com.google.protobuf.ByteString getLifecycleStageBytes(); + + /** + * + * + *
+     * Optional. The condition that must be satisfied to trigger this handler.
+     * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + java.lang.String getCondition(); + + /** + * + * + *
+     * Optional. The condition that must be satisfied to trigger this handler.
+     * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + com.google.protobuf.ByteString getConditionBytes(); + + /** + * + * + *
+     * Required. The fulfillment to call when this handler is triggered.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillment field is set. + */ + boolean hasFulfillment(); + + /** + * + * + *
+     * Required. The fulfillment to call when this handler is triggered.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillment. + */ + com.google.cloud.dialogflow.cx.v3.Fulfillment getFulfillment(); + + /** + * + * + *
+     * Required. The fulfillment to call when this handler is triggered.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getFulfillmentOrBuilder(); + } + + /** + * + * + *
+   * A handler that is triggered on the specific
+   * [lifecycle_stage][google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.lifecycle_stage]
+   * of the playbook execution.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler} + */ + public static final class LifecycleHandler extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) + LifecycleHandlerOrBuilder { + private static final long serialVersionUID = 0L; + + // Use LifecycleHandler.newBuilder() to construct. + private LifecycleHandler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LifecycleHandler() { + lifecycleStage_ = ""; + condition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LifecycleHandler(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.class, + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.Builder.class); + } + + private int bitField0_; + public static final int LIFECYCLE_STAGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object lifecycleStage_ = ""; + + /** + * + * + *
+     * Required. The name of the lifecycle stage that triggers this handler.
+     * Supported values:
+     * * `playbook-start`
+     * * `pre-action-selection`
+     * * `pre-action-execution`
+     * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lifecycleStage. + */ + @java.lang.Override + public java.lang.String getLifecycleStage() { + java.lang.Object ref = lifecycleStage_; + 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(); + lifecycleStage_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The name of the lifecycle stage that triggers this handler.
+     * Supported values:
+     * * `playbook-start`
+     * * `pre-action-selection`
+     * * `pre-action-execution`
+     * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lifecycleStage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLifecycleStageBytes() { + java.lang.Object ref = lifecycleStage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lifecycleStage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object condition_ = ""; + + /** + * + * + *
+     * Optional. The condition that must be satisfied to trigger this handler.
+     * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + 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(); + condition_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The condition that must be satisfied to trigger this handler.
+     * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULFILLMENT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.Fulfillment fulfillment_; + + /** + * + * + *
+     * Required. The fulfillment to call when this handler is triggered.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillment field is set. + */ + @java.lang.Override + public boolean hasFulfillment() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The fulfillment to call when this handler is triggered.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Fulfillment getFulfillment() { + return fulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : fulfillment_; + } + + /** + * + * + *
+     * Required. The fulfillment to call when this handler is triggered.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getFulfillmentOrBuilder() { + return fulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : fulfillment_; + } + + 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(lifecycleStage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, lifecycleStage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, condition_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getFulfillment()); + } + 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(lifecycleStage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, lifecycleStage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, condition_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFulfillment()); + } + 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.v3.Handler.LifecycleHandler)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler other = + (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) obj; + + if (!getLifecycleStage().equals(other.getLifecycleStage())) return false; + if (!getCondition().equals(other.getCondition())) return false; + if (hasFulfillment() != other.hasFulfillment()) return false; + if (hasFulfillment()) { + if (!getFulfillment().equals(other.getFulfillment())) 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) + LIFECYCLE_STAGE_FIELD_NUMBER; + hash = (53 * hash) + getLifecycleStage().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + if (hasFulfillment()) { + hash = (37 * hash) + FULFILLMENT_FIELD_NUMBER; + hash = (53 * hash) + getFulfillment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler 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.v3.Handler.LifecycleHandler parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler 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.v3.Handler.LifecycleHandler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler 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.v3.Handler.LifecycleHandler parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler 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.v3.Handler.LifecycleHandler parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler 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.v3.Handler.LifecycleHandler 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.v3.Handler.LifecycleHandler 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.v3.Handler.LifecycleHandler 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; + } + + /** + * + * + *
+     * A handler that is triggered on the specific
+     * [lifecycle_stage][google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.lifecycle_stage]
+     * of the playbook execution.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandlerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.class, + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFulfillmentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lifecycleStage_ = ""; + condition_ = ""; + fulfillment_ = null; + if (fulfillmentBuilder_ != null) { + fulfillmentBuilder_.dispose(); + fulfillmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler build() { + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler buildPartial() { + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler result = + new com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lifecycleStage_ = lifecycleStage_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.condition_ = condition_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fulfillment_ = + fulfillmentBuilder_ == null ? fulfillment_ : fulfillmentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.Handler.LifecycleHandler) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.getDefaultInstance()) + return this; + if (!other.getLifecycleStage().isEmpty()) { + lifecycleStage_ = other.lifecycleStage_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasFulfillment()) { + mergeFulfillment(other.getFulfillment()); + } + 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: + { + lifecycleStage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + condition_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getFulfillmentFieldBuilder().getBuilder(), extensionRegistry); + 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 java.lang.Object lifecycleStage_ = ""; + + /** + * + * + *
+       * Required. The name of the lifecycle stage that triggers this handler.
+       * Supported values:
+       * * `playbook-start`
+       * * `pre-action-selection`
+       * * `pre-action-execution`
+       * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lifecycleStage. + */ + public java.lang.String getLifecycleStage() { + java.lang.Object ref = lifecycleStage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lifecycleStage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The name of the lifecycle stage that triggers this handler.
+       * Supported values:
+       * * `playbook-start`
+       * * `pre-action-selection`
+       * * `pre-action-execution`
+       * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lifecycleStage. + */ + public com.google.protobuf.ByteString getLifecycleStageBytes() { + java.lang.Object ref = lifecycleStage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lifecycleStage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The name of the lifecycle stage that triggers this handler.
+       * Supported values:
+       * * `playbook-start`
+       * * `pre-action-selection`
+       * * `pre-action-execution`
+       * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The lifecycleStage to set. + * @return This builder for chaining. + */ + public Builder setLifecycleStage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lifecycleStage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the lifecycle stage that triggers this handler.
+       * Supported values:
+       * * `playbook-start`
+       * * `pre-action-selection`
+       * * `pre-action-execution`
+       * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLifecycleStage() { + lifecycleStage_ = getDefaultInstance().getLifecycleStage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the lifecycle stage that triggers this handler.
+       * Supported values:
+       * * `playbook-start`
+       * * `pre-action-selection`
+       * * `pre-action-execution`
+       * 
+ * + * string lifecycle_stage = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for lifecycleStage to set. + * @return This builder for chaining. + */ + public Builder setLifecycleStageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lifecycleStage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object condition_ = ""; + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + condition_ = getDefaultInstance().getCondition(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The condition that must be satisfied to trigger this handler.
+       * 
+ * + * string condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + condition_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Fulfillment fulfillment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder> + fulfillmentBuilder_; + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillment field is set. + */ + public boolean hasFulfillment() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillment. + */ + public com.google.cloud.dialogflow.cx.v3.Fulfillment getFulfillment() { + if (fulfillmentBuilder_ == null) { + return fulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : fulfillment_; + } else { + return fulfillmentBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment value) { + if (fulfillmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fulfillment_ = value; + } else { + fulfillmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFulfillment( + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder builderForValue) { + if (fulfillmentBuilder_ == null) { + fulfillment_ = builderForValue.build(); + } else { + fulfillmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment value) { + if (fulfillmentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && fulfillment_ != null + && fulfillment_ + != com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance()) { + getFulfillmentBuilder().mergeFrom(value); + } else { + fulfillment_ = value; + } + } else { + fulfillmentBuilder_.mergeFrom(value); + } + if (fulfillment_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFulfillment() { + bitField0_ = (bitField0_ & ~0x00000004); + fulfillment_ = null; + if (fulfillmentBuilder_ != null) { + fulfillmentBuilder_.dispose(); + fulfillmentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder getFulfillmentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFulfillmentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getFulfillmentOrBuilder() { + if (fulfillmentBuilder_ != null) { + return fulfillmentBuilder_.getMessageOrBuilder(); + } else { + return fulfillment_ == null + ? com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance() + : fulfillment_; + } + } + + /** + * + * + *
+       * Required. The fulfillment to call when this handler is triggered.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Fulfillment fulfillment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder> + getFulfillmentFieldBuilder() { + if (fulfillmentBuilder_ == null) { + fulfillmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Fulfillment, + com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder, + com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder>( + getFulfillment(), getParentForChildren(), isClean()); + fulfillment_ = null; + } + return fulfillmentBuilder_; + } + + @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.v3.Handler.LifecycleHandler) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) + private static final com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler(); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LifecycleHandler 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.v3.Handler.LifecycleHandler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int handlerCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object handler_; + + public enum HandlerCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EVENT_HANDLER(1), + LIFECYCLE_HANDLER(3), + HANDLER_NOT_SET(0); + private final int value; + + private HandlerCase(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 HandlerCase valueOf(int value) { + return forNumber(value); + } + + public static HandlerCase forNumber(int value) { + switch (value) { + case 1: + return EVENT_HANDLER; + case 3: + return LIFECYCLE_HANDLER; + case 0: + return HANDLER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public HandlerCase getHandlerCase() { + return HandlerCase.forNumber(handlerCase_); + } + + public static final int EVENT_HANDLER_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A handler triggered by event.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + * + * @return Whether the eventHandler field is set. + */ + @java.lang.Override + public boolean hasEventHandler() { + return handlerCase_ == 1; + } + + /** + * + * + *
+   * A handler triggered by event.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + * + * @return The eventHandler. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.EventHandler getEventHandler() { + if (handlerCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) handler_; + } + return com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance(); + } + + /** + * + * + *
+   * A handler triggered by event.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.EventHandlerOrBuilder + getEventHandlerOrBuilder() { + if (handlerCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) handler_; + } + return com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance(); + } + + public static final int LIFECYCLE_HANDLER_FIELD_NUMBER = 3; + + /** + * + * + *
+   * A handler triggered during specific lifecycle of the playbook execution.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + * + * @return Whether the lifecycleHandler field is set. + */ + @java.lang.Override + public boolean hasLifecycleHandler() { + return handlerCase_ == 3; + } + + /** + * + * + *
+   * A handler triggered during specific lifecycle of the playbook execution.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + * + * @return The lifecycleHandler. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler getLifecycleHandler() { + if (handlerCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) handler_; + } + return com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.getDefaultInstance(); + } + + /** + * + * + *
+   * A handler triggered during specific lifecycle of the playbook execution.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandlerOrBuilder + getLifecycleHandlerOrBuilder() { + if (handlerCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) handler_; + } + return com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.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 (handlerCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) handler_); + } + if (handlerCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) handler_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (handlerCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) handler_); + } + if (handlerCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) handler_); + } + 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.v3.Handler)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Handler other = + (com.google.cloud.dialogflow.cx.v3.Handler) obj; + + if (!getHandlerCase().equals(other.getHandlerCase())) return false; + switch (handlerCase_) { + case 1: + if (!getEventHandler().equals(other.getEventHandler())) return false; + break; + case 3: + if (!getLifecycleHandler().equals(other.getLifecycleHandler())) 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 (handlerCase_) { + case 1: + hash = (37 * hash) + EVENT_HANDLER_FIELD_NUMBER; + hash = (53 * hash) + getEventHandler().hashCode(); + break; + case 3: + hash = (37 * hash) + LIFECYCLE_HANDLER_FIELD_NUMBER; + hash = (53 * hash) + getLifecycleHandler().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Handler parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler 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.v3.Handler parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler 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.v3.Handler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler 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.v3.Handler parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler 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.v3.Handler parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler 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.v3.Handler 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.v3.Handler 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.v3.Handler 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; + } + + /** + * + * + *
+   * Handler can be used to define custom logic to be executed based on the
+   * user-specified triggers.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Handler} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Handler) + com.google.cloud.dialogflow.cx.v3.HandlerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Handler.class, + com.google.cloud.dialogflow.cx.v3.Handler.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Handler.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (eventHandlerBuilder_ != null) { + eventHandlerBuilder_.clear(); + } + if (lifecycleHandlerBuilder_ != null) { + lifecycleHandlerBuilder_.clear(); + } + handlerCase_ = 0; + handler_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Handler_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Handler.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler build() { + com.google.cloud.dialogflow.cx.v3.Handler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler buildPartial() { + com.google.cloud.dialogflow.cx.v3.Handler result = + new com.google.cloud.dialogflow.cx.v3.Handler(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Handler result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.Handler result) { + result.handlerCase_ = handlerCase_; + result.handler_ = this.handler_; + if (handlerCase_ == 1 && eventHandlerBuilder_ != null) { + result.handler_ = eventHandlerBuilder_.build(); + } + if (handlerCase_ == 3 && lifecycleHandlerBuilder_ != null) { + result.handler_ = lifecycleHandlerBuilder_.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.v3.Handler) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Handler) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Handler other) { + if (other == com.google.cloud.dialogflow.cx.v3.Handler.getDefaultInstance()) return this; + switch (other.getHandlerCase()) { + case EVENT_HANDLER: + { + mergeEventHandler(other.getEventHandler()); + break; + } + case LIFECYCLE_HANDLER: + { + mergeLifecycleHandler(other.getLifecycleHandler()); + break; + } + case HANDLER_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: + { + input.readMessage(getEventHandlerFieldBuilder().getBuilder(), extensionRegistry); + handlerCase_ = 1; + break; + } // case 10 + case 26: + { + input.readMessage( + getLifecycleHandlerFieldBuilder().getBuilder(), extensionRegistry); + handlerCase_ = 3; + 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 handlerCase_ = 0; + private java.lang.Object handler_; + + public HandlerCase getHandlerCase() { + return HandlerCase.forNumber(handlerCase_); + } + + public Builder clearHandler() { + handlerCase_ = 0; + handler_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler, + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3.Handler.EventHandlerOrBuilder> + eventHandlerBuilder_; + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + * + * @return Whether the eventHandler field is set. + */ + @java.lang.Override + public boolean hasEventHandler() { + return handlerCase_ == 1; + } + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + * + * @return The eventHandler. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.EventHandler getEventHandler() { + if (eventHandlerBuilder_ == null) { + if (handlerCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) handler_; + } + return com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance(); + } else { + if (handlerCase_ == 1) { + return eventHandlerBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + public Builder setEventHandler(com.google.cloud.dialogflow.cx.v3.Handler.EventHandler value) { + if (eventHandlerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + handler_ = value; + onChanged(); + } else { + eventHandlerBuilder_.setMessage(value); + } + handlerCase_ = 1; + return this; + } + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + public Builder setEventHandler( + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.Builder builderForValue) { + if (eventHandlerBuilder_ == null) { + handler_ = builderForValue.build(); + onChanged(); + } else { + eventHandlerBuilder_.setMessage(builderForValue.build()); + } + handlerCase_ = 1; + return this; + } + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + public Builder mergeEventHandler(com.google.cloud.dialogflow.cx.v3.Handler.EventHandler value) { + if (eventHandlerBuilder_ == null) { + if (handlerCase_ == 1 + && handler_ + != com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance()) { + handler_ = + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) handler_) + .mergeFrom(value) + .buildPartial(); + } else { + handler_ = value; + } + onChanged(); + } else { + if (handlerCase_ == 1) { + eventHandlerBuilder_.mergeFrom(value); + } else { + eventHandlerBuilder_.setMessage(value); + } + } + handlerCase_ = 1; + return this; + } + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + public Builder clearEventHandler() { + if (eventHandlerBuilder_ == null) { + if (handlerCase_ == 1) { + handlerCase_ = 0; + handler_ = null; + onChanged(); + } + } else { + if (handlerCase_ == 1) { + handlerCase_ = 0; + handler_ = null; + } + eventHandlerBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.Builder getEventHandlerBuilder() { + return getEventHandlerFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.EventHandlerOrBuilder + getEventHandlerOrBuilder() { + if ((handlerCase_ == 1) && (eventHandlerBuilder_ != null)) { + return eventHandlerBuilder_.getMessageOrBuilder(); + } else { + if (handlerCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) handler_; + } + return com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A handler triggered by event.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler, + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3.Handler.EventHandlerOrBuilder> + getEventHandlerFieldBuilder() { + if (eventHandlerBuilder_ == null) { + if (!(handlerCase_ == 1)) { + handler_ = com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.getDefaultInstance(); + } + eventHandlerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler, + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler.Builder, + com.google.cloud.dialogflow.cx.v3.Handler.EventHandlerOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Handler.EventHandler) handler_, + getParentForChildren(), + isClean()); + handler_ = null; + } + handlerCase_ = 1; + onChanged(); + return eventHandlerBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler, + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.Builder, + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandlerOrBuilder> + lifecycleHandlerBuilder_; + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + * + * @return Whether the lifecycleHandler field is set. + */ + @java.lang.Override + public boolean hasLifecycleHandler() { + return handlerCase_ == 3; + } + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + * + * @return The lifecycleHandler. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler getLifecycleHandler() { + if (lifecycleHandlerBuilder_ == null) { + if (handlerCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) handler_; + } + return com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.getDefaultInstance(); + } else { + if (handlerCase_ == 3) { + return lifecycleHandlerBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + public Builder setLifecycleHandler( + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler value) { + if (lifecycleHandlerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + handler_ = value; + onChanged(); + } else { + lifecycleHandlerBuilder_.setMessage(value); + } + handlerCase_ = 3; + return this; + } + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + public Builder setLifecycleHandler( + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.Builder builderForValue) { + if (lifecycleHandlerBuilder_ == null) { + handler_ = builderForValue.build(); + onChanged(); + } else { + lifecycleHandlerBuilder_.setMessage(builderForValue.build()); + } + handlerCase_ = 3; + return this; + } + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + public Builder mergeLifecycleHandler( + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler value) { + if (lifecycleHandlerBuilder_ == null) { + if (handlerCase_ == 3 + && handler_ + != com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler + .getDefaultInstance()) { + handler_ = + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) handler_) + .mergeFrom(value) + .buildPartial(); + } else { + handler_ = value; + } + onChanged(); + } else { + if (handlerCase_ == 3) { + lifecycleHandlerBuilder_.mergeFrom(value); + } else { + lifecycleHandlerBuilder_.setMessage(value); + } + } + handlerCase_ = 3; + return this; + } + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + public Builder clearLifecycleHandler() { + if (lifecycleHandlerBuilder_ == null) { + if (handlerCase_ == 3) { + handlerCase_ = 0; + handler_ = null; + onChanged(); + } + } else { + if (handlerCase_ == 3) { + handlerCase_ = 0; + handler_ = null; + } + lifecycleHandlerBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + public com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.Builder + getLifecycleHandlerBuilder() { + return getLifecycleHandlerFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandlerOrBuilder + getLifecycleHandlerOrBuilder() { + if ((handlerCase_ == 3) && (lifecycleHandlerBuilder_ != null)) { + return lifecycleHandlerBuilder_.getMessageOrBuilder(); + } else { + if (handlerCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) handler_; + } + return com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A handler triggered during specific lifecycle of the playbook execution.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler, + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.Builder, + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandlerOrBuilder> + getLifecycleHandlerFieldBuilder() { + if (lifecycleHandlerBuilder_ == null) { + if (!(handlerCase_ == 3)) { + handler_ = + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.getDefaultInstance(); + } + lifecycleHandlerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler, + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.Builder, + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandlerOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) handler_, + getParentForChildren(), + isClean()); + handler_ = null; + } + handlerCase_ = 3; + onChanged(); + return lifecycleHandlerBuilder_; + } + + @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.v3.Handler) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Handler) + private static final com.google.cloud.dialogflow.cx.v3.Handler DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Handler(); + } + + public static com.google.cloud.dialogflow.cx.v3.Handler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Handler 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.v3.Handler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/HandlerOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/HandlerOrBuilder.java new file mode 100644 index 000000000000..cdcc79baac9a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/HandlerOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface HandlerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Handler) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A handler triggered by event.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + * + * @return Whether the eventHandler field is set. + */ + boolean hasEventHandler(); + + /** + * + * + *
+   * A handler triggered by event.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + * + * @return The eventHandler. + */ + com.google.cloud.dialogflow.cx.v3.Handler.EventHandler getEventHandler(); + + /** + * + * + *
+   * A handler triggered by event.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.EventHandler event_handler = 1; + */ + com.google.cloud.dialogflow.cx.v3.Handler.EventHandlerOrBuilder getEventHandlerOrBuilder(); + + /** + * + * + *
+   * A handler triggered during specific lifecycle of the playbook execution.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + * + * @return Whether the lifecycleHandler field is set. + */ + boolean hasLifecycleHandler(); + + /** + * + * + *
+   * A handler triggered during specific lifecycle of the playbook execution.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + * + * @return The lifecycleHandler. + */ + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler getLifecycleHandler(); + + /** + * + * + *
+   * A handler triggered during specific lifecycle of the playbook execution.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler lifecycle_handler = 3; + */ + com.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandlerOrBuilder + getLifecycleHandlerOrBuilder(); + + com.google.cloud.dialogflow.cx.v3.Handler.HandlerCase getHandlerCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookRequest.java new file mode 100644 index 000000000000..58052f4d5d4d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookRequest.java @@ -0,0 +1,1476 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportPlaybookRequest} + */ +public final class ImportPlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportPlaybookRequest) + ImportPlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ImportPlaybookRequest.newBuilder() to construct. + private ImportPlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportPlaybookRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportPlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.Builder.class); + } + + private int bitField0_; + private int playbookCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object playbook_; + + public enum PlaybookCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLAYBOOK_URI(2), + PLAYBOOK_CONTENT(3), + PLAYBOOK_NOT_SET(0); + private final int value; + + private PlaybookCase(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 PlaybookCase valueOf(int value) { + return forNumber(value); + } + + public static PlaybookCase forNumber(int value) { + switch (value) { + case 2: + return PLAYBOOK_URI; + case 3: + return PLAYBOOK_CONTENT; + case 0: + return PLAYBOOK_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PlaybookCase getPlaybookCase() { + return PlaybookCase.forNumber(playbookCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The agent to import the playbook into.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 playbook into.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 PLAYBOOK_URI_FIELD_NUMBER = 2; + + /** + * + * + *
+   * [Dialogflow access
+   * control]
+   * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string playbook_uri = 2; + * + * @return Whether the playbookUri field is set. + */ + public boolean hasPlaybookUri() { + return playbookCase_ == 2; + } + + /** + * + * + *
+   * [Dialogflow access
+   * control]
+   * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string playbook_uri = 2; + * + * @return The playbookUri. + */ + public java.lang.String getPlaybookUri() { + java.lang.Object ref = ""; + if (playbookCase_ == 2) { + ref = playbook_; + } + 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 (playbookCase_ == 2) { + playbook_ = s; + } + return s; + } + } + + /** + * + * + *
+   * [Dialogflow access
+   * control]
+   * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string playbook_uri = 2; + * + * @return The bytes for playbookUri. + */ + public com.google.protobuf.ByteString getPlaybookUriBytes() { + java.lang.Object ref = ""; + if (playbookCase_ == 2) { + ref = playbook_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (playbookCase_ == 2) { + playbook_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_CONTENT_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Uncompressed raw byte content for playbook.
+   * 
+ * + * bytes playbook_content = 3; + * + * @return Whether the playbookContent field is set. + */ + @java.lang.Override + public boolean hasPlaybookContent() { + return playbookCase_ == 3; + } + + /** + * + * + *
+   * Uncompressed raw byte content for playbook.
+   * 
+ * + * bytes playbook_content = 3; + * + * @return The playbookContent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookContent() { + if (playbookCase_ == 3) { + return (com.google.protobuf.ByteString) playbook_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int IMPORT_STRATEGY_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy importStrategy_; + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the importStrategy field is set. + */ + @java.lang.Override + public boolean hasImportStrategy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The importStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy getImportStrategy() { + return importStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.getDefaultInstance() + : importStrategy_; + } + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategyOrBuilder + getImportStrategyOrBuilder() { + return importStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.getDefaultInstance() + : importStrategy_; + } + + 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 (playbookCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, playbook_); + } + if (playbookCase_ == 3) { + output.writeBytes(3, (com.google.protobuf.ByteString) playbook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getImportStrategy()); + } + 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 (playbookCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, playbook_); + } + if (playbookCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 3, (com.google.protobuf.ByteString) playbook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getImportStrategy()); + } + 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.v3.ImportPlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasImportStrategy() != other.hasImportStrategy()) return false; + if (hasImportStrategy()) { + if (!getImportStrategy().equals(other.getImportStrategy())) return false; + } + if (!getPlaybookCase().equals(other.getPlaybookCase())) return false; + switch (playbookCase_) { + case 2: + if (!getPlaybookUri().equals(other.getPlaybookUri())) return false; + break; + case 3: + if (!getPlaybookContent().equals(other.getPlaybookContent())) 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 (hasImportStrategy()) { + hash = (37 * hash) + IMPORT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getImportStrategy().hashCode(); + } + switch (playbookCase_) { + case 2: + hash = (37 * hash) + PLAYBOOK_URI_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookUri().hashCode(); + break; + case 3: + hash = (37 * hash) + PLAYBOOK_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest 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.v3.ImportPlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest 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.v3.ImportPlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest 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.v3.ImportPlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest 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.v3.ImportPlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest 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.v3.ImportPlaybookRequest 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.v3.ImportPlaybookRequest 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.v3.ImportPlaybookRequest 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
+   * [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportPlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportPlaybookRequest) + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getImportStrategyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + importStrategy_ = null; + if (importStrategyBuilder_ != null) { + importStrategyBuilder_.dispose(); + importStrategyBuilder_ = null; + } + playbookCase_ = 0; + playbook_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.importStrategy_ = + importStrategyBuilder_ == null ? importStrategy_ : importStrategyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest result) { + result.playbookCase_ = playbookCase_; + result.playbook_ = this.playbook_; + } + + @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.v3.ImportPlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasImportStrategy()) { + mergeImportStrategy(other.getImportStrategy()); + } + switch (other.getPlaybookCase()) { + case PLAYBOOK_URI: + { + playbookCase_ = 2; + playbook_ = other.playbook_; + onChanged(); + break; + } + case PLAYBOOK_CONTENT: + { + setPlaybookContent(other.getPlaybookContent()); + break; + } + case PLAYBOOK_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(); + playbookCase_ = 2; + playbook_ = s; + break; + } // case 18 + case 26: + { + playbook_ = input.readBytes(); + playbookCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getImportStrategyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 playbookCase_ = 0; + private java.lang.Object playbook_; + + public PlaybookCase getPlaybookCase() { + return PlaybookCase.forNumber(playbookCase_); + } + + public Builder clearPlaybook() { + playbookCase_ = 0; + playbook_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The agent to import the playbook into.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 playbook into.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 playbook into.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 playbook into.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 playbook into.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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; + } + + /** + * + * + *
+     * [Dialogflow access
+     * control]
+     * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string playbook_uri = 2; + * + * @return Whether the playbookUri field is set. + */ + @java.lang.Override + public boolean hasPlaybookUri() { + return playbookCase_ == 2; + } + + /** + * + * + *
+     * [Dialogflow access
+     * control]
+     * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string playbook_uri = 2; + * + * @return The playbookUri. + */ + @java.lang.Override + public java.lang.String getPlaybookUri() { + java.lang.Object ref = ""; + if (playbookCase_ == 2) { + ref = playbook_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (playbookCase_ == 2) { + playbook_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * [Dialogflow access
+     * control]
+     * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string playbook_uri = 2; + * + * @return The bytes for playbookUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookUriBytes() { + java.lang.Object ref = ""; + if (playbookCase_ == 2) { + ref = playbook_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (playbookCase_ == 2) { + playbook_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * [Dialogflow access
+     * control]
+     * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string playbook_uri = 2; + * + * @param value The playbookUri to set. + * @return This builder for chaining. + */ + public Builder setPlaybookUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + playbookCase_ = 2; + playbook_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * [Dialogflow access
+     * control]
+     * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string playbook_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearPlaybookUri() { + if (playbookCase_ == 2) { + playbookCase_ = 0; + playbook_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * [Dialogflow access
+     * control]
+     * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string playbook_uri = 2; + * + * @param value The bytes for playbookUri to set. + * @return This builder for chaining. + */ + public Builder setPlaybookUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + playbookCase_ = 2; + playbook_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Uncompressed raw byte content for playbook.
+     * 
+ * + * bytes playbook_content = 3; + * + * @return Whether the playbookContent field is set. + */ + public boolean hasPlaybookContent() { + return playbookCase_ == 3; + } + + /** + * + * + *
+     * Uncompressed raw byte content for playbook.
+     * 
+ * + * bytes playbook_content = 3; + * + * @return The playbookContent. + */ + public com.google.protobuf.ByteString getPlaybookContent() { + if (playbookCase_ == 3) { + return (com.google.protobuf.ByteString) playbook_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + /** + * + * + *
+     * Uncompressed raw byte content for playbook.
+     * 
+ * + * bytes playbook_content = 3; + * + * @param value The playbookContent to set. + * @return This builder for chaining. + */ + public Builder setPlaybookContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + playbookCase_ = 3; + playbook_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Uncompressed raw byte content for playbook.
+     * 
+ * + * bytes playbook_content = 3; + * + * @return This builder for chaining. + */ + public Builder clearPlaybookContent() { + if (playbookCase_ == 3) { + playbookCase_ = 0; + playbook_ = null; + onChanged(); + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy importStrategy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy, + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategyOrBuilder> + importStrategyBuilder_; + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the importStrategy field is set. + */ + public boolean hasImportStrategy() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The importStrategy. + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy getImportStrategy() { + if (importStrategyBuilder_ == null) { + return importStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.getDefaultInstance() + : importStrategy_; + } else { + return importStrategyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setImportStrategy( + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy value) { + if (importStrategyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + importStrategy_ = value; + } else { + importStrategyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setImportStrategy( + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.Builder builderForValue) { + if (importStrategyBuilder_ == null) { + importStrategy_ = builderForValue.build(); + } else { + importStrategyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeImportStrategy( + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy value) { + if (importStrategyBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && importStrategy_ != null + && importStrategy_ + != com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.getDefaultInstance()) { + getImportStrategyBuilder().mergeFrom(value); + } else { + importStrategy_ = value; + } + } else { + importStrategyBuilder_.mergeFrom(value); + } + if (importStrategy_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearImportStrategy() { + bitField0_ = (bitField0_ & ~0x00000008); + importStrategy_ = null; + if (importStrategyBuilder_ != null) { + importStrategyBuilder_.dispose(); + importStrategyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.Builder + getImportStrategyBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getImportStrategyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategyOrBuilder + getImportStrategyOrBuilder() { + if (importStrategyBuilder_ != null) { + return importStrategyBuilder_.getMessageOrBuilder(); + } else { + return importStrategy_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.getDefaultInstance() + : importStrategy_; + } + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving resource
+     * conflicts.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy, + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategyOrBuilder> + getImportStrategyFieldBuilder() { + if (importStrategyBuilder_ == null) { + importStrategyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy, + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategyOrBuilder>( + getImportStrategy(), getParentForChildren(), isClean()); + importStrategy_ = null; + } + return importStrategyBuilder_; + } + + @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.v3.ImportPlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportPlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportPlaybookRequest 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.v3.ImportPlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..7b338c044a1d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ImportPlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportPlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to import the playbook into.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 playbook into.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * [Dialogflow access
+   * control]
+   * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string playbook_uri = 2; + * + * @return Whether the playbookUri field is set. + */ + boolean hasPlaybookUri(); + + /** + * + * + *
+   * [Dialogflow access
+   * control]
+   * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string playbook_uri = 2; + * + * @return The playbookUri. + */ + java.lang.String getPlaybookUri(); + + /** + * + * + *
+   * [Dialogflow access
+   * control]
+   * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string playbook_uri = 2; + * + * @return The bytes for playbookUri. + */ + com.google.protobuf.ByteString getPlaybookUriBytes(); + + /** + * + * + *
+   * Uncompressed raw byte content for playbook.
+   * 
+ * + * bytes playbook_content = 3; + * + * @return Whether the playbookContent field is set. + */ + boolean hasPlaybookContent(); + + /** + * + * + *
+   * Uncompressed raw byte content for playbook.
+   * 
+ * + * bytes playbook_content = 3; + * + * @return The playbookContent. + */ + com.google.protobuf.ByteString getPlaybookContent(); + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the importStrategy field is set. + */ + boolean hasImportStrategy(); + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The importStrategy. + */ + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy getImportStrategy(); + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving resource
+   * conflicts.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategyOrBuilder getImportStrategyOrBuilder(); + + com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.PlaybookCase getPlaybookCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookResponse.java new file mode 100644 index 000000000000..285b695f02c6 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookResponse.java @@ -0,0 +1,2391 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportPlaybookResponse} + */ +public final class ImportPlaybookResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportPlaybookResponse) + ImportPlaybookResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ImportPlaybookResponse.newBuilder() to construct. + private ImportPlaybookResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportPlaybookResponse() { + playbook_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportPlaybookResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.class, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.Builder.class); + } + + public interface ConflictingResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Display name of conflicting main playbook.
+     * 
+ * + * string main_playbook_display_name = 1; + * + * @return The mainPlaybookDisplayName. + */ + java.lang.String getMainPlaybookDisplayName(); + + /** + * + * + *
+     * Display name of conflicting main playbook.
+     * 
+ * + * string main_playbook_display_name = 1; + * + * @return The bytes for mainPlaybookDisplayName. + */ + com.google.protobuf.ByteString getMainPlaybookDisplayNameBytes(); + + /** + * + * + *
+     * Display names of conflicting nested playbooks.
+     * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @return A list containing the nestedPlaybookDisplayNames. + */ + java.util.List getNestedPlaybookDisplayNamesList(); + + /** + * + * + *
+     * Display names of conflicting nested playbooks.
+     * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @return The count of nestedPlaybookDisplayNames. + */ + int getNestedPlaybookDisplayNamesCount(); + + /** + * + * + *
+     * Display names of conflicting nested playbooks.
+     * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param index The index of the element to return. + * @return The nestedPlaybookDisplayNames at the given index. + */ + java.lang.String getNestedPlaybookDisplayNames(int index); + + /** + * + * + *
+     * Display names of conflicting nested playbooks.
+     * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the nestedPlaybookDisplayNames at the given index. + */ + com.google.protobuf.ByteString getNestedPlaybookDisplayNamesBytes(int index); + + /** + * + * + *
+     * Display names of conflicting tools.
+     * 
+ * + * repeated string tool_display_names = 3; + * + * @return A list containing the toolDisplayNames. + */ + java.util.List getToolDisplayNamesList(); + + /** + * + * + *
+     * Display names of conflicting tools.
+     * 
+ * + * repeated string tool_display_names = 3; + * + * @return The count of toolDisplayNames. + */ + int getToolDisplayNamesCount(); + + /** + * + * + *
+     * Display names of conflicting tools.
+     * 
+ * + * repeated string tool_display_names = 3; + * + * @param index The index of the element to return. + * @return The toolDisplayNames at the given index. + */ + java.lang.String getToolDisplayNames(int index); + + /** + * + * + *
+     * Display names of conflicting tools.
+     * 
+ * + * repeated string tool_display_names = 3; + * + * @param index The index of the value to return. + * @return The bytes of the toolDisplayNames at the given index. + */ + com.google.protobuf.ByteString getToolDisplayNamesBytes(int index); + } + + /** + * + * + *
+   * Conflicting resources detected during the import process. Only filled when
+   * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] is set in the
+   * request and there are conflicts in the display names.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources} + */ + public static final class ConflictingResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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() { + mainPlaybookDisplayName_ = ""; + nestedPlaybookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + toolDisplayNames_ = 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.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.class, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.Builder + .class); + } + + public static final int MAIN_PLAYBOOK_DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mainPlaybookDisplayName_ = ""; + + /** + * + * + *
+     * Display name of conflicting main playbook.
+     * 
+ * + * string main_playbook_display_name = 1; + * + * @return The mainPlaybookDisplayName. + */ + @java.lang.Override + public java.lang.String getMainPlaybookDisplayName() { + java.lang.Object ref = mainPlaybookDisplayName_; + 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(); + mainPlaybookDisplayName_ = s; + return s; + } + } + + /** + * + * + *
+     * Display name of conflicting main playbook.
+     * 
+ * + * string main_playbook_display_name = 1; + * + * @return The bytes for mainPlaybookDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMainPlaybookDisplayNameBytes() { + java.lang.Object ref = mainPlaybookDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mainPlaybookDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NESTED_PLAYBOOK_DISPLAY_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList nestedPlaybookDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Display names of conflicting nested playbooks.
+     * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @return A list containing the nestedPlaybookDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getNestedPlaybookDisplayNamesList() { + return nestedPlaybookDisplayNames_; + } + + /** + * + * + *
+     * Display names of conflicting nested playbooks.
+     * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @return The count of nestedPlaybookDisplayNames. + */ + public int getNestedPlaybookDisplayNamesCount() { + return nestedPlaybookDisplayNames_.size(); + } + + /** + * + * + *
+     * Display names of conflicting nested playbooks.
+     * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param index The index of the element to return. + * @return The nestedPlaybookDisplayNames at the given index. + */ + public java.lang.String getNestedPlaybookDisplayNames(int index) { + return nestedPlaybookDisplayNames_.get(index); + } + + /** + * + * + *
+     * Display names of conflicting nested playbooks.
+     * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the nestedPlaybookDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getNestedPlaybookDisplayNamesBytes(int index) { + return nestedPlaybookDisplayNames_.getByteString(index); + } + + public static final int TOOL_DISPLAY_NAMES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList toolDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Display names of conflicting tools.
+     * 
+ * + * repeated string tool_display_names = 3; + * + * @return A list containing the toolDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getToolDisplayNamesList() { + return toolDisplayNames_; + } + + /** + * + * + *
+     * Display names of conflicting tools.
+     * 
+ * + * repeated string tool_display_names = 3; + * + * @return The count of toolDisplayNames. + */ + public int getToolDisplayNamesCount() { + return toolDisplayNames_.size(); + } + + /** + * + * + *
+     * Display names of conflicting tools.
+     * 
+ * + * repeated string tool_display_names = 3; + * + * @param index The index of the element to return. + * @return The toolDisplayNames at the given index. + */ + public java.lang.String getToolDisplayNames(int index) { + return toolDisplayNames_.get(index); + } + + /** + * + * + *
+     * Display names of conflicting tools.
+     * 
+ * + * repeated string tool_display_names = 3; + * + * @param index The index of the value to return. + * @return The bytes of the toolDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getToolDisplayNamesBytes(int index) { + return toolDisplayNames_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainPlaybookDisplayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mainPlaybookDisplayName_); + } + for (int i = 0; i < nestedPlaybookDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, nestedPlaybookDisplayNames_.getRaw(i)); + } + for (int i = 0; i < toolDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, toolDisplayNames_.getRaw(i)); + } + 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(mainPlaybookDisplayName_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mainPlaybookDisplayName_); + } + { + int dataSize = 0; + for (int i = 0; i < nestedPlaybookDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(nestedPlaybookDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getNestedPlaybookDisplayNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < toolDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(toolDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getToolDisplayNamesList().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.v3.ImportPlaybookResponse.ConflictingResources)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources other = + (com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources) obj; + + if (!getMainPlaybookDisplayName().equals(other.getMainPlaybookDisplayName())) return false; + if (!getNestedPlaybookDisplayNamesList().equals(other.getNestedPlaybookDisplayNamesList())) + return false; + if (!getToolDisplayNamesList().equals(other.getToolDisplayNamesList())) 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) + MAIN_PLAYBOOK_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMainPlaybookDisplayName().hashCode(); + if (getNestedPlaybookDisplayNamesCount() > 0) { + hash = (37 * hash) + NESTED_PLAYBOOK_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNestedPlaybookDisplayNamesList().hashCode(); + } + if (getToolDisplayNamesCount() > 0) { + hash = (37 * hash) + TOOL_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getToolDisplayNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.ConflictingResources + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.ConflictingResources + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.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_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] is set in the
+     * request and there are conflicts in the display names.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources) + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.class, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mainPlaybookDisplayName_ = ""; + nestedPlaybookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + toolDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources build() { + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources result = + new com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mainPlaybookDisplayName_ = mainPlaybookDisplayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + nestedPlaybookDisplayNames_.makeImmutable(); + result.nestedPlaybookDisplayNames_ = nestedPlaybookDisplayNames_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + toolDisplayNames_.makeImmutable(); + result.toolDisplayNames_ = toolDisplayNames_; + } + } + + @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.v3.ImportPlaybookResponse.ConflictingResources) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + .getDefaultInstance()) return this; + if (!other.getMainPlaybookDisplayName().isEmpty()) { + mainPlaybookDisplayName_ = other.mainPlaybookDisplayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.nestedPlaybookDisplayNames_.isEmpty()) { + if (nestedPlaybookDisplayNames_.isEmpty()) { + nestedPlaybookDisplayNames_ = other.nestedPlaybookDisplayNames_; + bitField0_ |= 0x00000002; + } else { + ensureNestedPlaybookDisplayNamesIsMutable(); + nestedPlaybookDisplayNames_.addAll(other.nestedPlaybookDisplayNames_); + } + onChanged(); + } + if (!other.toolDisplayNames_.isEmpty()) { + if (toolDisplayNames_.isEmpty()) { + toolDisplayNames_ = other.toolDisplayNames_; + bitField0_ |= 0x00000004; + } else { + ensureToolDisplayNamesIsMutable(); + toolDisplayNames_.addAll(other.toolDisplayNames_); + } + 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: + { + mainPlaybookDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNestedPlaybookDisplayNamesIsMutable(); + nestedPlaybookDisplayNames_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureToolDisplayNamesIsMutable(); + toolDisplayNames_.add(s); + 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 java.lang.Object mainPlaybookDisplayName_ = ""; + + /** + * + * + *
+       * Display name of conflicting main playbook.
+       * 
+ * + * string main_playbook_display_name = 1; + * + * @return The mainPlaybookDisplayName. + */ + public java.lang.String getMainPlaybookDisplayName() { + java.lang.Object ref = mainPlaybookDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mainPlaybookDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Display name of conflicting main playbook.
+       * 
+ * + * string main_playbook_display_name = 1; + * + * @return The bytes for mainPlaybookDisplayName. + */ + public com.google.protobuf.ByteString getMainPlaybookDisplayNameBytes() { + java.lang.Object ref = mainPlaybookDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mainPlaybookDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Display name of conflicting main playbook.
+       * 
+ * + * string main_playbook_display_name = 1; + * + * @param value The mainPlaybookDisplayName to set. + * @return This builder for chaining. + */ + public Builder setMainPlaybookDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mainPlaybookDisplayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display name of conflicting main playbook.
+       * 
+ * + * string main_playbook_display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearMainPlaybookDisplayName() { + mainPlaybookDisplayName_ = getDefaultInstance().getMainPlaybookDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Display name of conflicting main playbook.
+       * 
+ * + * string main_playbook_display_name = 1; + * + * @param value The bytes for mainPlaybookDisplayName to set. + * @return This builder for chaining. + */ + public Builder setMainPlaybookDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mainPlaybookDisplayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList nestedPlaybookDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNestedPlaybookDisplayNamesIsMutable() { + if (!nestedPlaybookDisplayNames_.isModifiable()) { + nestedPlaybookDisplayNames_ = + new com.google.protobuf.LazyStringArrayList(nestedPlaybookDisplayNames_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @return A list containing the nestedPlaybookDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getNestedPlaybookDisplayNamesList() { + nestedPlaybookDisplayNames_.makeImmutable(); + return nestedPlaybookDisplayNames_; + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @return The count of nestedPlaybookDisplayNames. + */ + public int getNestedPlaybookDisplayNamesCount() { + return nestedPlaybookDisplayNames_.size(); + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param index The index of the element to return. + * @return The nestedPlaybookDisplayNames at the given index. + */ + public java.lang.String getNestedPlaybookDisplayNames(int index) { + return nestedPlaybookDisplayNames_.get(index); + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the nestedPlaybookDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getNestedPlaybookDisplayNamesBytes(int index) { + return nestedPlaybookDisplayNames_.getByteString(index); + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param index The index to set the value at. + * @param value The nestedPlaybookDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setNestedPlaybookDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNestedPlaybookDisplayNamesIsMutable(); + nestedPlaybookDisplayNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param value The nestedPlaybookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addNestedPlaybookDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNestedPlaybookDisplayNamesIsMutable(); + nestedPlaybookDisplayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param values The nestedPlaybookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllNestedPlaybookDisplayNames(java.lang.Iterable values) { + ensureNestedPlaybookDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nestedPlaybookDisplayNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearNestedPlaybookDisplayNames() { + nestedPlaybookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display names of conflicting nested playbooks.
+       * 
+ * + * repeated string nested_playbook_display_names = 2; + * + * @param value The bytes of the nestedPlaybookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addNestedPlaybookDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNestedPlaybookDisplayNamesIsMutable(); + nestedPlaybookDisplayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList toolDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureToolDisplayNamesIsMutable() { + if (!toolDisplayNames_.isModifiable()) { + toolDisplayNames_ = new com.google.protobuf.LazyStringArrayList(toolDisplayNames_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @return A list containing the toolDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getToolDisplayNamesList() { + toolDisplayNames_.makeImmutable(); + return toolDisplayNames_; + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @return The count of toolDisplayNames. + */ + public int getToolDisplayNamesCount() { + return toolDisplayNames_.size(); + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @param index The index of the element to return. + * @return The toolDisplayNames at the given index. + */ + public java.lang.String getToolDisplayNames(int index) { + return toolDisplayNames_.get(index); + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @param index The index of the value to return. + * @return The bytes of the toolDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getToolDisplayNamesBytes(int index) { + return toolDisplayNames_.getByteString(index); + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @param index The index to set the value at. + * @param value The toolDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setToolDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolDisplayNamesIsMutable(); + toolDisplayNames_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @param value The toolDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addToolDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolDisplayNamesIsMutable(); + toolDisplayNames_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @param values The toolDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllToolDisplayNames(java.lang.Iterable values) { + ensureToolDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, toolDisplayNames_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @return This builder for chaining. + */ + public Builder clearToolDisplayNames() { + toolDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Display names of conflicting tools.
+       * 
+ * + * repeated string tool_display_names = 3; + * + * @param value The bytes of the toolDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addToolDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureToolDisplayNamesIsMutable(); + toolDisplayNames_.add(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.v3.ImportPlaybookResponse.ConflictingResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources) + private static final com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse + .ConflictingResources + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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.v3.ImportPlaybookResponse.ConflictingResources + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int PLAYBOOK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object playbook_ = ""; + + /** + * + * + *
+   * The unique identifier of the new playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @return The playbook. + */ + @java.lang.Override + public java.lang.String getPlaybook() { + java.lang.Object ref = playbook_; + 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(); + playbook_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique identifier of the new playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for playbook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookBytes() { + java.lang.Object ref = playbook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFLICTING_RESOURCES_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + conflictingResources_; + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+   * is set for all resources in ImportPlaybookRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + @java.lang.Override + public boolean hasConflictingResources() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+   * is set for all resources in ImportPlaybookRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + getConflictingResources() { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+   * is set for all resources in ImportPlaybookRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder() { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playbook_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, playbook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getConflictingResources()); + } + 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(playbook_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, playbook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + 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.v3.ImportPlaybookResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse other = + (com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse) obj; + + if (!getPlaybook().equals(other.getPlaybook())) 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(); + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().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.v3.ImportPlaybookResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse 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.v3.ImportPlaybookResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse 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.v3.ImportPlaybookResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse 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.v3.ImportPlaybookResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse 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.v3.ImportPlaybookResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse 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.v3.ImportPlaybookResponse 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.v3.ImportPlaybookResponse 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.v3.ImportPlaybookResponse 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
+   * [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportPlaybookResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportPlaybookResponse) + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.class, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConflictingResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playbook_ = ""; + 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.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse build() { + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse result = + new com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.playbook_ = playbook_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.conflictingResources_ = + conflictingResourcesBuilder_ == null + ? conflictingResources_ + : conflictingResourcesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.ImportPlaybookResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.getDefaultInstance()) + return this; + if (!other.getPlaybook().isEmpty()) { + playbook_ = other.playbook_; + bitField0_ |= 0x00000001; + 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: + { + playbook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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 java.lang.Object playbook_ = ""; + + /** + * + * + *
+     * The unique identifier of the new playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @return The playbook. + */ + public java.lang.String getPlaybook() { + java.lang.Object ref = playbook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + playbook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the new playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for playbook. + */ + public com.google.protobuf.ByteString getPlaybookBytes() { + java.lang.Object ref = playbook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the new playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The playbook to set. + * @return This builder for chaining. + */ + public Builder setPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the new playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPlaybook() { + playbook_ = getDefaultInstance().getPlaybook(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the new playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for playbook to set. + * @return This builder for chaining. + */ + public Builder setPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + playbook_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + conflictingResources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.Builder, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResourcesOrBuilder> + conflictingResourcesBuilder_; + + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + getConflictingResources() { + if (conflictingResourcesBuilder_ == null) { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } else { + return conflictingResourcesBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder setConflictingResources( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder setConflictingResources( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder mergeConflictingResources( + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources value) { + if (conflictingResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && conflictingResources_ != null + && conflictingResources_ + != com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + .getDefaultInstance()) { + getConflictingResourcesBuilder().mergeFrom(value); + } else { + conflictingResources_ = value; + } + } else { + conflictingResourcesBuilder_.mergeFrom(value); + } + if (conflictingResources_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.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_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.Builder + getConflictingResourcesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConflictingResourcesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder() { + if (conflictingResourcesBuilder_ != null) { + return conflictingResourcesBuilder_.getMessageOrBuilder(); + } else { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + } + + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+     * is set for all resources in ImportPlaybookRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.Builder, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResourcesOrBuilder> + getConflictingResourcesFieldBuilder() { + if (conflictingResourcesBuilder_ == null) { + conflictingResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse + .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.v3.ImportPlaybookResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportPlaybookResponse) + private static final com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportPlaybookResponse 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.v3.ImportPlaybookResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookResponseOrBuilder.java new file mode 100644 index 000000000000..69ddcaa6e54b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportPlaybookResponseOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ImportPlaybookResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportPlaybookResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the new playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @return The playbook. + */ + java.lang.String getPlaybook(); + + /** + * + * + *
+   * The unique identifier of the new playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string playbook = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for playbook. + */ + com.google.protobuf.ByteString getPlaybookBytes(); + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+   * is set for all resources in ImportPlaybookRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + boolean hasConflictingResources(); + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+   * is set for all resources in ImportPlaybookRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + getConflictingResources(); + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy
+   * is set for all resources in ImportPlaybookRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources conflicting_resources = 2; + * + */ + com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InlineSchema.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InlineSchema.java new file mode 100644 index 000000000000..7e5be7f78fb0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InlineSchema.java @@ -0,0 +1,890 @@ +/* + * Copyright 2026 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/v3/parameter_definition.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * A type schema object that's specified inline.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.InlineSchema} + */ +public final class InlineSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.InlineSchema) + InlineSchemaOrBuilder { + private static final long serialVersionUID = 0L; + + // Use InlineSchema.newBuilder() to construct. + private InlineSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InlineSchema() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InlineSchema(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.InlineSchema.class, + com.google.cloud.dialogflow.cx.v3.InlineSchema.Builder.class); + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+   * Data type of the schema.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Data type of the schema.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataType getType() { + com.google.cloud.dialogflow.cx.v3.DataType result = + com.google.cloud.dialogflow.cx.v3.DataType.forNumber(type_); + return result == null ? com.google.cloud.dialogflow.cx.v3.DataType.UNRECOGNIZED : result; + } + + public static final int ITEMS_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.TypeSchema items_; + + /** + * + * + *
+   * Schema of the elements if this is an ARRAY type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + * + * @return Whether the items field is set. + */ + @java.lang.Override + public boolean hasItems() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Schema of the elements if this is an ARRAY type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + * + * @return The items. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema getItems() { + return items_ == null + ? com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance() + : items_; + } + + /** + * + * + *
+   * Schema of the elements if this is an ARRAY type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder getItemsOrBuilder() { + return items_ == null + ? com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance() + : items_; + } + + 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 (type_ != com.google.cloud.dialogflow.cx.v3.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getItems()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.dialogflow.cx.v3.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getItems()); + } + 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.v3.InlineSchema)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.InlineSchema other = + (com.google.cloud.dialogflow.cx.v3.InlineSchema) obj; + + if (type_ != other.type_) return false; + if (hasItems() != other.hasItems()) return false; + if (hasItems()) { + if (!getItems().equals(other.getItems())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasItems()) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItems().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.InlineSchema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.InlineSchema 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.v3.InlineSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.InlineSchema 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.v3.InlineSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.InlineSchema 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.v3.InlineSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.InlineSchema 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.v3.InlineSchema parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.InlineSchema 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.v3.InlineSchema 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.v3.InlineSchema 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.v3.InlineSchema 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; + } + + /** + * + * + *
+   * A type schema object that's specified inline.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.InlineSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.InlineSchema) + com.google.cloud.dialogflow.cx.v3.InlineSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.InlineSchema.class, + com.google.cloud.dialogflow.cx.v3.InlineSchema.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.InlineSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getItemsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + items_ = null; + if (itemsBuilder_ != null) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSchema getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSchema build() { + com.google.cloud.dialogflow.cx.v3.InlineSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSchema buildPartial() { + com.google.cloud.dialogflow.cx.v3.InlineSchema result = + new com.google.cloud.dialogflow.cx.v3.InlineSchema(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.InlineSchema result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.items_ = itemsBuilder_ == null ? items_ : itemsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.InlineSchema) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.InlineSchema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.InlineSchema other) { + if (other == com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasItems()) { + mergeItems(other.getItems()); + } + 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: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getItemsFieldBuilder().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 int type_ = 0; + + /** + * + * + *
+     * Data type of the schema.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Data type of the schema.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Data type of the schema.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataType getType() { + com.google.cloud.dialogflow.cx.v3.DataType result = + com.google.cloud.dialogflow.cx.v3.DataType.forNumber(type_); + return result == null ? com.google.cloud.dialogflow.cx.v3.DataType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Data type of the schema.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.dialogflow.cx.v3.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Data type of the schema.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.TypeSchema items_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema, + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder> + itemsBuilder_; + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + * + * @return Whether the items field is set. + */ + public boolean hasItems() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + * + * @return The items. + */ + public com.google.cloud.dialogflow.cx.v3.TypeSchema getItems() { + if (itemsBuilder_ == null) { + return items_ == null + ? com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance() + : items_; + } else { + return itemsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + public Builder setItems(com.google.cloud.dialogflow.cx.v3.TypeSchema value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + items_ = value; + } else { + itemsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + public Builder setItems(com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder builderForValue) { + if (itemsBuilder_ == null) { + items_ = builderForValue.build(); + } else { + itemsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + public Builder mergeItems(com.google.cloud.dialogflow.cx.v3.TypeSchema value) { + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && items_ != null + && items_ != com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance()) { + getItemsBuilder().mergeFrom(value); + } else { + items_ = value; + } + } else { + itemsBuilder_.mergeFrom(value); + } + if (items_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + public Builder clearItems() { + bitField0_ = (bitField0_ & ~0x00000002); + items_ = null; + if (itemsBuilder_ != null) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + public com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder getItemsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getItemsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + public com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder getItemsOrBuilder() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilder(); + } else { + return items_ == null + ? com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance() + : items_; + } + } + + /** + * + * + *
+     * Schema of the elements if this is an ARRAY type.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema, + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema, + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder>( + getItems(), getParentForChildren(), isClean()); + items_ = null; + } + return itemsBuilder_; + } + + @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.v3.InlineSchema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.InlineSchema) + private static final com.google.cloud.dialogflow.cx.v3.InlineSchema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.InlineSchema(); + } + + public static com.google.cloud.dialogflow.cx.v3.InlineSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineSchema 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.v3.InlineSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InlineSchemaOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InlineSchemaOrBuilder.java new file mode 100644 index 000000000000..c9fdfa10ddc0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InlineSchemaOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026 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/v3/parameter_definition.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface InlineSchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.InlineSchema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Data type of the schema.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Data type of the schema.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DataType type = 1; + * + * @return The type. + */ + com.google.cloud.dialogflow.cx.v3.DataType getType(); + + /** + * + * + *
+   * Schema of the elements if this is an ARRAY type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + * + * @return Whether the items field is set. + */ + boolean hasItems(); + + /** + * + * + *
+   * Schema of the elements if this is an ARRAY type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + * + * @return The items. + */ + com.google.cloud.dialogflow.cx.v3.TypeSchema getItems(); + + /** + * + * + *
+   * Schema of the elements if this is an ARRAY type.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema items = 2; + */ + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder getItemsOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesRequest.java new file mode 100644 index 000000000000..5dc09be825b8 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesRequest.java @@ -0,0 +1,1165 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Examples.ListExamples][google.cloud.dialogflow.cx.v3.Examples.ListExamples].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExamplesRequest} + */ +public final class ListExamplesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListExamplesRequest) + ListExamplesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListExamplesRequest.newBuilder() to construct. + private ListExamplesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExamplesRequest() { + parent_ = ""; + pageToken_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExamplesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest.class, + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The playbook to list the examples from.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * 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 playbook to list the examples from.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+   * returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+   * returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + + /** + * + * + *
+   * Optional. The language to list examples for.
+   * If not specified, list all examples under the playbook.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The language to list examples for.
+   * If not specified, list all examples under the playbook.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); + } + 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.v3.ListExamplesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest other = + (com.google.cloud.dialogflow.cx.v3.ListExamplesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesRequest 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.v3.ListExamplesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesRequest 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.v3.ListExamplesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesRequest 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.v3.ListExamplesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesRequest 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.v3.ListExamplesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesRequest 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.v3.ListExamplesRequest 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.v3.ListExamplesRequest 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.v3.ListExamplesRequest 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
+   * [Examples.ListExamples][google.cloud.dialogflow.cx.v3.Examples.ListExamples].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExamplesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListExamplesRequest) + com.google.cloud.dialogflow.cx.v3.ListExamplesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest.class, + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListExamplesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExamplesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListExamplesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExamplesRequest build() { + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExamplesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListExamplesRequest result = + new com.google.cloud.dialogflow.cx.v3.ListExamplesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ListExamplesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @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.v3.ListExamplesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListExamplesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListExamplesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListExamplesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000008; + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The playbook to list the examples from.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to list the examples from.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to list the examples from.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to list the examples from.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to list the examples from.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, list all examples under the playbook.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, list all examples under the playbook.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, list all examples under the playbook.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, list all examples under the playbook.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, list all examples under the playbook.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000008; + 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.v3.ListExamplesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListExamplesRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListExamplesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListExamplesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExamplesRequest 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.v3.ListExamplesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesRequestOrBuilder.java new file mode 100644 index 000000000000..ce3b4eaa59ff --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesRequestOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListExamplesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListExamplesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to list the examples from.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The playbook to list the examples from.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+   * returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+   * returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The language to list examples for.
+   * If not specified, list all examples under the playbook.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + + /** + * + * + *
+   * Optional. The language to list examples for.
+   * If not specified, list all examples under the playbook.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesResponse.java new file mode 100644 index 000000000000..79f14a00acd0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesResponse.java @@ -0,0 +1,1228 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Examples.ListExamples][google.cloud.dialogflow.cx.v3.Examples.ListExamples].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExamplesResponse} + */ +public final class ListExamplesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListExamplesResponse) + ListExamplesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListExamplesResponse.newBuilder() to construct. + private ListExamplesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExamplesResponse() { + examples_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExamplesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse.class, + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse.Builder.class); + } + + public static final int EXAMPLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List examples_; + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + @java.lang.Override + public java.util.List getExamplesList() { + return examples_; + } + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + @java.lang.Override + public java.util.List + getExamplesOrBuilderList() { + return examples_; + } + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + @java.lang.Override + public int getExamplesCount() { + return examples_.size(); + } + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Example getExamples(int index) { + return examples_.get(index); + } + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExamplesOrBuilder(int index) { + return examples_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < examples_.size(); i++) { + output.writeMessage(1, examples_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < examples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, examples_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.v3.ListExamplesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse other = + (com.google.cloud.dialogflow.cx.v3.ListExamplesResponse) obj; + + if (!getExamplesList().equals(other.getExamplesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getExamplesCount() > 0) { + hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getExamplesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesResponse 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.v3.ListExamplesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesResponse 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.v3.ListExamplesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesResponse 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.v3.ListExamplesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesResponse 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.v3.ListExamplesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesResponse 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.v3.ListExamplesResponse 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.v3.ListExamplesResponse 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.v3.ListExamplesResponse 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
+   * [Examples.ListExamples][google.cloud.dialogflow.cx.v3.Examples.ListExamples].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListExamplesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListExamplesResponse) + com.google.cloud.dialogflow.cx.v3.ListExamplesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse.class, + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListExamplesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + } else { + examples_ = null; + examplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_ListExamplesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExamplesResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListExamplesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExamplesResponse build() { + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListExamplesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse result = + new com.google.cloud.dialogflow.cx.v3.ListExamplesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.ListExamplesResponse result) { + if (examplesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + examples_ = java.util.Collections.unmodifiableList(examples_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.examples_ = examples_; + } else { + result.examples_ = examplesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ListExamplesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3.ListExamplesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListExamplesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListExamplesResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListExamplesResponse.getDefaultInstance()) + return this; + if (examplesBuilder_ == null) { + if (!other.examples_.isEmpty()) { + if (examples_.isEmpty()) { + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExamplesIsMutable(); + examples_.addAll(other.examples_); + } + onChanged(); + } + } else { + if (!other.examples_.isEmpty()) { + if (examplesBuilder_.isEmpty()) { + examplesBuilder_.dispose(); + examplesBuilder_ = null; + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000001); + examplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExamplesFieldBuilder() + : null; + } else { + examplesBuilder_.addAllMessages(other.examples_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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: + { + com.google.cloud.dialogflow.cx.v3.Example m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Example.parser(), extensionRegistry); + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(m); + } else { + examplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List examples_ = + java.util.Collections.emptyList(); + + private void ensureExamplesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + examples_ = new java.util.ArrayList(examples_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder> + examplesBuilder_; + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public java.util.List getExamplesList() { + if (examplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(examples_); + } else { + return examplesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public int getExamplesCount() { + if (examplesBuilder_ == null) { + return examples_.size(); + } else { + return examplesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Example getExamples(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder setExamples(int index, com.google.cloud.dialogflow.cx.v3.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.set(index, value); + onChanged(); + } else { + examplesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder setExamples( + int index, com.google.cloud.dialogflow.cx.v3.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.set(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder addExamples(com.google.cloud.dialogflow.cx.v3.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(value); + onChanged(); + } else { + examplesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder addExamples(int index, com.google.cloud.dialogflow.cx.v3.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(index, value); + onChanged(); + } else { + examplesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder addExamples(com.google.cloud.dialogflow.cx.v3.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder addExamples( + int index, com.google.cloud.dialogflow.cx.v3.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder addAllExamples( + java.lang.Iterable values) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, examples_); + onChanged(); + } else { + examplesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder clearExamples() { + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + examplesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public Builder removeExamples(int index) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.remove(index); + onChanged(); + } else { + examplesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Example.Builder getExamplesBuilder(int index) { + return getExamplesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExamplesOrBuilder(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public java.util.List + getExamplesOrBuilderList() { + if (examplesBuilder_ != null) { + return examplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(examples_); + } + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Example.Builder addExamplesBuilder() { + return getExamplesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Example.Builder addExamplesBuilder(int index) { + return getExamplesFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + public java.util.List + getExamplesBuilderList() { + return getExamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder> + getExamplesFieldBuilder() { + if (examplesBuilder_ == null) { + examplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder>( + examples_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + examples_ = null; + } + return examplesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = 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.v3.ListExamplesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListExamplesResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListExamplesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListExamplesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListExamplesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExamplesResponse 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.v3.ListExamplesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesResponseOrBuilder.java new file mode 100644 index 000000000000..3adaa83b4f3a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListExamplesResponseOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListExamplesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListExamplesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + java.util.List getExamplesList(); + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + com.google.cloud.dialogflow.cx.v3.Example getExamples(int index); + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + int getExamplesCount(); + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + java.util.List + getExamplesOrBuilderList(); + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 1; + */ + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExamplesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsRequest.java new file mode 100644 index 000000000000..839e5eabed50 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsRequest.java @@ -0,0 +1,959 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest} + */ +public final class ListPlaybookVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest) + ListPlaybookVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListPlaybookVersionsRequest.newBuilder() to construct. + private ListPlaybookVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPlaybookVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPlaybookVersionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The playbook to list versions for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * 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 playbook to list versions for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + 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.v3.ListPlaybookVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest other = + (com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest 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.v3.ListPlaybookVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest 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.v3.ListPlaybookVersionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest 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.v3.ListPlaybookVersionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest 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.v3.ListPlaybookVersionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest 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.v3.ListPlaybookVersionsRequest 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.v3.ListPlaybookVersionsRequest 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.v3.ListPlaybookVersionsRequest 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
+   * [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest) + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest build() { + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest result = + new com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.v3.ListPlaybookVersionsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = 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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The playbook to list versions for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to list versions for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to list versions for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to list versions for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 playbook to list versions for.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = 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.v3.ListPlaybookVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPlaybookVersionsRequest 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.v3.ListPlaybookVersionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsRequestOrBuilder.java new file mode 100644 index 000000000000..491a7f06b630 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListPlaybookVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to list versions for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The playbook to list versions for.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsResponse.java new file mode 100644 index 000000000000..7a3d1601131e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsResponse.java @@ -0,0 +1,1204 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse} + */ +public final class ListPlaybookVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse) + ListPlaybookVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListPlaybookVersionsResponse.newBuilder() to construct. + private ListPlaybookVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPlaybookVersionsResponse() { + playbookVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPlaybookVersionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.Builder.class); + } + + public static final int PLAYBOOK_VERSIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List playbookVersions_; + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + @java.lang.Override + public java.util.List + getPlaybookVersionsList() { + return playbookVersions_; + } + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + @java.lang.Override + public java.util.List + getPlaybookVersionsOrBuilderList() { + return playbookVersions_; + } + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + @java.lang.Override + public int getPlaybookVersionsCount() { + return playbookVersions_.size(); + } + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion getPlaybookVersions(int index) { + return playbookVersions_.get(index); + } + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder getPlaybookVersionsOrBuilder( + int index) { + return playbookVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < playbookVersions_.size(); i++) { + output.writeMessage(1, playbookVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < playbookVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, playbookVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.v3.ListPlaybookVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse other = + (com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse) obj; + + if (!getPlaybookVersionsList().equals(other.getPlaybookVersionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getPlaybookVersionsCount() > 0) { + hash = (37 * hash) + PLAYBOOK_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse 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.v3.ListPlaybookVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse 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.v3.ListPlaybookVersionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse 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.v3.ListPlaybookVersionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse 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.v3.ListPlaybookVersionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse 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.v3.ListPlaybookVersionsResponse 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.v3.ListPlaybookVersionsResponse 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.v3.ListPlaybookVersionsResponse 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
+   * [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse) + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (playbookVersionsBuilder_ == null) { + playbookVersions_ = java.util.Collections.emptyList(); + } else { + playbookVersions_ = null; + playbookVersionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse build() { + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse result = + new com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse result) { + if (playbookVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + playbookVersions_ = java.util.Collections.unmodifiableList(playbookVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.playbookVersions_ = playbookVersions_; + } else { + result.playbookVersions_ = playbookVersionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3.ListPlaybookVersionsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.getDefaultInstance()) + return this; + if (playbookVersionsBuilder_ == null) { + if (!other.playbookVersions_.isEmpty()) { + if (playbookVersions_.isEmpty()) { + playbookVersions_ = other.playbookVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.addAll(other.playbookVersions_); + } + onChanged(); + } + } else { + if (!other.playbookVersions_.isEmpty()) { + if (playbookVersionsBuilder_.isEmpty()) { + playbookVersionsBuilder_.dispose(); + playbookVersionsBuilder_ = null; + playbookVersions_ = other.playbookVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + playbookVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPlaybookVersionsFieldBuilder() + : null; + } else { + playbookVersionsBuilder_.addAllMessages(other.playbookVersions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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: + { + com.google.cloud.dialogflow.cx.v3.PlaybookVersion m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.parser(), + extensionRegistry); + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(m); + } else { + playbookVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List playbookVersions_ = + java.util.Collections.emptyList(); + + private void ensurePlaybookVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + playbookVersions_ = + new java.util.ArrayList( + playbookVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder> + playbookVersionsBuilder_; + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public java.util.List + getPlaybookVersionsList() { + if (playbookVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(playbookVersions_); + } else { + return playbookVersionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public int getPlaybookVersionsCount() { + if (playbookVersionsBuilder_ == null) { + return playbookVersions_.size(); + } else { + return playbookVersionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion getPlaybookVersions(int index) { + if (playbookVersionsBuilder_ == null) { + return playbookVersions_.get(index); + } else { + return playbookVersionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder setPlaybookVersions( + int index, com.google.cloud.dialogflow.cx.v3.PlaybookVersion value) { + if (playbookVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybookVersionsIsMutable(); + playbookVersions_.set(index, value); + onChanged(); + } else { + playbookVersionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder setPlaybookVersions( + int index, com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder builderForValue) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + playbookVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder addPlaybookVersions(com.google.cloud.dialogflow.cx.v3.PlaybookVersion value) { + if (playbookVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(value); + onChanged(); + } else { + playbookVersionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder addPlaybookVersions( + int index, com.google.cloud.dialogflow.cx.v3.PlaybookVersion value) { + if (playbookVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(index, value); + onChanged(); + } else { + playbookVersionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder addPlaybookVersions( + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder builderForValue) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(builderForValue.build()); + onChanged(); + } else { + playbookVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder addPlaybookVersions( + int index, com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder builderForValue) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + playbookVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder addAllPlaybookVersions( + java.lang.Iterable values) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, playbookVersions_); + onChanged(); + } else { + playbookVersionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder clearPlaybookVersions() { + if (playbookVersionsBuilder_ == null) { + playbookVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + playbookVersionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public Builder removePlaybookVersions(int index) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.remove(index); + onChanged(); + } else { + playbookVersionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder getPlaybookVersionsBuilder( + int index) { + return getPlaybookVersionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder getPlaybookVersionsOrBuilder( + int index) { + if (playbookVersionsBuilder_ == null) { + return playbookVersions_.get(index); + } else { + return playbookVersionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public java.util.List + getPlaybookVersionsOrBuilderList() { + if (playbookVersionsBuilder_ != null) { + return playbookVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(playbookVersions_); + } + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder addPlaybookVersionsBuilder() { + return getPlaybookVersionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder addPlaybookVersionsBuilder( + int index) { + return getPlaybookVersionsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + public java.util.List + getPlaybookVersionsBuilderList() { + return getPlaybookVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder> + getPlaybookVersionsFieldBuilder() { + if (playbookVersionsBuilder_ == null) { + playbookVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder>( + playbookVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + playbookVersions_ = null; + } + return playbookVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = 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.v3.ListPlaybookVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPlaybookVersionsResponse 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.v3.ListPlaybookVersionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsResponseOrBuilder.java new file mode 100644 index 000000000000..916f49125a55 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybookVersionsResponseOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListPlaybookVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + java.util.List getPlaybookVersionsList(); + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + com.google.cloud.dialogflow.cx.v3.PlaybookVersion getPlaybookVersions(int index); + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + int getPlaybookVersionsCount(); + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + java.util.List + getPlaybookVersionsOrBuilderList(); + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.PlaybookVersion playbook_versions = 1; + */ + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder getPlaybookVersionsOrBuilder( + int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksRequest.java new file mode 100644 index 000000000000..52f067ad7e06 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksRequest.java @@ -0,0 +1,948 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListPlaybooksRequest} + */ +public final class ListPlaybooksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListPlaybooksRequest) + ListPlaybooksRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListPlaybooksRequest.newBuilder() to construct. + private ListPlaybooksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPlaybooksRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPlaybooksRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.class, + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The agent to list playbooks from.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 list playbooks from.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + 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.v3.ListPlaybooksRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest other = + (com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest 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.v3.ListPlaybooksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest 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.v3.ListPlaybooksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest 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.v3.ListPlaybooksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest 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.v3.ListPlaybooksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest 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.v3.ListPlaybooksRequest 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.v3.ListPlaybooksRequest 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.v3.ListPlaybooksRequest 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
+   * [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListPlaybooksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListPlaybooksRequest) + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.class, + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest build() { + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest result = + new com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.v3.ListPlaybooksRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = 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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The agent to list playbooks from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 list playbooks from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 list playbooks from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 list playbooks from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 list playbooks from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = 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.v3.ListPlaybooksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListPlaybooksRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPlaybooksRequest 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.v3.ListPlaybooksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksRequestOrBuilder.java new file mode 100644 index 000000000000..b5246800a297 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListPlaybooksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListPlaybooksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to list playbooks from.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The agent to list playbooks from.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksResponse.java new file mode 100644 index 000000000000..75c017ba2892 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksResponse.java @@ -0,0 +1,1184 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListPlaybooksResponse} + */ +public final class ListPlaybooksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListPlaybooksResponse) + ListPlaybooksResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListPlaybooksResponse.newBuilder() to construct. + private ListPlaybooksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPlaybooksResponse() { + playbooks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPlaybooksResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.class, + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.Builder.class); + } + + public static final int PLAYBOOKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List playbooks_; + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + @java.lang.Override + public java.util.List getPlaybooksList() { + return playbooks_; + } + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + @java.lang.Override + public java.util.List + getPlaybooksOrBuilderList() { + return playbooks_; + } + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + @java.lang.Override + public int getPlaybooksCount() { + return playbooks_.size(); + } + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybooks(int index) { + return playbooks_.get(index); + } + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybooksOrBuilder(int index) { + return playbooks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < playbooks_.size(); i++) { + output.writeMessage(1, playbooks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < playbooks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, playbooks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.v3.ListPlaybooksResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse other = + (com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse) obj; + + if (!getPlaybooksList().equals(other.getPlaybooksList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getPlaybooksCount() > 0) { + hash = (37 * hash) + PLAYBOOKS_FIELD_NUMBER; + hash = (53 * hash) + getPlaybooksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse 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.v3.ListPlaybooksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse 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.v3.ListPlaybooksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse 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.v3.ListPlaybooksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse 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.v3.ListPlaybooksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse 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.v3.ListPlaybooksResponse 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.v3.ListPlaybooksResponse 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.v3.ListPlaybooksResponse 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
+   * [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListPlaybooksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListPlaybooksResponse) + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.class, + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (playbooksBuilder_ == null) { + playbooks_ = java.util.Collections.emptyList(); + } else { + playbooks_ = null; + playbooksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse build() { + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse result = + new com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse result) { + if (playbooksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + playbooks_ = java.util.Collections.unmodifiableList(playbooks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.playbooks_ = playbooks_; + } else { + result.playbooks_ = playbooksBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3.ListPlaybooksResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.getDefaultInstance()) + return this; + if (playbooksBuilder_ == null) { + if (!other.playbooks_.isEmpty()) { + if (playbooks_.isEmpty()) { + playbooks_ = other.playbooks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePlaybooksIsMutable(); + playbooks_.addAll(other.playbooks_); + } + onChanged(); + } + } else { + if (!other.playbooks_.isEmpty()) { + if (playbooksBuilder_.isEmpty()) { + playbooksBuilder_.dispose(); + playbooksBuilder_ = null; + playbooks_ = other.playbooks_; + bitField0_ = (bitField0_ & ~0x00000001); + playbooksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPlaybooksFieldBuilder() + : null; + } else { + playbooksBuilder_.addAllMessages(other.playbooks_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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: + { + com.google.cloud.dialogflow.cx.v3.Playbook m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Playbook.parser(), extensionRegistry); + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.add(m); + } else { + playbooksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List playbooks_ = + java.util.Collections.emptyList(); + + private void ensurePlaybooksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + playbooks_ = + new java.util.ArrayList(playbooks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + playbooksBuilder_; + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public java.util.List getPlaybooksList() { + if (playbooksBuilder_ == null) { + return java.util.Collections.unmodifiableList(playbooks_); + } else { + return playbooksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public int getPlaybooksCount() { + if (playbooksBuilder_ == null) { + return playbooks_.size(); + } else { + return playbooksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybooks(int index) { + if (playbooksBuilder_ == null) { + return playbooks_.get(index); + } else { + return playbooksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder setPlaybooks(int index, com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybooksIsMutable(); + playbooks_.set(index, value); + onChanged(); + } else { + playbooksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder setPlaybooks( + int index, com.google.cloud.dialogflow.cx.v3.Playbook.Builder builderForValue) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.set(index, builderForValue.build()); + onChanged(); + } else { + playbooksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder addPlaybooks(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybooksIsMutable(); + playbooks_.add(value); + onChanged(); + } else { + playbooksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder addPlaybooks(int index, com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybooksIsMutable(); + playbooks_.add(index, value); + onChanged(); + } else { + playbooksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder addPlaybooks( + com.google.cloud.dialogflow.cx.v3.Playbook.Builder builderForValue) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.add(builderForValue.build()); + onChanged(); + } else { + playbooksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder addPlaybooks( + int index, com.google.cloud.dialogflow.cx.v3.Playbook.Builder builderForValue) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.add(index, builderForValue.build()); + onChanged(); + } else { + playbooksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder addAllPlaybooks( + java.lang.Iterable values) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, playbooks_); + onChanged(); + } else { + playbooksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder clearPlaybooks() { + if (playbooksBuilder_ == null) { + playbooks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + playbooksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public Builder removePlaybooks(int index) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.remove(index); + onChanged(); + } else { + playbooksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Builder getPlaybooksBuilder(int index) { + return getPlaybooksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybooksOrBuilder(int index) { + if (playbooksBuilder_ == null) { + return playbooks_.get(index); + } else { + return playbooksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public java.util.List + getPlaybooksOrBuilderList() { + if (playbooksBuilder_ != null) { + return playbooksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(playbooks_); + } + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Builder addPlaybooksBuilder() { + return getPlaybooksFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Builder addPlaybooksBuilder(int index) { + return getPlaybooksFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + public java.util.List + getPlaybooksBuilderList() { + return getPlaybooksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + getPlaybooksFieldBuilder() { + if (playbooksBuilder_ == null) { + playbooksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder>( + playbooks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + playbooks_ = null; + } + return playbooksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = 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.v3.ListPlaybooksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListPlaybooksResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPlaybooksResponse 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.v3.ListPlaybooksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksResponseOrBuilder.java new file mode 100644 index 000000000000..ae33645e34bf --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListPlaybooksResponseOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListPlaybooksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListPlaybooksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + java.util.List getPlaybooksList(); + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + com.google.cloud.dialogflow.cx.v3.Playbook getPlaybooks(int index); + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + int getPlaybooksCount(); + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + java.util.List + getPlaybooksOrBuilderList(); + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook playbooks = 1; + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybooksOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsRequest.java new file mode 100644 index 000000000000..fe77d0764561 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsRequest.java @@ -0,0 +1,955 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.ListToolVersions][google.cloud.dialogflow.cx.v3.Tools.ListToolVersions].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListToolVersionsRequest} + */ +public final class ListToolVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListToolVersionsRequest) + ListToolVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListToolVersionsRequest.newBuilder() to construct. + private ListToolVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListToolVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListToolVersionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent of the tool versions.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * 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 parent of the tool versions.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + 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.v3.ListToolVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest other = + (com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest 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.v3.ListToolVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest 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.v3.ListToolVersionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest 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.v3.ListToolVersionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest 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.v3.ListToolVersionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest 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.v3.ListToolVersionsRequest 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.v3.ListToolVersionsRequest 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.v3.ListToolVersionsRequest 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
+   * [Tools.ListToolVersions][google.cloud.dialogflow.cx.v3.Tools.ListToolVersions].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListToolVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListToolVersionsRequest) + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest build() { + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest result = + new com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.v3.ListToolVersionsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = 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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent of the tool versions.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 parent of the tool versions.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 parent of the tool versions.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 parent of the tool versions.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 parent of the tool versions.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = 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.v3.ListToolVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListToolVersionsRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListToolVersionsRequest 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.v3.ListToolVersionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsRequestOrBuilder.java new file mode 100644 index 000000000000..c744626152f0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListToolVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListToolVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent of the tool versions.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent of the tool versions.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsResponse.java new file mode 100644 index 000000000000..cbb4b387cbf3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsResponse.java @@ -0,0 +1,1186 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Tools.ListToolVersions][google.cloud.dialogflow.cx.v3.Tools.ListToolVersions].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListToolVersionsResponse} + */ +public final class ListToolVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListToolVersionsResponse) + ListToolVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListToolVersionsResponse.newBuilder() to construct. + private ListToolVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListToolVersionsResponse() { + toolVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListToolVersionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.Builder.class); + } + + public static final int TOOL_VERSIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List toolVersions_; + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + @java.lang.Override + public java.util.List getToolVersionsList() { + return toolVersions_; + } + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + @java.lang.Override + public java.util.List + getToolVersionsOrBuilderList() { + return toolVersions_; + } + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + @java.lang.Override + public int getToolVersionsCount() { + return toolVersions_.size(); + } + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolVersion getToolVersions(int index) { + return toolVersions_.get(index); + } + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder getToolVersionsOrBuilder( + int index) { + return toolVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < toolVersions_.size(); i++) { + output.writeMessage(1, toolVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < toolVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, toolVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.v3.ListToolVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse other = + (com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse) obj; + + if (!getToolVersionsList().equals(other.getToolVersionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getToolVersionsCount() > 0) { + hash = (37 * hash) + TOOL_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getToolVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse 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.v3.ListToolVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse 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.v3.ListToolVersionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse 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.v3.ListToolVersionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse 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.v3.ListToolVersionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse 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.v3.ListToolVersionsResponse 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.v3.ListToolVersionsResponse 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.v3.ListToolVersionsResponse 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
+   * [Tools.ListToolVersions][google.cloud.dialogflow.cx.v3.Tools.ListToolVersions].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListToolVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListToolVersionsResponse) + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (toolVersionsBuilder_ == null) { + toolVersions_ = java.util.Collections.emptyList(); + } else { + toolVersions_ = null; + toolVersionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse build() { + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse result = + new com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse result) { + if (toolVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + toolVersions_ = java.util.Collections.unmodifiableList(toolVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.toolVersions_ = toolVersions_; + } else { + result.toolVersions_ = toolVersionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3.ListToolVersionsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.getDefaultInstance()) + return this; + if (toolVersionsBuilder_ == null) { + if (!other.toolVersions_.isEmpty()) { + if (toolVersions_.isEmpty()) { + toolVersions_ = other.toolVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureToolVersionsIsMutable(); + toolVersions_.addAll(other.toolVersions_); + } + onChanged(); + } + } else { + if (!other.toolVersions_.isEmpty()) { + if (toolVersionsBuilder_.isEmpty()) { + toolVersionsBuilder_.dispose(); + toolVersionsBuilder_ = null; + toolVersions_ = other.toolVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + toolVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getToolVersionsFieldBuilder() + : null; + } else { + toolVersionsBuilder_.addAllMessages(other.toolVersions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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: + { + com.google.cloud.dialogflow.cx.v3.ToolVersion m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ToolVersion.parser(), extensionRegistry); + if (toolVersionsBuilder_ == null) { + ensureToolVersionsIsMutable(); + toolVersions_.add(m); + } else { + toolVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List toolVersions_ = + java.util.Collections.emptyList(); + + private void ensureToolVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + toolVersions_ = + new java.util.ArrayList(toolVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolVersion, + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder, + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder> + toolVersionsBuilder_; + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public java.util.List getToolVersionsList() { + if (toolVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(toolVersions_); + } else { + return toolVersionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public int getToolVersionsCount() { + if (toolVersionsBuilder_ == null) { + return toolVersions_.size(); + } else { + return toolVersionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion getToolVersions(int index) { + if (toolVersionsBuilder_ == null) { + return toolVersions_.get(index); + } else { + return toolVersionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder setToolVersions(int index, com.google.cloud.dialogflow.cx.v3.ToolVersion value) { + if (toolVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolVersionsIsMutable(); + toolVersions_.set(index, value); + onChanged(); + } else { + toolVersionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder setToolVersions( + int index, com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder builderForValue) { + if (toolVersionsBuilder_ == null) { + ensureToolVersionsIsMutable(); + toolVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + toolVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder addToolVersions(com.google.cloud.dialogflow.cx.v3.ToolVersion value) { + if (toolVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolVersionsIsMutable(); + toolVersions_.add(value); + onChanged(); + } else { + toolVersionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder addToolVersions(int index, com.google.cloud.dialogflow.cx.v3.ToolVersion value) { + if (toolVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolVersionsIsMutable(); + toolVersions_.add(index, value); + onChanged(); + } else { + toolVersionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder addToolVersions( + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder builderForValue) { + if (toolVersionsBuilder_ == null) { + ensureToolVersionsIsMutable(); + toolVersions_.add(builderForValue.build()); + onChanged(); + } else { + toolVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder addToolVersions( + int index, com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder builderForValue) { + if (toolVersionsBuilder_ == null) { + ensureToolVersionsIsMutable(); + toolVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + toolVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder addAllToolVersions( + java.lang.Iterable values) { + if (toolVersionsBuilder_ == null) { + ensureToolVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, toolVersions_); + onChanged(); + } else { + toolVersionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder clearToolVersions() { + if (toolVersionsBuilder_ == null) { + toolVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + toolVersionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public Builder removeToolVersions(int index) { + if (toolVersionsBuilder_ == null) { + ensureToolVersionsIsMutable(); + toolVersions_.remove(index); + onChanged(); + } else { + toolVersionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder getToolVersionsBuilder(int index) { + return getToolVersionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder getToolVersionsOrBuilder( + int index) { + if (toolVersionsBuilder_ == null) { + return toolVersions_.get(index); + } else { + return toolVersionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public java.util.List + getToolVersionsOrBuilderList() { + if (toolVersionsBuilder_ != null) { + return toolVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(toolVersions_); + } + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder addToolVersionsBuilder() { + return getToolVersionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder addToolVersionsBuilder(int index) { + return getToolVersionsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of tool versions. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + public java.util.List + getToolVersionsBuilderList() { + return getToolVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolVersion, + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder, + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder> + getToolVersionsFieldBuilder() { + if (toolVersionsBuilder_ == null) { + toolVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolVersion, + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder, + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder>( + toolVersions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + toolVersions_ = null; + } + return toolVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = 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.v3.ListToolVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListToolVersionsResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListToolVersionsResponse 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.v3.ListToolVersionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsResponseOrBuilder.java new file mode 100644 index 000000000000..cdde3290fc22 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolVersionsResponseOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListToolVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListToolVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + java.util.List getToolVersionsList(); + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + com.google.cloud.dialogflow.cx.v3.ToolVersion getToolVersions(int index); + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + int getToolVersionsCount(); + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + java.util.List + getToolVersionsOrBuilderList(); + + /** + * + * + *
+   * The list of tool versions. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ToolVersion tool_versions = 1; + */ + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder getToolVersionsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsRequest.java new file mode 100644 index 000000000000..726ca4afc499 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsRequest.java @@ -0,0 +1,947 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.ListTools][google.cloud.dialogflow.cx.v3.Tools.ListTools].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListToolsRequest} + */ +public final class ListToolsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListToolsRequest) + ListToolsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListToolsRequest.newBuilder() to construct. + private ListToolsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListToolsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListToolsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListToolsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListToolsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The agent to list the Tools from.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 list the Tools from.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + 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.v3.ListToolsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListToolsRequest other = + (com.google.cloud.dialogflow.cx.v3.ListToolsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsRequest 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.v3.ListToolsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsRequest 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.v3.ListToolsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsRequest 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.v3.ListToolsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsRequest 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.v3.ListToolsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsRequest 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.v3.ListToolsRequest 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.v3.ListToolsRequest 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.v3.ListToolsRequest 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
+   * [Tools.ListTools][google.cloud.dialogflow.cx.v3.Tools.ListTools].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListToolsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListToolsRequest) + com.google.cloud.dialogflow.cx.v3.ListToolsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListToolsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListToolsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListToolsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListToolsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolsRequest build() { + com.google.cloud.dialogflow.cx.v3.ListToolsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListToolsRequest result = + new com.google.cloud.dialogflow.cx.v3.ListToolsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ListToolsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.v3.ListToolsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListToolsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListToolsRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListToolsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = 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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The agent to list the Tools from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 list the Tools from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 list the Tools from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 list the Tools from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 list the Tools from.
+     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = 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.v3.ListToolsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListToolsRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListToolsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListToolsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListToolsRequest 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.v3.ListToolsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsRequestOrBuilder.java new file mode 100644 index 000000000000..7b0c2f2f037c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListToolsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListToolsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to list the Tools from.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The agent to list the Tools from.
+   * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsResponse.java new file mode 100644 index 000000000000..6ac59d22dd4c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsResponse.java @@ -0,0 +1,1180 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Tools.ListTools][google.cloud.dialogflow.cx.v3.Tools.ListTools].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListToolsResponse} + */ +public final class ListToolsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ListToolsResponse) + ListToolsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListToolsResponse.newBuilder() to construct. + private ListToolsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListToolsResponse() { + tools_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListToolsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListToolsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListToolsResponse.Builder.class); + } + + public static final int TOOLS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tools_; + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + @java.lang.Override + public java.util.List getToolsList() { + return tools_; + } + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + @java.lang.Override + public java.util.List + getToolsOrBuilderList() { + return tools_; + } + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + @java.lang.Override + public int getToolsCount() { + return tools_.size(); + } + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool getTools(int index) { + return tools_.get(index); + } + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolsOrBuilder(int index) { + return tools_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < tools_.size(); i++) { + output.writeMessage(1, tools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tools_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.v3.ListToolsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListToolsResponse other = + (com.google.cloud.dialogflow.cx.v3.ListToolsResponse) obj; + + if (!getToolsList().equals(other.getToolsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getToolsCount() > 0) { + hash = (37 * hash) + TOOLS_FIELD_NUMBER; + hash = (53 * hash) + getToolsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsResponse 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.v3.ListToolsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsResponse 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.v3.ListToolsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsResponse 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.v3.ListToolsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsResponse 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.v3.ListToolsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsResponse 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.v3.ListToolsResponse 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.v3.ListToolsResponse 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.v3.ListToolsResponse 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
+   * [Tools.ListTools][google.cloud.dialogflow.cx.v3.Tools.ListTools].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListToolsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListToolsResponse) + com.google.cloud.dialogflow.cx.v3.ListToolsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListToolsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListToolsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ListToolsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (toolsBuilder_ == null) { + tools_ = java.util.Collections.emptyList(); + } else { + tools_ = null; + toolsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolsResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListToolsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolsResponse build() { + com.google.cloud.dialogflow.cx.v3.ListToolsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListToolsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListToolsResponse result = + new com.google.cloud.dialogflow.cx.v3.ListToolsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.ListToolsResponse result) { + if (toolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tools_ = java.util.Collections.unmodifiableList(tools_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tools_ = tools_; + } else { + result.tools_ = toolsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ListToolsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3.ListToolsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListToolsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListToolsResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListToolsResponse.getDefaultInstance()) + return this; + if (toolsBuilder_ == null) { + if (!other.tools_.isEmpty()) { + if (tools_.isEmpty()) { + tools_ = other.tools_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureToolsIsMutable(); + tools_.addAll(other.tools_); + } + onChanged(); + } + } else { + if (!other.tools_.isEmpty()) { + if (toolsBuilder_.isEmpty()) { + toolsBuilder_.dispose(); + toolsBuilder_ = null; + tools_ = other.tools_; + bitField0_ = (bitField0_ & ~0x00000001); + toolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getToolsFieldBuilder() + : null; + } else { + toolsBuilder_.addAllMessages(other.tools_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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: + { + com.google.cloud.dialogflow.cx.v3.Tool m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Tool.parser(), extensionRegistry); + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(m); + } else { + toolsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List tools_ = + java.util.Collections.emptyList(); + + private void ensureToolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tools_ = new java.util.ArrayList(tools_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + toolsBuilder_; + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public java.util.List getToolsList() { + if (toolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tools_); + } else { + return toolsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public int getToolsCount() { + if (toolsBuilder_ == null) { + return tools_.size(); + } else { + return toolsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Tool getTools(int index) { + if (toolsBuilder_ == null) { + return tools_.get(index); + } else { + return toolsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder setTools(int index, com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.set(index, value); + onChanged(); + } else { + toolsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder setTools( + int index, com.google.cloud.dialogflow.cx.v3.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.set(index, builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder addTools(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.add(value); + onChanged(); + } else { + toolsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder addTools(int index, com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.add(index, value); + onChanged(); + } else { + toolsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder addTools(com.google.cloud.dialogflow.cx.v3.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder addTools( + int index, com.google.cloud.dialogflow.cx.v3.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(index, builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder addAllTools( + java.lang.Iterable values) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tools_); + onChanged(); + } else { + toolsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder clearTools() { + if (toolsBuilder_ == null) { + tools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + toolsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public Builder removeTools(int index) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.remove(index); + onChanged(); + } else { + toolsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Builder getToolsBuilder(int index) { + return getToolsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolsOrBuilder(int index) { + if (toolsBuilder_ == null) { + return tools_.get(index); + } else { + return toolsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public java.util.List + getToolsOrBuilderList() { + if (toolsBuilder_ != null) { + return toolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tools_); + } + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Builder addToolsBuilder() { + return getToolsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Builder addToolsBuilder(int index) { + return getToolsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + public java.util.List getToolsBuilderList() { + return getToolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + getToolsFieldBuilder() { + if (toolsBuilder_ == null) { + toolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder>( + tools_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tools_ = null; + } + return toolsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = 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.v3.ListToolsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListToolsResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListToolsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListToolsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ListToolsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListToolsResponse 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.v3.ListToolsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsResponseOrBuilder.java new file mode 100644 index 000000000000..1fc04ac0e281 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListToolsResponseOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ListToolsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListToolsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + java.util.List getToolsList(); + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + com.google.cloud.dialogflow.cx.v3.Tool getTools(int index); + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + int getToolsCount(); + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + java.util.List getToolsOrBuilderList(); + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Tool tools = 1; + */ + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/LlmModelSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/LlmModelSettings.java new file mode 100644 index 000000000000..bb9142d69daa --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/LlmModelSettings.java @@ -0,0 +1,823 @@ +/* + * Copyright 2026 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/v3/generative_settings.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Settings for LLM models.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.LlmModelSettings} + */ +public final class LlmModelSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.LlmModelSettings) + LlmModelSettingsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use LlmModelSettings.newBuilder() to construct. + private LlmModelSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LlmModelSettings() { + model_ = ""; + promptText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LlmModelSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.class, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + + /** + * + * + *
+   * The selected LLM model.
+   * 
+ * + * string model = 1; + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + + /** + * + * + *
+   * The selected LLM model.
+   * 
+ * + * string model = 1; + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROMPT_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object promptText_ = ""; + + /** + * + * + *
+   * The custom prompt to use.
+   * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + @java.lang.Override + public java.lang.String getPromptText() { + java.lang.Object ref = promptText_; + 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(); + promptText_ = s; + return s; + } + } + + /** + * + * + *
+   * The custom prompt to use.
+   * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPromptTextBytes() { + java.lang.Object ref = promptText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promptText_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, promptText_); + } + 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(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, promptText_); + } + 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.v3.LlmModelSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.LlmModelSettings other = + (com.google.cloud.dialogflow.cx.v3.LlmModelSettings) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getPromptText().equals(other.getPromptText())) 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) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + PROMPT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getPromptText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.LlmModelSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.LlmModelSettings 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.v3.LlmModelSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.LlmModelSettings 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.v3.LlmModelSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.LlmModelSettings 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.v3.LlmModelSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.LlmModelSettings 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.v3.LlmModelSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.LlmModelSettings 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.v3.LlmModelSettings 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.v3.LlmModelSettings 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.v3.LlmModelSettings 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; + } + + /** + * + * + *
+   * Settings for LLM models.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.LlmModelSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.LlmModelSettings) + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.class, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.LlmModelSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + model_ = ""; + promptText_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_LlmModelSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings build() { + com.google.cloud.dialogflow.cx.v3.LlmModelSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.LlmModelSettings result = + new com.google.cloud.dialogflow.cx.v3.LlmModelSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.LlmModelSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.model_ = model_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.promptText_ = promptText_; + } + } + + @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.v3.LlmModelSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.LlmModelSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.LlmModelSettings other) { + if (other == com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPromptText().isEmpty()) { + promptText_ = other.promptText_; + bitField0_ |= 0x00000002; + 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: + { + model_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + promptText_ = input.readStringRequireUtf8(); + 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 java.lang.Object model_ = ""; + + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + model_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object promptText_ = ""; + + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + public java.lang.String getPromptText() { + java.lang.Object ref = promptText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + promptText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + public com.google.protobuf.ByteString getPromptTextBytes() { + java.lang.Object ref = promptText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promptText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @param value The promptText to set. + * @return This builder for chaining. + */ + public Builder setPromptText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + promptText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearPromptText() { + promptText_ = getDefaultInstance().getPromptText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @param value The bytes for promptText to set. + * @return This builder for chaining. + */ + public Builder setPromptTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + promptText_ = 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.v3.LlmModelSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.LlmModelSettings) + private static final com.google.cloud.dialogflow.cx.v3.LlmModelSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.LlmModelSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.LlmModelSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LlmModelSettings 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.v3.LlmModelSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/LlmModelSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/LlmModelSettingsOrBuilder.java new file mode 100644 index 000000000000..d1bd94a61f7c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/LlmModelSettingsOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2026 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/v3/generative_settings.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface LlmModelSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.LlmModelSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The selected LLM model.
+   * 
+ * + * string model = 1; + * + * @return The model. + */ + java.lang.String getModel(); + + /** + * + * + *
+   * The selected LLM model.
+   * 
+ * + * string model = 1; + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * The custom prompt to use.
+   * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + java.lang.String getPromptText(); + + /** + * + * + *
+   * The custom prompt to use.
+   * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + com.google.protobuf.ByteString getPromptTextBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Match.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Match.java index a7aeb7f0797e..544062fa5399 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Match.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Match.java @@ -160,7 +160,8 @@ public enum MatchType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The query was handled by a [`Playbook`][Playbook].
+     * The query was handled by a
+     * [`Playbook`][google.cloud.dialogflow.cx.v3.Playbook].
      * 
* * PLAYBOOK = 9; @@ -261,7 +262,8 @@ public enum MatchType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The query was handled by a [`Playbook`][Playbook].
+     * The query was handled by a
+     * [`Playbook`][google.cloud.dialogflow.cx.v3.Playbook].
      * 
* * PLAYBOOK = 9; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/OutputAudioEncoding.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/OutputAudioEncoding.java index 6735e1687f9e..1cf918e54bb8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/OutputAudioEncoding.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/OutputAudioEncoding.java @@ -45,6 +45,7 @@ public enum OutputAudioEncoding implements com.google.protobuf.ProtocolMessageEn *
    * Uncompressed 16-bit signed little-endian samples (Linear PCM).
    * Audio content returned as LINEAR16 also contains a WAV header.
+   * LINT: LEGACY_NAMES
    * 
* * OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; @@ -65,6 +66,7 @@ public enum OutputAudioEncoding implements com.google.protobuf.ProtocolMessageEn * *
    * MP3 audio at 64kbps.
+   * LINT: LEGACY_NAMES
    * 
* * OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; @@ -123,6 +125,7 @@ public enum OutputAudioEncoding implements com.google.protobuf.ProtocolMessageEn *
    * Uncompressed 16-bit signed little-endian samples (Linear PCM).
    * Audio content returned as LINEAR16 also contains a WAV header.
+   * LINT: LEGACY_NAMES
    * 
* * OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; @@ -145,6 +148,7 @@ public enum OutputAudioEncoding implements com.google.protobuf.ProtocolMessageEn * *
    * MP3 audio at 64kbps.
+   * LINT: LEGACY_NAMES
    * 
* * OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/OutputState.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/OutputState.java new file mode 100644 index 000000000000..d13fa58b7f0c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/OutputState.java @@ -0,0 +1,248 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Output state.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.OutputState} + */ +public enum OutputState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified output.
+   * 
+ * + * OUTPUT_STATE_UNSPECIFIED = 0; + */ + OUTPUT_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * Succeeded.
+   * 
+ * + * OUTPUT_STATE_OK = 1; + */ + OUTPUT_STATE_OK(1), + /** + * + * + *
+   * Cancelled.
+   * 
+ * + * OUTPUT_STATE_CANCELLED = 2; + */ + OUTPUT_STATE_CANCELLED(2), + /** + * + * + *
+   * Failed.
+   * 
+ * + * OUTPUT_STATE_FAILED = 3; + */ + OUTPUT_STATE_FAILED(3), + /** + * + * + *
+   * Escalated.
+   * 
+ * + * OUTPUT_STATE_ESCALATED = 4; + */ + OUTPUT_STATE_ESCALATED(4), + /** + * + * + *
+   * Pending.
+   * 
+ * + * OUTPUT_STATE_PENDING = 5; + */ + OUTPUT_STATE_PENDING(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified output.
+   * 
+ * + * OUTPUT_STATE_UNSPECIFIED = 0; + */ + public static final int OUTPUT_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Succeeded.
+   * 
+ * + * OUTPUT_STATE_OK = 1; + */ + public static final int OUTPUT_STATE_OK_VALUE = 1; + + /** + * + * + *
+   * Cancelled.
+   * 
+ * + * OUTPUT_STATE_CANCELLED = 2; + */ + public static final int OUTPUT_STATE_CANCELLED_VALUE = 2; + + /** + * + * + *
+   * Failed.
+   * 
+ * + * OUTPUT_STATE_FAILED = 3; + */ + public static final int OUTPUT_STATE_FAILED_VALUE = 3; + + /** + * + * + *
+   * Escalated.
+   * 
+ * + * OUTPUT_STATE_ESCALATED = 4; + */ + public static final int OUTPUT_STATE_ESCALATED_VALUE = 4; + + /** + * + * + *
+   * Pending.
+   * 
+ * + * OUTPUT_STATE_PENDING = 5; + */ + public static final int OUTPUT_STATE_PENDING_VALUE = 5; + + 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 OutputState 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 OutputState forNumber(int value) { + switch (value) { + case 0: + return OUTPUT_STATE_UNSPECIFIED; + case 1: + return OUTPUT_STATE_OK; + case 2: + return OUTPUT_STATE_CANCELLED; + case 3: + return OUTPUT_STATE_FAILED; + case 4: + return OUTPUT_STATE_ESCALATED; + case 5: + return OUTPUT_STATE_PENDING; + 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 OutputState findValueByNumber(int number) { + return OutputState.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.v3.TraceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final OutputState[] VALUES = values(); + + public static OutputState 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 OutputState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.OutputState) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java index f7130eb97315..19d2d318d8d2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java @@ -137,7 +137,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\032initial_prompt_fulfillment\030\003" + " \001(\0132*.google.cloud.dialogflow.cx.v3.FulfillmentB\003\340A\002\022L\n" + "\027reprompt_event_handlers\030\005" - + " \003(\0132+.google.cloud.dialogflow.cx.v3.EventHandler\"\200\002\n" + + " \003(\0132+.google.cloud.dialogflow.cx.v3.EventHandler\"\304\002\n" + "\014EventHandler\022\021\n" + "\004name\030\006 \001(\tB\003\340A\003\022\022\n" + "\005event\030\004 \001(\tB\003\340A\002\022G\n" @@ -146,7 +146,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013target_page\030\002 \001(\tB#\372A \n" + "\036dialogflow.googleapis.com/PageH\000\022:\n" + "\013target_flow\030\003 \001(\tB#\372A \n" - + "\036dialogflow.googleapis.com/FlowH\000B\010\n" + + "\036dialogflow.googleapis.com/FlowH\000\022B\n" + + "\017target_playbook\030\007 \001(\tB\'\372A$\n" + + "\"dialogflow.googleapis.com/PlaybookH\000B\010\n" + "\006target\"\323\002\n" + "\017TransitionRoute\022\021\n" + "\004name\030\006 \001(\tB\003\340A\003\022\030\n" @@ -177,12 +179,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021CreatePageRequest\0226\n" + "\006parent\030\001 \001(\tB&\340A\002\372A" + " \022\036dialogflow.googleapis.com/Page\0226\n" - + "\004page\030\002" - + " \001(\0132#.google.cloud.dialogflow.cx.v3.PageB\003\340A\002\022\025\n\r" + + "\004page\030\002 " + + "\001(\0132#.google.cloud.dialogflow.cx.v3.PageB\003\340A\002\022\025\n\r" + "language_code\030\003 \001(\t\"\223\001\n" + "\021UpdatePageRequest\0226\n" - + "\004page\030\001 \001(\0132#.g" - + "oogle.cloud.dialogflow.cx.v3.PageB\003\340A\002\022\025\n\r" + + "\004page\030\001" + + " \001(\0132#.google.cloud.dialogflow.cx.v3.PageB\003\340A\002\022\025\n\r" + "language_code\030\002 \001(\t\022/\n" + "\013update_mask\030\003 \001(\0132\032.google.protobuf.FieldMask\"X\n" + "\021DeletePageRequest\0224\n" @@ -191,41 +193,41 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005force\030\002 \001(\010\"\321\002\n" + "\032KnowledgeConnectorSettings\022\017\n" + "\007enabled\030\001 \001(\010\022G\n" - + "\023trigger_fulfillment\030\003 \001(\0132*." - + "google.cloud.dialogflow.cx.v3.Fulfillment\022:\n" + + "\023trigger_fulfillment\030\003" + + " \001(\0132*.google.cloud.dialogflow.cx.v3.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.googleapis.com/FlowH\000\022W\n" - + "\026data_store_connections\030\006 \003(\01322.goog" - + "le.cloud.dialogflow.cx.v3.DataStoreConnectionB\003\340A\001B\010\n" + + "\026data_store_connections\030\006 \003(\01322.google.cloud.dia" + + "logflow.cx.v3.DataStoreConnectionB\003\340A\001B\010\n" + "\006target2\224\010\n" + "\005Pages\022\273\001\n" - + "\tListPages\022/.google.cloud.dialogflow.cx.v3.Lis" - + "tPagesRequest\0320.google.cloud.dialogflow." - + "cx.v3.ListPagesResponse\"K\332A\006parent\202\323\344\223\002<" - + "\022:/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages\022\250\001\n" - + "\007GetPage\022-.google.cloud.dialogflow.cx.v3.GetPageRequest\032" - + "#.google.cloud.dialogflow.cx.v3.Page\"I\332A" - + "\004name\202\323\344\223\002<\022:/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}\022\273\001\n\n" - + "CreatePage\0220.google.cloud.dialogflow.cx.v3.C" - + "reatePageRequest\032#.google.cloud.dialogfl" - + "ow.cx.v3.Page\"V\332A\013parent,page\202\323\344\223\002B\":/v3" - + "/{parent=projects/*/locations/*/agents/*/flows/*}/pages:\004page\022\305\001\n\n" - + "UpdatePage\0220.google.cloud.dialogflow.cx.v3.UpdatePageR" - + "equest\032#.google.cloud.dialogflow.cx.v3.P" - + "age\"`\332A\020page,update_mask\202\323\344\223\002G2?/v3/{pag" - + "e.name=projects/*/locations/*/agents/*/flows/*/pages/*}:\004page\022\241\001\n\n" - + "DeletePage\0220.google.cloud.dialogflow.cx.v3.DeletePageR" - + "equest\032\026.google.protobuf.Empty\"I\332A\004name\202" - + "\323\344\223\002<*:/v3/{name=projects/*/locations/*/" - + "agents/*/flows/*/pages/*}\032x\312A\031dialogflow" - + ".googleapis.com\322AYhttps://www.googleapis" - + ".com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\254\001\n" - + "!com.google.cloud.dialogflow.cx.v3B\tPageProtoP\001Z1" - + "cloud.google.com/go/dialogflow/cx/apiv3/" - + "cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud.Dialogflow" - + ".Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3b\006proto3" + + "\tListPages\022/.google.cloud.dialogflow.cx.v3.ListPagesReques" + + "t\0320.google.cloud.dialogflow.cx.v3.ListPa" + + "gesResponse\"K\332A\006parent\202\323\344\223\002<\022:/v3/{paren" + + "t=projects/*/locations/*/agents/*/flows/*}/pages\022\250\001\n" + + "\007GetPage\022-.google.cloud.dialogflow.cx.v3.GetPageRequest\032#.google.clo" + + "ud.dialogflow.cx.v3.Page\"I\332A\004name\202\323\344\223\002<\022" + + ":/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}\022\273\001\n\n" + + "CreatePage\0220.google.cloud.dialogflow.cx.v3.CreatePageReq" + + "uest\032#.google.cloud.dialogflow.cx.v3.Pag" + + "e\"V\332A\013parent,page\202\323\344\223\002B\":/v3/{parent=pro" + + "jects/*/locations/*/agents/*/flows/*}/pages:\004page\022\305\001\n\n" + + "UpdatePage\0220.google.cloud.dialogflow.cx.v3.UpdatePageRequest\032#.goo" + + "gle.cloud.dialogflow.cx.v3.Page\"`\332A\020page" + + ",update_mask\202\323\344\223\002G2?/v3/{page.name=proje" + + "cts/*/locations/*/agents/*/flows/*/pages/*}:\004page\022\241\001\n\n" + + "DeletePage\0220.google.cloud.dialogflow.cx.v3.DeletePageRequest\032\026.goo" + + "gle.protobuf.Empty\"I\332A\004name\202\323\344\223\002<*:/v3/{" + + "name=projects/*/locations/*/agents/*/flo" + + "ws/*/pages/*}\032x\312A\031dialogflow.googleapis." + + "com\322AYhttps://www.googleapis.com/auth/cl" + + "oud-platform,https://www.googleapis.com/auth/dialogflowB\254\001\n" + + "!com.google.cloud.dialogflow.cx.v3B\tPageProtoP\001Z1cloud.google" + + ".com/go/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002" + + "DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!Goo" + + "gle::Cloud::Dialogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -298,7 +300,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_EventHandler_descriptor, new java.lang.String[] { - "Name", "Event", "TriggerFulfillment", "TargetPage", "TargetFlow", "Target", + "Name", + "Event", + "TriggerFulfillment", + "TargetPage", + "TargetFlow", + "TargetPlaybook", + "Target", }); internal_static_google_cloud_dialogflow_cx_v3_TransitionRoute_descriptor = getDescriptor().getMessageTypes().get(3); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinition.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinition.java new file mode 100644 index 000000000000..da14fc4497ae --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinition.java @@ -0,0 +1,1600 @@ +/* + * Copyright 2026 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/v3/parameter_definition.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Defines the properties of a parameter.
+ * Used to define parameters used in the agent and the
+ * input / output parameters for each fulfillment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ParameterDefinition} + */ +public final class ParameterDefinition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ParameterDefinition) + ParameterDefinitionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ParameterDefinition.newBuilder() to construct. + private ParameterDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ParameterDefinition() { + name_ = ""; + type_ = 0; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ParameterDefinition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_ParameterDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_ParameterDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.class, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder.class); + } + + /** + * + * + *
+   * Parameter types are used for validation.
+   * These types are consistent with
+   * [google.protobuf.Value][google.protobuf.Value].
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType} + */ + public enum ParameterType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified. No validation will be performed.
+     * 
+ * + * PARAMETER_TYPE_UNSPECIFIED = 0; + */ + PARAMETER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Represents any string value.
+     * 
+ * + * STRING = 1; + */ + STRING(1), + /** + * + * + *
+     * Represents any number value.
+     * 
+ * + * NUMBER = 2; + */ + NUMBER(2), + /** + * + * + *
+     * Represents a boolean value.
+     * 
+ * + * BOOLEAN = 3; + */ + BOOLEAN(3), + /** + * + * + *
+     * Represents a null value.
+     * 
+ * + * NULL = 4; + */ + NULL(4), + /** + * + * + *
+     * Represents any object value.
+     * 
+ * + * OBJECT = 5; + */ + OBJECT(5), + /** + * + * + *
+     * Represents a repeated value.
+     * 
+ * + * LIST = 6; + */ + LIST(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified. No validation will be performed.
+     * 
+ * + * PARAMETER_TYPE_UNSPECIFIED = 0; + */ + public static final int PARAMETER_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Represents any string value.
+     * 
+ * + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + + /** + * + * + *
+     * Represents any number value.
+     * 
+ * + * NUMBER = 2; + */ + public static final int NUMBER_VALUE = 2; + + /** + * + * + *
+     * Represents a boolean value.
+     * 
+ * + * BOOLEAN = 3; + */ + public static final int BOOLEAN_VALUE = 3; + + /** + * + * + *
+     * Represents a null value.
+     * 
+ * + * NULL = 4; + */ + public static final int NULL_VALUE = 4; + + /** + * + * + *
+     * Represents any object value.
+     * 
+ * + * OBJECT = 5; + */ + public static final int OBJECT_VALUE = 5; + + /** + * + * + *
+     * Represents a repeated value.
+     * 
+ * + * LIST = 6; + */ + public static final int LIST_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 ParameterType 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 ParameterType forNumber(int value) { + switch (value) { + case 0: + return PARAMETER_TYPE_UNSPECIFIED; + case 1: + return STRING; + case 2: + return NUMBER; + case 3: + return BOOLEAN; + case 4: + return NULL; + case 5: + return OBJECT; + case 6: + return LIST; + 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 ParameterType findValueByNumber(int number) { + return ParameterType.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.v3.ParameterDefinition.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ParameterType[] VALUES = values(); + + public static ParameterType 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 ParameterType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_ = 0; + + /** + * + * + *
+   * Type of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + @java.lang.Deprecated + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Type of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @return The type. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType getType() { + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType result = + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType.forNumber(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType.UNRECOGNIZED + : result; + } + + public static final int TYPE_SCHEMA_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3.TypeSchema typeSchema_; + + /** + * + * + *
+   * Optional. Type schema of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the typeSchema field is set. + */ + @java.lang.Override + public boolean hasTypeSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Type schema of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The typeSchema. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema getTypeSchema() { + return typeSchema_ == null + ? com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance() + : typeSchema_; + } + + /** + * + * + *
+   * Optional. Type schema of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder getTypeSchemaOrBuilder() { + return typeSchema_ == null + ? com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance() + : typeSchema_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Human-readable description of the parameter. Limited to 300 characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Human-readable description of the parameter. Limited to 300 characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ + != com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType + .PARAMETER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getTypeSchema()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ + != com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType + .PARAMETER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTypeSchema()); + } + 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.v3.ParameterDefinition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ParameterDefinition other = + (com.google.cloud.dialogflow.cx.v3.ParameterDefinition) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (hasTypeSchema() != other.hasTypeSchema()) return false; + if (hasTypeSchema()) { + if (!getTypeSchema().equals(other.getTypeSchema())) return false; + } + if (!getDescription().equals(other.getDescription())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasTypeSchema()) { + hash = (37 * hash) + TYPE_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getTypeSchema().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ParameterDefinition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ParameterDefinition 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.v3.ParameterDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ParameterDefinition 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.v3.ParameterDefinition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ParameterDefinition 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.v3.ParameterDefinition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ParameterDefinition 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.v3.ParameterDefinition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ParameterDefinition 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.v3.ParameterDefinition 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.v3.ParameterDefinition 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.v3.ParameterDefinition 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; + } + + /** + * + * + *
+   * Defines the properties of a parameter.
+   * Used to define parameters used in the agent and the
+   * input / output parameters for each fulfillment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ParameterDefinition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ParameterDefinition) + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_ParameterDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_ParameterDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.class, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ParameterDefinition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTypeSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = 0; + typeSchema_ = null; + if (typeSchemaBuilder_ != null) { + typeSchemaBuilder_.dispose(); + typeSchemaBuilder_ = null; + } + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_ParameterDefinition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition build() { + com.google.cloud.dialogflow.cx.v3.ParameterDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition buildPartial() { + com.google.cloud.dialogflow.cx.v3.ParameterDefinition result = + new com.google.cloud.dialogflow.cx.v3.ParameterDefinition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ParameterDefinition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.typeSchema_ = typeSchemaBuilder_ == null ? typeSchema_ : typeSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.ParameterDefinition) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ParameterDefinition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ParameterDefinition other) { + if (other == com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasTypeSchema()) { + mergeTypeSchema(other.getTypeSchema()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + input.readMessage(getTypeSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int type_ = 0; + + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + @java.lang.Deprecated + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @return The type. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType getType() { + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType result = + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType.forNumber(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @param value The type to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setType( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.TypeSchema typeSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema, + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder> + typeSchemaBuilder_; + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the typeSchema field is set. + */ + public boolean hasTypeSchema() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The typeSchema. + */ + public com.google.cloud.dialogflow.cx.v3.TypeSchema getTypeSchema() { + if (typeSchemaBuilder_ == null) { + return typeSchema_ == null + ? com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance() + : typeSchema_; + } else { + return typeSchemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTypeSchema(com.google.cloud.dialogflow.cx.v3.TypeSchema value) { + if (typeSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeSchema_ = value; + } else { + typeSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTypeSchema( + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder builderForValue) { + if (typeSchemaBuilder_ == null) { + typeSchema_ = builderForValue.build(); + } else { + typeSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTypeSchema(com.google.cloud.dialogflow.cx.v3.TypeSchema value) { + if (typeSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && typeSchema_ != null + && typeSchema_ != com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance()) { + getTypeSchemaBuilder().mergeFrom(value); + } else { + typeSchema_ = value; + } + } else { + typeSchemaBuilder_.mergeFrom(value); + } + if (typeSchema_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTypeSchema() { + bitField0_ = (bitField0_ & ~0x00000004); + typeSchema_ = null; + if (typeSchemaBuilder_ != null) { + typeSchemaBuilder_.dispose(); + typeSchemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder getTypeSchemaBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTypeSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder getTypeSchemaOrBuilder() { + if (typeSchemaBuilder_ != null) { + return typeSchemaBuilder_.getMessageOrBuilder(); + } else { + return typeSchema_ == null + ? com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance() + : typeSchema_; + } + } + + /** + * + * + *
+     * Optional. Type schema of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema, + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder> + getTypeSchemaFieldBuilder() { + if (typeSchemaBuilder_ == null) { + typeSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema, + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder>( + getTypeSchema(), getParentForChildren(), isClean()); + typeSchema_ = null; + } + return typeSchemaBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000008; + 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.v3.ParameterDefinition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ParameterDefinition) + private static final com.google.cloud.dialogflow.cx.v3.ParameterDefinition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ParameterDefinition(); + } + + public static com.google.cloud.dialogflow.cx.v3.ParameterDefinition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ParameterDefinition 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.v3.ParameterDefinition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinitionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinitionOrBuilder.java new file mode 100644 index 000000000000..b4ad1df788df --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinitionOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2026 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/v3/parameter_definition.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ParameterDefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ParameterDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Type of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @return The enum numeric value on the wire for type. + */ + @java.lang.Deprecated + int getTypeValue(); + + /** + * + * + *
+   * Type of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType type = 2 [deprecated = true]; + * + * + * @deprecated google.cloud.dialogflow.cx.v3.ParameterDefinition.type is deprecated. See + * google/cloud/dialogflow/cx/v3/parameter_definition.proto;l=59 + * @return The type. + */ + @java.lang.Deprecated + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType getType(); + + /** + * + * + *
+   * Optional. Type schema of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the typeSchema field is set. + */ + boolean hasTypeSchema(); + + /** + * + * + *
+   * Optional. Type schema of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The typeSchema. + */ + com.google.cloud.dialogflow.cx.v3.TypeSchema getTypeSchema(); + + /** + * + * + *
+   * Optional. Type schema of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.TypeSchema type_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder getTypeSchemaOrBuilder(); + + /** + * + * + *
+   * Human-readable description of the parameter. Limited to 300 characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Human-readable description of the parameter. Limited to 300 characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinitionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinitionProto.java new file mode 100644 index 000000000000..9ade2a3c43a8 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ParameterDefinitionProto.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 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/v3/parameter_definition.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public final class ParameterDefinitionProto { + private ParameterDefinitionProto() {} + + 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_v3_ParameterDefinition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ParameterDefinition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_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" + + "8google/cloud/dialogflow/cx/v3/parameter_definition.proto\022\035google.cloud.dialogf" + + "low.cx.v3\032\037google/api/field_behavior.proto\"\314\002\n" + + "\023ParameterDefinition\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022R\n" + + "\004type\030\002 \001(\0162@.google.cloud.dialo" + + "gflow.cx.v3.ParameterDefinition.ParameterTypeB\002\030\001\022C\n" + + "\013type_schema\030\004 \001(\0132).google." + + "cloud.dialogflow.cx.v3.TypeSchemaB\003\340A\001\022\023\n" + + "\013description\030\003 \001(\t\"t\n\r" + + "ParameterType\022\036\n" + + "\032PARAMETER_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006STRING\020\001\022\n\n" + + "\006NUMBER\020\002\022\013\n" + + "\007BOOLEAN\020\003\022\010\n" + + "\004NULL\020\004\022\n\n" + + "\006OBJECT\020\005\022\010\n" + + "\004LIST\020\006\"\344\001\n\n" + + "TypeSchema\022D\n\r" + + "inline_schema\030\001" + + " \001(\0132+.google.cloud.dialogflow.cx.v3.InlineSchemaH\000\022U\n" + + "\020schema_reference\030\002" + + " \001(\01329.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReferenceH\000\032/\n" + + "\017SchemaReference\022\014\n" + + "\004tool\030\001 \001(\t\022\016\n" + + "\006schema\030\002 \001(\tB\010\n" + + "\006schema\"\177\n" + + "\014InlineSchema\0225\n" + + "\004type\030\001 \001(\0162\'.google.cloud.dialogflow.cx.v3.DataType\0228\n" + + "\005items\030\002 \001(\0132).google.cloud.dialogflow.cx.v3.TypeSchema*U\n" + + "\010DataType\022\031\n" + + "\025DATA_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006STRING\020\001\022\n\n" + + "\006NUMBER\020\002\022\013\n" + + "\007BOOLEAN\020\003\022\t\n" + + "\005ARRAY\020\006Br\n" + + "!com.google.cloud.dialogflow.cx.v3B\030ParameterDefiniti" + + "onProtoP\001Z1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpbb\006proto3" + }; + 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_v3_ParameterDefinition_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_ParameterDefinition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ParameterDefinition_descriptor, + new java.lang.String[] { + "Name", "Type", "TypeSchema", "Description", + }); + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_descriptor, + new java.lang.String[] { + "InlineSchema", "SchemaReference", "Schema", + }); + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_descriptor, + new java.lang.String[] { + "Tool", "Schema", + }); + internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_InlineSchema_descriptor, + new java.lang.String[] { + "Type", "Items", + }); + 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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Playbook.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Playbook.java new file mode 100644 index 000000000000..e1b6c94eb112 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Playbook.java @@ -0,0 +1,8760 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Playbook is the basic building block to instruct the LLM how to execute a
+ * certain task.
+ *
+ * A playbook consists of a goal to accomplish, an optional list of step by step
+ * instructions (the step instruction may refers to name of the custom or
+ * default plugin tools to use) to perform the task,
+ * a list of contextual input data to be passed in at the beginning of the
+ * invoked, and a list of output parameters to store the playbook result.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Playbook} + */ +public final class Playbook extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Playbook) + PlaybookOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Playbook.newBuilder() to construct. + private Playbook(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Playbook() { + name_ = ""; + displayName_ = ""; + goal_ = ""; + inputParameterDefinitions_ = java.util.Collections.emptyList(); + outputParameterDefinitions_ = java.util.Collections.emptyList(); + referencedPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencedFlows_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencedTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + inlineActions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + handlers_ = java.util.Collections.emptyList(); + playbookType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Playbook(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Playbook.class, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder.class); + } + + /** + * + * + *
+   * Type of the playbook.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Playbook.PlaybookType} + */ + public enum PlaybookType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default to TASK.
+     * 
+ * + * PLAYBOOK_TYPE_UNSPECIFIED = 0; + */ + PLAYBOOK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Task playbook.
+     * 
+ * + * TASK = 1; + */ + TASK(1), + /** + * + * + *
+     * Routine playbook.
+     * 
+ * + * ROUTINE = 3; + */ + ROUTINE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default to TASK.
+     * 
+ * + * PLAYBOOK_TYPE_UNSPECIFIED = 0; + */ + public static final int PLAYBOOK_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Task playbook.
+     * 
+ * + * TASK = 1; + */ + public static final int TASK_VALUE = 1; + + /** + * + * + *
+     * Routine playbook.
+     * 
+ * + * ROUTINE = 3; + */ + public static final int ROUTINE_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 PlaybookType 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 PlaybookType forNumber(int value) { + switch (value) { + case 0: + return PLAYBOOK_TYPE_UNSPECIFIED; + case 1: + return TASK; + case 3: + return ROUTINE; + 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 PlaybookType findValueByNumber(int number) { + return PlaybookType.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.v3.Playbook.getDescriptor().getEnumTypes().get(0); + } + + private static final PlaybookType[] VALUES = values(); + + public static PlaybookType 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 PlaybookType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Playbook.PlaybookType) + } + + public interface StepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Playbook.Step) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + boolean hasText(); + + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + java.util.List getStepsList(); + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + com.google.cloud.dialogflow.cx.v3.Playbook.Step getSteps(int index); + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + int getStepsCount(); + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + java.util.List + getStepsOrBuilderList(); + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder getStepsOrBuilder(int index); + + com.google.cloud.dialogflow.cx.v3.Playbook.Step.InstructionCase getInstructionCase(); + } + + /** + * + * + *
+   * Message of single step execution.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Playbook.Step} + */ + public static final class Step extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Playbook.Step) + StepOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Step.newBuilder() to construct. + private Step(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Step() { + steps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Step(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Playbook.Step.class, + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder.class); + } + + private int instructionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object instruction_; + + public enum InstructionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(1), + INSTRUCTION_NOT_SET(0); + private final int value; + + private InstructionCase(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 InstructionCase valueOf(int value) { + return forNumber(value); + } + + public static InstructionCase forNumber(int value) { + switch (value) { + case 1: + return TEXT; + case 0: + return INSTRUCTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InstructionCase getInstructionCase() { + return InstructionCase.forNumber(instructionCase_); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + public boolean hasText() { + return instructionCase_ == 1; + } + + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = ""; + if (instructionCase_ == 1) { + ref = instruction_; + } + 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 (instructionCase_ == 1) { + instruction_ = s; + } + return s; + } + } + + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (instructionCase_ == 1) { + ref = instruction_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (instructionCase_ == 1) { + instruction_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STEPS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List steps_; + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public java.util.List + getStepsOrBuilderList() { + return steps_; + } + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Step getSteps(int index) { + return steps_.get(index); + } + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder getStepsOrBuilder(int index) { + return steps_.get(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 { + if (instructionCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instruction_); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(2, steps_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instructionCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instruction_); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, steps_.get(i)); + } + 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.v3.Playbook.Step)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Playbook.Step other = + (com.google.cloud.dialogflow.cx.v3.Playbook.Step) obj; + + if (!getStepsList().equals(other.getStepsList())) return false; + if (!getInstructionCase().equals(other.getInstructionCase())) return false; + switch (instructionCase_) { + case 1: + if (!getText().equals(other.getText())) 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(); + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + switch (instructionCase_) { + case 1: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Step parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Step 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.v3.Playbook.Step parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Step 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.v3.Playbook.Step parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Step 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.v3.Playbook.Step parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Step 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.v3.Playbook.Step parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Step 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.v3.Playbook.Step 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.v3.Playbook.Step 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.v3.Playbook.Step 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; + } + + /** + * + * + *
+     * Message of single step execution.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Playbook.Step} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Playbook.Step) + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Playbook.Step.class, + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Playbook.Step.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + } else { + steps_ = null; + stepsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + instructionCase_ = 0; + instruction_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Step getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Playbook.Step.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Step build() { + com.google.cloud.dialogflow.cx.v3.Playbook.Step result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Step buildPartial() { + com.google.cloud.dialogflow.cx.v3.Playbook.Step result = + new com.google.cloud.dialogflow.cx.v3.Playbook.Step(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.Playbook.Step result) { + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Playbook.Step result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.Playbook.Step result) { + result.instructionCase_ = instructionCase_; + result.instruction_ = this.instruction_; + } + + @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.v3.Playbook.Step) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Playbook.Step) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Playbook.Step other) { + if (other == com.google.cloud.dialogflow.cx.v3.Playbook.Step.getDefaultInstance()) + return this; + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + switch (other.getInstructionCase()) { + case TEXT: + { + instructionCase_ = 1; + instruction_ = other.instruction_; + onChanged(); + break; + } + case INSTRUCTION_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(); + instructionCase_ = 1; + instruction_ = s; + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3.Playbook.Step m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Playbook.Step.parser(), + extensionRegistry); + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(m); + } else { + stepsBuilder_.addMessage(m); + } + 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 instructionCase_ = 0; + private java.lang.Object instruction_; + + public InstructionCase getInstructionCase() { + return InstructionCase.forNumber(instructionCase_); + } + + public Builder clearInstruction() { + instructionCase_ = 0; + instruction_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return instructionCase_ == 1; + } + + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = ""; + if (instructionCase_ == 1) { + ref = instruction_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (instructionCase_ == 1) { + instruction_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (instructionCase_ == 1) { + ref = instruction_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (instructionCase_ == 1) { + instruction_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instructionCase_ = 1; + instruction_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + if (instructionCase_ == 1) { + instructionCase_ = 0; + instruction_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instructionCase_ = 1; + instruction_ = value; + onChanged(); + return this; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + steps_ = new java.util.ArrayList(steps_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Step, + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder setSteps(int index, com.google.cloud.dialogflow.cx.v3.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addSteps(com.google.cloud.dialogflow.cx.v3.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addSteps(int index, com.google.cloud.dialogflow.cx.v3.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addSteps( + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addAllSteps( + java.lang.Iterable values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder getStepsBuilder(int index) { + return getStepsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder getStepsOrBuilder(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Playbook.Step.getDefaultInstance()); + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder addStepsBuilder(int index) { + return getStepsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.Playbook.Step.getDefaultInstance()); + } + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Step, + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Step, + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + @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.v3.Playbook.Step) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Playbook.Step) + private static final com.google.cloud.dialogflow.cx.v3.Playbook.Step DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Playbook.Step(); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Step getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Step 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.v3.Playbook.Step getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstructionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Playbook.Instruction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * General guidelines for the playbook. These are unstructured instructions
+     * that are not directly part of the goal, e.g. "Always be polite". It's
+     * valid for this text to be long and used instead of steps altogether.
+     * 
+ * + * string guidelines = 1; + * + * @return The guidelines. + */ + java.lang.String getGuidelines(); + + /** + * + * + *
+     * General guidelines for the playbook. These are unstructured instructions
+     * that are not directly part of the goal, e.g. "Always be polite". It's
+     * valid for this text to be long and used instead of steps altogether.
+     * 
+ * + * string guidelines = 1; + * + * @return The bytes for guidelines. + */ + com.google.protobuf.ByteString getGuidelinesBytes(); + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + java.util.List getStepsList(); + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + com.google.cloud.dialogflow.cx.v3.Playbook.Step getSteps(int index); + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + int getStepsCount(); + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + java.util.List + getStepsOrBuilderList(); + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder getStepsOrBuilder(int index); + } + + /** + * + * + *
+   * Message of the Instruction of the playbook.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Playbook.Instruction} + */ + public static final class Instruction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Playbook.Instruction) + InstructionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Instruction.newBuilder() to construct. + private Instruction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instruction() { + guidelines_ = ""; + steps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instruction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.class, + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.Builder.class); + } + + public static final int GUIDELINES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object guidelines_ = ""; + + /** + * + * + *
+     * General guidelines for the playbook. These are unstructured instructions
+     * that are not directly part of the goal, e.g. "Always be polite". It's
+     * valid for this text to be long and used instead of steps altogether.
+     * 
+ * + * string guidelines = 1; + * + * @return The guidelines. + */ + @java.lang.Override + public java.lang.String getGuidelines() { + java.lang.Object ref = guidelines_; + 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(); + guidelines_ = s; + return s; + } + } + + /** + * + * + *
+     * General guidelines for the playbook. These are unstructured instructions
+     * that are not directly part of the goal, e.g. "Always be polite". It's
+     * valid for this text to be long and used instead of steps altogether.
+     * 
+ * + * string guidelines = 1; + * + * @return The bytes for guidelines. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGuidelinesBytes() { + java.lang.Object ref = guidelines_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + guidelines_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STEPS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List steps_; + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public java.util.List + getStepsOrBuilderList() { + return steps_; + } + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Step getSteps(int index) { + return steps_.get(index); + } + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder getStepsOrBuilder(int index) { + return steps_.get(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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guidelines_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, guidelines_); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(2, steps_.get(i)); + } + 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(guidelines_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, guidelines_); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, steps_.get(i)); + } + 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.v3.Playbook.Instruction)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction other = + (com.google.cloud.dialogflow.cx.v3.Playbook.Instruction) obj; + + if (!getGuidelines().equals(other.getGuidelines())) return false; + if (!getStepsList().equals(other.getStepsList())) 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) + GUIDELINES_FIELD_NUMBER; + hash = (53 * hash) + getGuidelines().hashCode(); + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Instruction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Instruction 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.v3.Playbook.Instruction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Instruction 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.v3.Playbook.Instruction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Instruction 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.v3.Playbook.Instruction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Instruction 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.v3.Playbook.Instruction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Instruction 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.v3.Playbook.Instruction 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.v3.Playbook.Instruction 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.v3.Playbook.Instruction 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; + } + + /** + * + * + *
+     * Message of the Instruction of the playbook.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Playbook.Instruction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Playbook.Instruction) + com.google.cloud.dialogflow.cx.v3.Playbook.InstructionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.class, + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + guidelines_ = ""; + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + } else { + steps_ = null; + stepsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Instruction getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Instruction build() { + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Instruction buildPartial() { + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction result = + new com.google.cloud.dialogflow.cx.v3.Playbook.Instruction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction result) { + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Playbook.Instruction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.guidelines_ = guidelines_; + } + } + + @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.v3.Playbook.Instruction) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Playbook.Instruction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Playbook.Instruction other) { + if (other == com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.getDefaultInstance()) + return this; + if (!other.getGuidelines().isEmpty()) { + guidelines_ = other.guidelines_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + 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: + { + guidelines_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3.Playbook.Step m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Playbook.Step.parser(), + extensionRegistry); + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(m); + } else { + stepsBuilder_.addMessage(m); + } + 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 java.lang.Object guidelines_ = ""; + + /** + * + * + *
+       * General guidelines for the playbook. These are unstructured instructions
+       * that are not directly part of the goal, e.g. "Always be polite". It's
+       * valid for this text to be long and used instead of steps altogether.
+       * 
+ * + * string guidelines = 1; + * + * @return The guidelines. + */ + public java.lang.String getGuidelines() { + java.lang.Object ref = guidelines_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guidelines_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * General guidelines for the playbook. These are unstructured instructions
+       * that are not directly part of the goal, e.g. "Always be polite". It's
+       * valid for this text to be long and used instead of steps altogether.
+       * 
+ * + * string guidelines = 1; + * + * @return The bytes for guidelines. + */ + public com.google.protobuf.ByteString getGuidelinesBytes() { + java.lang.Object ref = guidelines_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + guidelines_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * General guidelines for the playbook. These are unstructured instructions
+       * that are not directly part of the goal, e.g. "Always be polite". It's
+       * valid for this text to be long and used instead of steps altogether.
+       * 
+ * + * string guidelines = 1; + * + * @param value The guidelines to set. + * @return This builder for chaining. + */ + public Builder setGuidelines(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + guidelines_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * General guidelines for the playbook. These are unstructured instructions
+       * that are not directly part of the goal, e.g. "Always be polite". It's
+       * valid for this text to be long and used instead of steps altogether.
+       * 
+ * + * string guidelines = 1; + * + * @return This builder for chaining. + */ + public Builder clearGuidelines() { + guidelines_ = getDefaultInstance().getGuidelines(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * General guidelines for the playbook. These are unstructured instructions
+       * that are not directly part of the goal, e.g. "Always be polite". It's
+       * valid for this text to be long and used instead of steps altogether.
+       * 
+ * + * string guidelines = 1; + * + * @param value The bytes for guidelines to set. + * @return This builder for chaining. + */ + public Builder setGuidelinesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + guidelines_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + steps_ = new java.util.ArrayList(steps_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Step, + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder setSteps(int index, com.google.cloud.dialogflow.cx.v3.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addSteps(com.google.cloud.dialogflow.cx.v3.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addSteps(int index, com.google.cloud.dialogflow.cx.v3.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addSteps( + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder addAllSteps( + java.lang.Iterable values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder getStepsBuilder(int index) { + return getStepsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder getStepsOrBuilder(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Playbook.Step.getDefaultInstance()); + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder addStepsBuilder(int index) { + return getStepsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.Playbook.Step.getDefaultInstance()); + } + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.Playbook.Step steps = 2; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Step, + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Step, + com.google.cloud.dialogflow.cx.v3.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + @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.v3.Playbook.Instruction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Playbook.Instruction) + private static final com.google.cloud.dialogflow.cx.v3.Playbook.Instruction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Playbook.Instruction(); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook.Instruction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instruction 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.v3.Playbook.Instruction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Required. The human-readable name of the playbook, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The human-readable name of the playbook, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOAL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object goal_ = ""; + + /** + * + * + *
+   * Required. High level description of the goal the playbook intend to
+   * accomplish. A goal should be concise since it's visible to other playbooks
+   * that may reference this playbook.
+   * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The goal. + */ + @java.lang.Override + public java.lang.String getGoal() { + java.lang.Object ref = goal_; + 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(); + goal_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. High level description of the goal the playbook intend to
+   * accomplish. A goal should be concise since it's visible to other playbooks
+   * that may reference this playbook.
+   * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for goal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGoalBytes() { + java.lang.Object ref = goal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + goal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List + inputParameterDefinitions_; + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getInputParameterDefinitionsList() { + return inputParameterDefinitions_; + } + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getInputParameterDefinitionsOrBuilderList() { + return inputParameterDefinitions_; + } + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getInputParameterDefinitionsCount() { + return inputParameterDefinitions_.size(); + } + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getInputParameterDefinitions( + int index) { + return inputParameterDefinitions_.get(index); + } + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index) { + return inputParameterDefinitions_.get(index); + } + + public static final int OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List + outputParameterDefinitions_; + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getOutputParameterDefinitionsList() { + return outputParameterDefinitions_; + } + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getOutputParameterDefinitionsOrBuilderList() { + return outputParameterDefinitions_; + } + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getOutputParameterDefinitionsCount() { + return outputParameterDefinitions_.size(); + } + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getOutputParameterDefinitions( + int index) { + return outputParameterDefinitions_.get(index); + } + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index) { + return outputParameterDefinitions_.get(index); + } + + public static final int INSTRUCTION_FIELD_NUMBER = 17; + private com.google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction_; + + /** + * + * + *
+   * Instruction to accomplish target goal.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + * + * @return Whether the instruction field is set. + */ + @java.lang.Override + public boolean hasInstruction() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Instruction to accomplish target goal.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + * + * @return The instruction. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.Instruction getInstruction() { + return instruction_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.getDefaultInstance() + : instruction_; + } + + /** + * + * + *
+   * Instruction to accomplish target goal.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.InstructionOrBuilder getInstructionOrBuilder() { + return instruction_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.getDefaultInstance() + : instruction_; + } + + public static final int TOKEN_COUNT_FIELD_NUMBER = 8; + private long tokenCount_ = 0L; + + /** + * + * + *
+   * Output only. Estimated number of tokes current playbook takes when sent to
+   * the LLM.
+   * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + @java.lang.Override + public long getTokenCount() { + return tokenCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int REFERENCED_PLAYBOOKS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList referencedPlaybooks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedPlaybooks. + */ + public com.google.protobuf.ProtocolStringList getReferencedPlaybooksList() { + return referencedPlaybooks_; + } + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedPlaybooks. + */ + public int getReferencedPlaybooksCount() { + return referencedPlaybooks_.size(); + } + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedPlaybooks at the given index. + */ + public java.lang.String getReferencedPlaybooks(int index) { + return referencedPlaybooks_.get(index); + } + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedPlaybooks at the given index. + */ + public com.google.protobuf.ByteString getReferencedPlaybooksBytes(int index) { + return referencedPlaybooks_.getByteString(index); + } + + public static final int REFERENCED_FLOWS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList referencedFlows_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedFlows. + */ + public com.google.protobuf.ProtocolStringList getReferencedFlowsList() { + return referencedFlows_; + } + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedFlows. + */ + public int getReferencedFlowsCount() { + return referencedFlows_.size(); + } + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedFlows at the given index. + */ + public java.lang.String getReferencedFlows(int index) { + return referencedFlows_.get(index); + } + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedFlows at the given index. + */ + public com.google.protobuf.ByteString getReferencedFlowsBytes(int index) { + return referencedFlows_.getByteString(index); + } + + public static final int REFERENCED_TOOLS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList referencedTools_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedTools. + */ + public com.google.protobuf.ProtocolStringList getReferencedToolsList() { + return referencedTools_; + } + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedTools. + */ + public int getReferencedToolsCount() { + return referencedTools_.size(); + } + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedTools at the given index. + */ + public java.lang.String getReferencedTools(int index) { + return referencedTools_.get(index); + } + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedTools at the given index. + */ + public com.google.protobuf.ByteString getReferencedToolsBytes(int index) { + return referencedTools_.getByteString(index); + } + + public static final int INLINE_ACTIONS_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList inlineActions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Output only. Names of inline actions scoped to this playbook.
+   * These actions are in addition to those belonging to referenced tools, child
+   * playbooks, and flows, e.g. actions that are defined in the playbook's code
+   * block.
+   * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the inlineActions. + */ + public com.google.protobuf.ProtocolStringList getInlineActionsList() { + return inlineActions_; + } + + /** + * + * + *
+   * Optional. Output only. Names of inline actions scoped to this playbook.
+   * These actions are in addition to those belonging to referenced tools, child
+   * playbooks, and flows, e.g. actions that are defined in the playbook's code
+   * block.
+   * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of inlineActions. + */ + public int getInlineActionsCount() { + return inlineActions_.size(); + } + + /** + * + * + *
+   * Optional. Output only. Names of inline actions scoped to this playbook.
+   * These actions are in addition to those belonging to referenced tools, child
+   * playbooks, and flows, e.g. actions that are defined in the playbook's code
+   * block.
+   * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The inlineActions at the given index. + */ + public java.lang.String getInlineActions(int index) { + return inlineActions_.get(index); + } + + /** + * + * + *
+   * Optional. Output only. Names of inline actions scoped to this playbook.
+   * These actions are in addition to those belonging to referenced tools, child
+   * playbooks, and flows, e.g. actions that are defined in the playbook's code
+   * block.
+   * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the inlineActions at the given index. + */ + public com.google.protobuf.ByteString getInlineActionsBytes(int index) { + return inlineActions_.getByteString(index); + } + + public static final int CODE_BLOCK_FIELD_NUMBER = 21; + private com.google.cloud.dialogflow.cx.v3.CodeBlock codeBlock_; + + /** + * + * + *
+   * Optional. The playbook's scoped code block, which may implement handlers
+   * and actions.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the codeBlock field is set. + */ + @java.lang.Override + public boolean hasCodeBlock() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. The playbook's scoped code block, which may implement handlers
+   * and actions.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The codeBlock. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CodeBlock getCodeBlock() { + return codeBlock_ == null + ? com.google.cloud.dialogflow.cx.v3.CodeBlock.getDefaultInstance() + : codeBlock_; + } + + /** + * + * + *
+   * Optional. The playbook's scoped code block, which may implement handlers
+   * and actions.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.CodeBlockOrBuilder getCodeBlockOrBuilder() { + return codeBlock_ == null + ? com.google.cloud.dialogflow.cx.v3.CodeBlock.getDefaultInstance() + : codeBlock_; + } + + public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 14; + private com.google.cloud.dialogflow.cx.v3.LlmModelSettings llmModelSettings_; + + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + @java.lang.Override + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + + public static final int HANDLERS_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private java.util.List handlers_; + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getHandlersList() { + return handlers_; + } + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getHandlersOrBuilderList() { + return handlers_; + } + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getHandlersCount() { + return handlers_.size(); + } + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Handler getHandlers(int index) { + return handlers_.get(index); + } + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.HandlerOrBuilder getHandlersOrBuilder(int index) { + return handlers_.get(index); + } + + public static final int PLAYBOOK_TYPE_FIELD_NUMBER = 19; + private int playbookType_ = 0; + + /** + * + * + *
+   * Optional. Type of the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for playbookType. + */ + @java.lang.Override + public int getPlaybookTypeValue() { + return playbookType_; + } + + /** + * + * + *
+   * Optional. Type of the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType getPlaybookType() { + com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType result = + com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType.forNumber(playbookType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType.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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goal_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, goal_); + } + for (int i = 0; i < inputParameterDefinitions_.size(); i++) { + output.writeMessage(5, inputParameterDefinitions_.get(i)); + } + for (int i = 0; i < outputParameterDefinitions_.size(); i++) { + output.writeMessage(6, outputParameterDefinitions_.get(i)); + } + if (tokenCount_ != 0L) { + output.writeInt64(8, tokenCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + for (int i = 0; i < referencedPlaybooks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 11, referencedPlaybooks_.getRaw(i)); + } + for (int i = 0; i < referencedFlows_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, referencedFlows_.getRaw(i)); + } + for (int i = 0; i < referencedTools_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, referencedTools_.getRaw(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(14, getLlmModelSettings()); + } + for (int i = 0; i < handlers_.size(); i++) { + output.writeMessage(16, handlers_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(17, getInstruction()); + } + if (playbookType_ + != com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType.PLAYBOOK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(19, playbookType_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(21, getCodeBlock()); + } + for (int i = 0; i < inlineActions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, inlineActions_.getRaw(i)); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goal_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, goal_); + } + for (int i = 0; i < inputParameterDefinitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, inputParameterDefinitions_.get(i)); + } + for (int i = 0; i < outputParameterDefinitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, outputParameterDefinitions_.get(i)); + } + if (tokenCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, tokenCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < referencedPlaybooks_.size(); i++) { + dataSize += computeStringSizeNoTag(referencedPlaybooks_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencedPlaybooksList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < referencedFlows_.size(); i++) { + dataSize += computeStringSizeNoTag(referencedFlows_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencedFlowsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < referencedTools_.size(); i++) { + dataSize += computeStringSizeNoTag(referencedTools_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencedToolsList().size(); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLlmModelSettings()); + } + for (int i = 0; i < handlers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, handlers_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getInstruction()); + } + if (playbookType_ + != com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType.PLAYBOOK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, playbookType_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getCodeBlock()); + } + { + int dataSize = 0; + for (int i = 0; i < inlineActions_.size(); i++) { + dataSize += computeStringSizeNoTag(inlineActions_.getRaw(i)); + } + size += dataSize; + size += 2 * getInlineActionsList().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.v3.Playbook)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Playbook other = + (com.google.cloud.dialogflow.cx.v3.Playbook) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getGoal().equals(other.getGoal())) return false; + if (!getInputParameterDefinitionsList().equals(other.getInputParameterDefinitionsList())) + return false; + if (!getOutputParameterDefinitionsList().equals(other.getOutputParameterDefinitionsList())) + return false; + if (hasInstruction() != other.hasInstruction()) return false; + if (hasInstruction()) { + if (!getInstruction().equals(other.getInstruction())) return false; + } + if (getTokenCount() != other.getTokenCount()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getReferencedPlaybooksList().equals(other.getReferencedPlaybooksList())) return false; + if (!getReferencedFlowsList().equals(other.getReferencedFlowsList())) return false; + if (!getReferencedToolsList().equals(other.getReferencedToolsList())) return false; + if (!getInlineActionsList().equals(other.getInlineActionsList())) return false; + if (hasCodeBlock() != other.hasCodeBlock()) return false; + if (hasCodeBlock()) { + if (!getCodeBlock().equals(other.getCodeBlock())) return false; + } + if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false; + if (hasLlmModelSettings()) { + if (!getLlmModelSettings().equals(other.getLlmModelSettings())) return false; + } + if (!getHandlersList().equals(other.getHandlersList())) return false; + if (playbookType_ != other.playbookType_) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + GOAL_FIELD_NUMBER; + hash = (53 * hash) + getGoal().hashCode(); + if (getInputParameterDefinitionsCount() > 0) { + hash = (37 * hash) + INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getInputParameterDefinitionsList().hashCode(); + } + if (getOutputParameterDefinitionsCount() > 0) { + hash = (37 * hash) + OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getOutputParameterDefinitionsList().hashCode(); + } + if (hasInstruction()) { + hash = (37 * hash) + INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getInstruction().hashCode(); + } + hash = (37 * hash) + TOKEN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTokenCount()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getReferencedPlaybooksCount() > 0) { + hash = (37 * hash) + REFERENCED_PLAYBOOKS_FIELD_NUMBER; + hash = (53 * hash) + getReferencedPlaybooksList().hashCode(); + } + if (getReferencedFlowsCount() > 0) { + hash = (37 * hash) + REFERENCED_FLOWS_FIELD_NUMBER; + hash = (53 * hash) + getReferencedFlowsList().hashCode(); + } + if (getReferencedToolsCount() > 0) { + hash = (37 * hash) + REFERENCED_TOOLS_FIELD_NUMBER; + hash = (53 * hash) + getReferencedToolsList().hashCode(); + } + if (getInlineActionsCount() > 0) { + hash = (37 * hash) + INLINE_ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getInlineActionsList().hashCode(); + } + if (hasCodeBlock()) { + hash = (37 * hash) + CODE_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getCodeBlock().hashCode(); + } + if (hasLlmModelSettings()) { + hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLlmModelSettings().hashCode(); + } + if (getHandlersCount() > 0) { + hash = (37 * hash) + HANDLERS_FIELD_NUMBER; + hash = (53 * hash) + getHandlersList().hashCode(); + } + hash = (37 * hash) + PLAYBOOK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + playbookType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook 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.v3.Playbook parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook 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.v3.Playbook parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook 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.v3.Playbook parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook 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.v3.Playbook parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook 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.v3.Playbook 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.v3.Playbook 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.v3.Playbook 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; + } + + /** + * + * + *
+   * Playbook is the basic building block to instruct the LLM how to execute a
+   * certain task.
+   *
+   * A playbook consists of a goal to accomplish, an optional list of step by step
+   * instructions (the step instruction may refers to name of the custom or
+   * default plugin tools to use) to perform the task,
+   * a list of contextual input data to be passed in at the beginning of the
+   * invoked, and a list of output parameters to store the playbook result.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Playbook} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Playbook) + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Playbook.class, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Playbook.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputParameterDefinitionsFieldBuilder(); + getOutputParameterDefinitionsFieldBuilder(); + getInstructionFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getCodeBlockFieldBuilder(); + getLlmModelSettingsFieldBuilder(); + getHandlersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + goal_ = ""; + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitions_ = java.util.Collections.emptyList(); + } else { + inputParameterDefinitions_ = null; + inputParameterDefinitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitions_ = java.util.Collections.emptyList(); + } else { + outputParameterDefinitions_ = null; + outputParameterDefinitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + instruction_ = null; + if (instructionBuilder_ != null) { + instructionBuilder_.dispose(); + instructionBuilder_ = null; + } + tokenCount_ = 0L; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + referencedPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencedFlows_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencedTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + inlineActions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + codeBlock_ = null; + if (codeBlockBuilder_ != null) { + codeBlockBuilder_.dispose(); + codeBlockBuilder_ = null; + } + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + if (handlersBuilder_ == null) { + handlers_ = java.util.Collections.emptyList(); + } else { + handlers_ = null; + handlersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00008000); + playbookType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_Playbook_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook build() { + com.google.cloud.dialogflow.cx.v3.Playbook result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook buildPartial() { + com.google.cloud.dialogflow.cx.v3.Playbook result = + new com.google.cloud.dialogflow.cx.v3.Playbook(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.Playbook result) { + if (inputParameterDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + inputParameterDefinitions_ = + java.util.Collections.unmodifiableList(inputParameterDefinitions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.inputParameterDefinitions_ = inputParameterDefinitions_; + } else { + result.inputParameterDefinitions_ = inputParameterDefinitionsBuilder_.build(); + } + if (outputParameterDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + outputParameterDefinitions_ = + java.util.Collections.unmodifiableList(outputParameterDefinitions_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.outputParameterDefinitions_ = outputParameterDefinitions_; + } else { + result.outputParameterDefinitions_ = outputParameterDefinitionsBuilder_.build(); + } + if (handlersBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0)) { + handlers_ = java.util.Collections.unmodifiableList(handlers_); + bitField0_ = (bitField0_ & ~0x00008000); + } + result.handlers_ = handlers_; + } else { + result.handlers_ = handlersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Playbook result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.goal_ = goal_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.instruction_ = + instructionBuilder_ == null ? instruction_ : instructionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.tokenCount_ = tokenCount_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + referencedPlaybooks_.makeImmutable(); + result.referencedPlaybooks_ = referencedPlaybooks_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + referencedFlows_.makeImmutable(); + result.referencedFlows_ = referencedFlows_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + referencedTools_.makeImmutable(); + result.referencedTools_ = referencedTools_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + inlineActions_.makeImmutable(); + result.inlineActions_ = inlineActions_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.codeBlock_ = codeBlockBuilder_ == null ? codeBlock_ : codeBlockBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.llmModelSettings_ = + llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.playbookType_ = playbookType_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.Playbook) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Playbook) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Playbook other) { + if (other == com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getGoal().isEmpty()) { + goal_ = other.goal_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (inputParameterDefinitionsBuilder_ == null) { + if (!other.inputParameterDefinitions_.isEmpty()) { + if (inputParameterDefinitions_.isEmpty()) { + inputParameterDefinitions_ = other.inputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.addAll(other.inputParameterDefinitions_); + } + onChanged(); + } + } else { + if (!other.inputParameterDefinitions_.isEmpty()) { + if (inputParameterDefinitionsBuilder_.isEmpty()) { + inputParameterDefinitionsBuilder_.dispose(); + inputParameterDefinitionsBuilder_ = null; + inputParameterDefinitions_ = other.inputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000008); + inputParameterDefinitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputParameterDefinitionsFieldBuilder() + : null; + } else { + inputParameterDefinitionsBuilder_.addAllMessages(other.inputParameterDefinitions_); + } + } + } + if (outputParameterDefinitionsBuilder_ == null) { + if (!other.outputParameterDefinitions_.isEmpty()) { + if (outputParameterDefinitions_.isEmpty()) { + outputParameterDefinitions_ = other.outputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.addAll(other.outputParameterDefinitions_); + } + onChanged(); + } + } else { + if (!other.outputParameterDefinitions_.isEmpty()) { + if (outputParameterDefinitionsBuilder_.isEmpty()) { + outputParameterDefinitionsBuilder_.dispose(); + outputParameterDefinitionsBuilder_ = null; + outputParameterDefinitions_ = other.outputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000010); + outputParameterDefinitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputParameterDefinitionsFieldBuilder() + : null; + } else { + outputParameterDefinitionsBuilder_.addAllMessages(other.outputParameterDefinitions_); + } + } + } + if (other.hasInstruction()) { + mergeInstruction(other.getInstruction()); + } + if (other.getTokenCount() != 0L) { + setTokenCount(other.getTokenCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.referencedPlaybooks_.isEmpty()) { + if (referencedPlaybooks_.isEmpty()) { + referencedPlaybooks_ = other.referencedPlaybooks_; + bitField0_ |= 0x00000200; + } else { + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.addAll(other.referencedPlaybooks_); + } + onChanged(); + } + if (!other.referencedFlows_.isEmpty()) { + if (referencedFlows_.isEmpty()) { + referencedFlows_ = other.referencedFlows_; + bitField0_ |= 0x00000400; + } else { + ensureReferencedFlowsIsMutable(); + referencedFlows_.addAll(other.referencedFlows_); + } + onChanged(); + } + if (!other.referencedTools_.isEmpty()) { + if (referencedTools_.isEmpty()) { + referencedTools_ = other.referencedTools_; + bitField0_ |= 0x00000800; + } else { + ensureReferencedToolsIsMutable(); + referencedTools_.addAll(other.referencedTools_); + } + onChanged(); + } + if (!other.inlineActions_.isEmpty()) { + if (inlineActions_.isEmpty()) { + inlineActions_ = other.inlineActions_; + bitField0_ |= 0x00001000; + } else { + ensureInlineActionsIsMutable(); + inlineActions_.addAll(other.inlineActions_); + } + onChanged(); + } + if (other.hasCodeBlock()) { + mergeCodeBlock(other.getCodeBlock()); + } + if (other.hasLlmModelSettings()) { + mergeLlmModelSettings(other.getLlmModelSettings()); + } + if (handlersBuilder_ == null) { + if (!other.handlers_.isEmpty()) { + if (handlers_.isEmpty()) { + handlers_ = other.handlers_; + bitField0_ = (bitField0_ & ~0x00008000); + } else { + ensureHandlersIsMutable(); + handlers_.addAll(other.handlers_); + } + onChanged(); + } + } else { + if (!other.handlers_.isEmpty()) { + if (handlersBuilder_.isEmpty()) { + handlersBuilder_.dispose(); + handlersBuilder_ = null; + handlers_ = other.handlers_; + bitField0_ = (bitField0_ & ~0x00008000); + handlersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHandlersFieldBuilder() + : null; + } else { + handlersBuilder_.addAllMessages(other.handlers_); + } + } + } + if (other.playbookType_ != 0) { + setPlaybookTypeValue(other.getPlaybookTypeValue()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + goal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + com.google.cloud.dialogflow.cx.v3.ParameterDefinition m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.parser(), + extensionRegistry); + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(m); + } else { + inputParameterDefinitionsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.dialogflow.cx.v3.ParameterDefinition m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.parser(), + extensionRegistry); + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(m); + } else { + outputParameterDefinitionsBuilder_.addMessage(m); + } + break; + } // case 50 + case 64: + { + tokenCount_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 74: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.add(s); + break; + } // case 90 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReferencedFlowsIsMutable(); + referencedFlows_.add(s); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReferencedToolsIsMutable(); + referencedTools_.add(s); + break; + } // case 106 + case 114: + { + input.readMessage( + getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 114 + case 130: + { + com.google.cloud.dialogflow.cx.v3.Handler m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Handler.parser(), extensionRegistry); + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.add(m); + } else { + handlersBuilder_.addMessage(m); + } + break; + } // case 130 + case 138: + { + input.readMessage(getInstructionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 138 + case 152: + { + playbookType_ = input.readEnum(); + bitField0_ |= 0x00010000; + break; + } // case 152 + case 170: + { + input.readMessage(getCodeBlockFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 170 + case 178: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInlineActionsIsMutable(); + inlineActions_.add(s); + break; + } // case 178 + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object goal_ = ""; + + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish. A goal should be concise since it's visible to other playbooks
+     * that may reference this playbook.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The goal. + */ + public java.lang.String getGoal() { + java.lang.Object ref = goal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + goal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish. A goal should be concise since it's visible to other playbooks
+     * that may reference this playbook.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for goal. + */ + public com.google.protobuf.ByteString getGoalBytes() { + java.lang.Object ref = goal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + goal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish. A goal should be concise since it's visible to other playbooks
+     * that may reference this playbook.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The goal to set. + * @return This builder for chaining. + */ + public Builder setGoal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + goal_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish. A goal should be concise since it's visible to other playbooks
+     * that may reference this playbook.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGoal() { + goal_ = getDefaultInstance().getGoal(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish. A goal should be concise since it's visible to other playbooks
+     * that may reference this playbook.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for goal to set. + * @return This builder for chaining. + */ + public Builder setGoalBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + goal_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List + inputParameterDefinitions_ = java.util.Collections.emptyList(); + + private void ensureInputParameterDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + inputParameterDefinitions_ = + new java.util.ArrayList( + inputParameterDefinitions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder> + inputParameterDefinitionsBuilder_; + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInputParameterDefinitionsList() { + if (inputParameterDefinitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputParameterDefinitions_); + } else { + return inputParameterDefinitionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getInputParameterDefinitionsCount() { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.size(); + } else { + return inputParameterDefinitionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getInputParameterDefinitions( + int index) { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.get(index); + } else { + return inputParameterDefinitionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.set(index, value); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.set(index, builderForValue.build()); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(value); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(index, value); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(builderForValue.build()); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(index, builderForValue.build()); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllInputParameterDefinitions( + java.lang.Iterable + values) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputParameterDefinitions_); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputParameterDefinitions() { + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeInputParameterDefinitions(int index) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.remove(index); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + getInputParameterDefinitionsBuilder(int index) { + return getInputParameterDefinitionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index) { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.get(index); + } else { + return inputParameterDefinitionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInputParameterDefinitionsOrBuilderList() { + if (inputParameterDefinitionsBuilder_ != null) { + return inputParameterDefinitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputParameterDefinitions_); + } + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + addInputParameterDefinitionsBuilder() { + return getInputParameterDefinitionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + addInputParameterDefinitionsBuilder(int index) { + return getInputParameterDefinitionsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInputParameterDefinitionsBuilderList() { + return getInputParameterDefinitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder> + getInputParameterDefinitionsFieldBuilder() { + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder>( + inputParameterDefinitions_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + inputParameterDefinitions_ = null; + } + return inputParameterDefinitionsBuilder_; + } + + private java.util.List + outputParameterDefinitions_ = java.util.Collections.emptyList(); + + private void ensureOutputParameterDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + outputParameterDefinitions_ = + new java.util.ArrayList( + outputParameterDefinitions_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder> + outputParameterDefinitionsBuilder_; + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutputParameterDefinitionsList() { + if (outputParameterDefinitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputParameterDefinitions_); + } else { + return outputParameterDefinitionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getOutputParameterDefinitionsCount() { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.size(); + } else { + return outputParameterDefinitionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition getOutputParameterDefinitions( + int index) { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.get(index); + } else { + return outputParameterDefinitionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.set(index, value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.set(index, builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(index, value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(index, builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllOutputParameterDefinitions( + java.lang.Iterable + values) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputParameterDefinitions_); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOutputParameterDefinitions() { + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeOutputParameterDefinitions(int index) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.remove(index); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + getOutputParameterDefinitionsBuilder(int index) { + return getOutputParameterDefinitionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index) { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.get(index); + } else { + return outputParameterDefinitionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutputParameterDefinitionsOrBuilderList() { + if (outputParameterDefinitionsBuilder_ != null) { + return outputParameterDefinitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputParameterDefinitions_); + } + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + addOutputParameterDefinitionsBuilder() { + return getOutputParameterDefinitionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder + addOutputParameterDefinitionsBuilder(int index) { + return getOutputParameterDefinitionsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ParameterDefinition.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutputParameterDefinitionsBuilderList() { + return getOutputParameterDefinitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder> + getOutputParameterDefinitionsFieldBuilder() { + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder>( + outputParameterDefinitions_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + outputParameterDefinitions_ = null; + } + return outputParameterDefinitionsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction, + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.InstructionOrBuilder> + instructionBuilder_; + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + * + * @return Whether the instruction field is set. + */ + public boolean hasInstruction() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + * + * @return The instruction. + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Instruction getInstruction() { + if (instructionBuilder_ == null) { + return instruction_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.getDefaultInstance() + : instruction_; + } else { + return instructionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + public Builder setInstruction(com.google.cloud.dialogflow.cx.v3.Playbook.Instruction value) { + if (instructionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instruction_ = value; + } else { + instructionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + public Builder setInstruction( + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.Builder builderForValue) { + if (instructionBuilder_ == null) { + instruction_ = builderForValue.build(); + } else { + instructionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + public Builder mergeInstruction(com.google.cloud.dialogflow.cx.v3.Playbook.Instruction value) { + if (instructionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && instruction_ != null + && instruction_ + != com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.getDefaultInstance()) { + getInstructionBuilder().mergeFrom(value); + } else { + instruction_ = value; + } + } else { + instructionBuilder_.mergeFrom(value); + } + if (instruction_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + public Builder clearInstruction() { + bitField0_ = (bitField0_ & ~0x00000020); + instruction_ = null; + if (instructionBuilder_ != null) { + instructionBuilder_.dispose(); + instructionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.Builder getInstructionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getInstructionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.InstructionOrBuilder + getInstructionOrBuilder() { + if (instructionBuilder_ != null) { + return instructionBuilder_.getMessageOrBuilder(); + } else { + return instruction_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.getDefaultInstance() + : instruction_; + } + } + + /** + * + * + *
+     * Instruction to accomplish target goal.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction, + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.InstructionOrBuilder> + getInstructionFieldBuilder() { + if (instructionBuilder_ == null) { + instructionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction, + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction.Builder, + com.google.cloud.dialogflow.cx.v3.Playbook.InstructionOrBuilder>( + getInstruction(), getParentForChildren(), isClean()); + instruction_ = null; + } + return instructionBuilder_; + } + + private long tokenCount_; + + /** + * + * + *
+     * Output only. Estimated number of tokes current playbook takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + @java.lang.Override + public long getTokenCount() { + return tokenCount_; + } + + /** + * + * + *
+     * Output only. Estimated number of tokes current playbook takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tokenCount to set. + * @return This builder for chaining. + */ + public Builder setTokenCount(long value) { + + tokenCount_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Estimated number of tokes current playbook takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTokenCount() { + bitField0_ = (bitField0_ & ~0x00000040); + tokenCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.LazyStringArrayList referencedPlaybooks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReferencedPlaybooksIsMutable() { + if (!referencedPlaybooks_.isModifiable()) { + referencedPlaybooks_ = new com.google.protobuf.LazyStringArrayList(referencedPlaybooks_); + } + bitField0_ |= 0x00000200; + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedPlaybooks. + */ + public com.google.protobuf.ProtocolStringList getReferencedPlaybooksList() { + referencedPlaybooks_.makeImmutable(); + return referencedPlaybooks_; + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedPlaybooks. + */ + public int getReferencedPlaybooksCount() { + return referencedPlaybooks_.size(); + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedPlaybooks at the given index. + */ + public java.lang.String getReferencedPlaybooks(int index) { + return referencedPlaybooks_.get(index); + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedPlaybooks at the given index. + */ + public com.google.protobuf.ByteString getReferencedPlaybooksBytes(int index) { + return referencedPlaybooks_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The referencedPlaybooks to set. + * @return This builder for chaining. + */ + public Builder setReferencedPlaybooks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The referencedPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addReferencedPlaybooks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The referencedPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addAllReferencedPlaybooks(java.lang.Iterable values) { + ensureReferencedPlaybooksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencedPlaybooks_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReferencedPlaybooks() { + referencedPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the referencedPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addReferencedPlaybooksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList referencedFlows_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReferencedFlowsIsMutable() { + if (!referencedFlows_.isModifiable()) { + referencedFlows_ = new com.google.protobuf.LazyStringArrayList(referencedFlows_); + } + bitField0_ |= 0x00000400; + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedFlows. + */ + public com.google.protobuf.ProtocolStringList getReferencedFlowsList() { + referencedFlows_.makeImmutable(); + return referencedFlows_; + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedFlows. + */ + public int getReferencedFlowsCount() { + return referencedFlows_.size(); + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedFlows at the given index. + */ + public java.lang.String getReferencedFlows(int index) { + return referencedFlows_.get(index); + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedFlows at the given index. + */ + public com.google.protobuf.ByteString getReferencedFlowsBytes(int index) { + return referencedFlows_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The referencedFlows to set. + * @return This builder for chaining. + */ + public Builder setReferencedFlows(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedFlowsIsMutable(); + referencedFlows_.set(index, value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The referencedFlows to add. + * @return This builder for chaining. + */ + public Builder addReferencedFlows(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedFlowsIsMutable(); + referencedFlows_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The referencedFlows to add. + * @return This builder for chaining. + */ + public Builder addAllReferencedFlows(java.lang.Iterable values) { + ensureReferencedFlowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencedFlows_); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReferencedFlows() { + referencedFlows_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the referencedFlows to add. + * @return This builder for chaining. + */ + public Builder addReferencedFlowsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencedFlowsIsMutable(); + referencedFlows_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList referencedTools_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReferencedToolsIsMutable() { + if (!referencedTools_.isModifiable()) { + referencedTools_ = new com.google.protobuf.LazyStringArrayList(referencedTools_); + } + bitField0_ |= 0x00000800; + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedTools. + */ + public com.google.protobuf.ProtocolStringList getReferencedToolsList() { + referencedTools_.makeImmutable(); + return referencedTools_; + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedTools. + */ + public int getReferencedToolsCount() { + return referencedTools_.size(); + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedTools at the given index. + */ + public java.lang.String getReferencedTools(int index) { + return referencedTools_.get(index); + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedTools at the given index. + */ + public com.google.protobuf.ByteString getReferencedToolsBytes(int index) { + return referencedTools_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The referencedTools to set. + * @return This builder for chaining. + */ + public Builder setReferencedTools(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedToolsIsMutable(); + referencedTools_.set(index, value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The referencedTools to add. + * @return This builder for chaining. + */ + public Builder addReferencedTools(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedToolsIsMutable(); + referencedTools_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The referencedTools to add. + * @return This builder for chaining. + */ + public Builder addAllReferencedTools(java.lang.Iterable values) { + ensureReferencedToolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencedTools_); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReferencedTools() { + referencedTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the referencedTools to add. + * @return This builder for chaining. + */ + public Builder addReferencedToolsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencedToolsIsMutable(); + referencedTools_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList inlineActions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureInlineActionsIsMutable() { + if (!inlineActions_.isModifiable()) { + inlineActions_ = new com.google.protobuf.LazyStringArrayList(inlineActions_); + } + bitField0_ |= 0x00001000; + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the inlineActions. + */ + public com.google.protobuf.ProtocolStringList getInlineActionsList() { + inlineActions_.makeImmutable(); + return inlineActions_; + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of inlineActions. + */ + public int getInlineActionsCount() { + return inlineActions_.size(); + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The inlineActions at the given index. + */ + public java.lang.String getInlineActions(int index) { + return inlineActions_.get(index); + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the inlineActions at the given index. + */ + public com.google.protobuf.ByteString getInlineActionsBytes(int index) { + return inlineActions_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The inlineActions to set. + * @return This builder for chaining. + */ + public Builder setInlineActions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInlineActionsIsMutable(); + inlineActions_.set(index, value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The inlineActions to add. + * @return This builder for chaining. + */ + public Builder addInlineActions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInlineActionsIsMutable(); + inlineActions_.add(value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The inlineActions to add. + * @return This builder for chaining. + */ + public Builder addAllInlineActions(java.lang.Iterable values) { + ensureInlineActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inlineActions_); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearInlineActions() { + inlineActions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. Names of inline actions scoped to this playbook.
+     * These actions are in addition to those belonging to referenced tools, child
+     * playbooks, and flows, e.g. actions that are defined in the playbook's code
+     * block.
+     * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the inlineActions to add. + * @return This builder for chaining. + */ + public Builder addInlineActionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInlineActionsIsMutable(); + inlineActions_.add(value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.CodeBlock codeBlock_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.CodeBlock, + com.google.cloud.dialogflow.cx.v3.CodeBlock.Builder, + com.google.cloud.dialogflow.cx.v3.CodeBlockOrBuilder> + codeBlockBuilder_; + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the codeBlock field is set. + */ + public boolean hasCodeBlock() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The codeBlock. + */ + public com.google.cloud.dialogflow.cx.v3.CodeBlock getCodeBlock() { + if (codeBlockBuilder_ == null) { + return codeBlock_ == null + ? com.google.cloud.dialogflow.cx.v3.CodeBlock.getDefaultInstance() + : codeBlock_; + } else { + return codeBlockBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCodeBlock(com.google.cloud.dialogflow.cx.v3.CodeBlock value) { + if (codeBlockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + codeBlock_ = value; + } else { + codeBlockBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCodeBlock( + com.google.cloud.dialogflow.cx.v3.CodeBlock.Builder builderForValue) { + if (codeBlockBuilder_ == null) { + codeBlock_ = builderForValue.build(); + } else { + codeBlockBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCodeBlock(com.google.cloud.dialogflow.cx.v3.CodeBlock value) { + if (codeBlockBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && codeBlock_ != null + && codeBlock_ != com.google.cloud.dialogflow.cx.v3.CodeBlock.getDefaultInstance()) { + getCodeBlockBuilder().mergeFrom(value); + } else { + codeBlock_ = value; + } + } else { + codeBlockBuilder_.mergeFrom(value); + } + if (codeBlock_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCodeBlock() { + bitField0_ = (bitField0_ & ~0x00002000); + codeBlock_ = null; + if (codeBlockBuilder_ != null) { + codeBlockBuilder_.dispose(); + codeBlockBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.CodeBlock.Builder getCodeBlockBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getCodeBlockFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.CodeBlockOrBuilder getCodeBlockOrBuilder() { + if (codeBlockBuilder_ != null) { + return codeBlockBuilder_.getMessageOrBuilder(); + } else { + return codeBlock_ == null + ? com.google.cloud.dialogflow.cx.v3.CodeBlock.getDefaultInstance() + : codeBlock_; + } + } + + /** + * + * + *
+     * Optional. The playbook's scoped code block, which may implement handlers
+     * and actions.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.CodeBlock, + com.google.cloud.dialogflow.cx.v3.CodeBlock.Builder, + com.google.cloud.dialogflow.cx.v3.CodeBlockOrBuilder> + getCodeBlockFieldBuilder() { + if (codeBlockBuilder_ == null) { + codeBlockBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.CodeBlock, + com.google.cloud.dialogflow.cx.v3.CodeBlock.Builder, + com.google.cloud.dialogflow.cx.v3.CodeBlockOrBuilder>( + getCodeBlock(), getParentForChildren(), isClean()); + codeBlock_ = null; + } + return codeBlockBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.LlmModelSettings llmModelSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder> + llmModelSettingsBuilder_; + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings() { + if (llmModelSettingsBuilder_ == null) { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } else { + return llmModelSettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLlmModelSettings(com.google.cloud.dialogflow.cx.v3.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + llmModelSettings_ = value; + } else { + llmModelSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder builderForValue) { + if (llmModelSettingsBuilder_ == null) { + llmModelSettings_ = builderForValue.build(); + } else { + llmModelSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLlmModelSettings(com.google.cloud.dialogflow.cx.v3.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && llmModelSettings_ != null + && llmModelSettings_ + != com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance()) { + getLlmModelSettingsBuilder().mergeFrom(value); + } else { + llmModelSettings_ = value; + } + } else { + llmModelSettingsBuilder_.mergeFrom(value); + } + if (llmModelSettings_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLlmModelSettings() { + bitField0_ = (bitField0_ & ~0x00004000); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder getLlmModelSettingsBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getLlmModelSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + if (llmModelSettingsBuilder_ != null) { + return llmModelSettingsBuilder_.getMessageOrBuilder(); + } else { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + } + + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder> + getLlmModelSettingsFieldBuilder() { + if (llmModelSettingsBuilder_ == null) { + llmModelSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder>( + getLlmModelSettings(), getParentForChildren(), isClean()); + llmModelSettings_ = null; + } + return llmModelSettingsBuilder_; + } + + private java.util.List handlers_ = + java.util.Collections.emptyList(); + + private void ensureHandlersIsMutable() { + if (!((bitField0_ & 0x00008000) != 0)) { + handlers_ = new java.util.ArrayList(handlers_); + bitField0_ |= 0x00008000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler, + com.google.cloud.dialogflow.cx.v3.Handler.Builder, + com.google.cloud.dialogflow.cx.v3.HandlerOrBuilder> + handlersBuilder_; + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getHandlersList() { + if (handlersBuilder_ == null) { + return java.util.Collections.unmodifiableList(handlers_); + } else { + return handlersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getHandlersCount() { + if (handlersBuilder_ == null) { + return handlers_.size(); + } else { + return handlersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Handler getHandlers(int index) { + if (handlersBuilder_ == null) { + return handlers_.get(index); + } else { + return handlersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHandlers(int index, com.google.cloud.dialogflow.cx.v3.Handler value) { + if (handlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandlersIsMutable(); + handlers_.set(index, value); + onChanged(); + } else { + handlersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHandlers( + int index, com.google.cloud.dialogflow.cx.v3.Handler.Builder builderForValue) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.set(index, builderForValue.build()); + onChanged(); + } else { + handlersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addHandlers(com.google.cloud.dialogflow.cx.v3.Handler value) { + if (handlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandlersIsMutable(); + handlers_.add(value); + onChanged(); + } else { + handlersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addHandlers(int index, com.google.cloud.dialogflow.cx.v3.Handler value) { + if (handlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandlersIsMutable(); + handlers_.add(index, value); + onChanged(); + } else { + handlersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addHandlers(com.google.cloud.dialogflow.cx.v3.Handler.Builder builderForValue) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.add(builderForValue.build()); + onChanged(); + } else { + handlersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addHandlers( + int index, com.google.cloud.dialogflow.cx.v3.Handler.Builder builderForValue) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.add(index, builderForValue.build()); + onChanged(); + } else { + handlersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllHandlers( + java.lang.Iterable values) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, handlers_); + onChanged(); + } else { + handlersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHandlers() { + if (handlersBuilder_ == null) { + handlers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + } else { + handlersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeHandlers(int index) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.remove(index); + onChanged(); + } else { + handlersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Handler.Builder getHandlersBuilder(int index) { + return getHandlersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.HandlerOrBuilder getHandlersOrBuilder(int index) { + if (handlersBuilder_ == null) { + return handlers_.get(index); + } else { + return handlersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getHandlersOrBuilderList() { + if (handlersBuilder_ != null) { + return handlersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(handlers_); + } + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Handler.Builder addHandlersBuilder() { + return getHandlersFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Handler.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Handler.Builder addHandlersBuilder(int index) { + return getHandlersFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Handler.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of registered handlers to execuate based on the specified
+     * triggers.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getHandlersBuilderList() { + return getHandlersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler, + com.google.cloud.dialogflow.cx.v3.Handler.Builder, + com.google.cloud.dialogflow.cx.v3.HandlerOrBuilder> + getHandlersFieldBuilder() { + if (handlersBuilder_ == null) { + handlersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Handler, + com.google.cloud.dialogflow.cx.v3.Handler.Builder, + com.google.cloud.dialogflow.cx.v3.HandlerOrBuilder>( + handlers_, ((bitField0_ & 0x00008000) != 0), getParentForChildren(), isClean()); + handlers_ = null; + } + return handlersBuilder_; + } + + private int playbookType_ = 0; + + /** + * + * + *
+     * Optional. Type of the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for playbookType. + */ + @java.lang.Override + public int getPlaybookTypeValue() { + return playbookType_; + } + + /** + * + * + *
+     * Optional. Type of the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for playbookType to set. + * @return This builder for chaining. + */ + public Builder setPlaybookTypeValue(int value) { + playbookType_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Type of the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType getPlaybookType() { + com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType result = + com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType.forNumber(playbookType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Type of the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The playbookType to set. + * @return This builder for chaining. + */ + public Builder setPlaybookType(com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + playbookType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Type of the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPlaybookType() { + bitField0_ = (bitField0_ & ~0x00010000); + playbookType_ = 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.v3.Playbook) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Playbook) + private static final com.google.cloud.dialogflow.cx.v3.Playbook DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Playbook(); + } + + public static com.google.cloud.dialogflow.cx.v3.Playbook getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Playbook 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.v3.Playbook getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookImportStrategy.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookImportStrategy.java new file mode 100644 index 000000000000..bce3563ec1d1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookImportStrategy.java @@ -0,0 +1,1020 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The playbook import strategy used for resource conflict resolution associated
+ * with an
+ * [ImportPlaybookRequest][google.cloud.dialogflow.cx.v3.ImportPlaybookRequest].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookImportStrategy} + */ +public final class PlaybookImportStrategy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.PlaybookImportStrategy) + PlaybookImportStrategyOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PlaybookImportStrategy.newBuilder() to construct. + private PlaybookImportStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookImportStrategy() { + mainPlaybookImportStrategy_ = 0; + nestedResourceImportStrategy_ = 0; + toolImportStrategy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookImportStrategy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.class, + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.Builder.class); + } + + public static final int MAIN_PLAYBOOK_IMPORT_STRATEGY_FIELD_NUMBER = 4; + private int mainPlaybookImportStrategy_ = 0; + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving conflicts with
+   * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mainPlaybookImportStrategy. + */ + @java.lang.Override + public int getMainPlaybookImportStrategyValue() { + return mainPlaybookImportStrategy_; + } + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving conflicts with
+   * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainPlaybookImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportStrategy getMainPlaybookImportStrategy() { + com.google.cloud.dialogflow.cx.v3.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3.ImportStrategy.forNumber(mainPlaybookImportStrategy_); + return result == null ? com.google.cloud.dialogflow.cx.v3.ImportStrategy.UNRECOGNIZED : result; + } + + public static final int NESTED_RESOURCE_IMPORT_STRATEGY_FIELD_NUMBER = 5; + private int nestedResourceImportStrategy_ = 0; + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving referenced
+   * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nestedResourceImportStrategy. + */ + @java.lang.Override + public int getNestedResourceImportStrategyValue() { + return nestedResourceImportStrategy_; + } + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving referenced
+   * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nestedResourceImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportStrategy getNestedResourceImportStrategy() { + com.google.cloud.dialogflow.cx.v3.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3.ImportStrategy.forNumber(nestedResourceImportStrategy_); + return result == null ? com.google.cloud.dialogflow.cx.v3.ImportStrategy.UNRECOGNIZED : result; + } + + public static final int TOOL_IMPORT_STRATEGY_FIELD_NUMBER = 6; + private int toolImportStrategy_ = 0; + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving tool conflicts.
+   * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+   * main playbook and nested resource import strategies, meaning if the
+   * playbook that references the tool is skipped, the tool will also be
+   * skipped.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for toolImportStrategy. + */ + @java.lang.Override + public int getToolImportStrategyValue() { + return toolImportStrategy_; + } + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving tool conflicts.
+   * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+   * main playbook and nested resource import strategies, meaning if the
+   * playbook that references the tool is skipped, the tool will also be
+   * skipped.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportStrategy getToolImportStrategy() { + com.google.cloud.dialogflow.cx.v3.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3.ImportStrategy.forNumber(toolImportStrategy_); + return result == null ? com.google.cloud.dialogflow.cx.v3.ImportStrategy.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 (mainPlaybookImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, mainPlaybookImportStrategy_); + } + if (nestedResourceImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, nestedResourceImportStrategy_); + } + if (toolImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, toolImportStrategy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mainPlaybookImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mainPlaybookImportStrategy_); + } + if (nestedResourceImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(5, nestedResourceImportStrategy_); + } + if (toolImportStrategy_ + != com.google.cloud.dialogflow.cx.v3.ImportStrategy.IMPORT_STRATEGY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, toolImportStrategy_); + } + 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.v3.PlaybookImportStrategy)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy other = + (com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy) obj; + + if (mainPlaybookImportStrategy_ != other.mainPlaybookImportStrategy_) return false; + if (nestedResourceImportStrategy_ != other.nestedResourceImportStrategy_) return false; + if (toolImportStrategy_ != other.toolImportStrategy_) 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) + MAIN_PLAYBOOK_IMPORT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + mainPlaybookImportStrategy_; + hash = (37 * hash) + NESTED_RESOURCE_IMPORT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + nestedResourceImportStrategy_; + hash = (37 * hash) + TOOL_IMPORT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + toolImportStrategy_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy 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.v3.PlaybookImportStrategy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy 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.v3.PlaybookImportStrategy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy 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.v3.PlaybookImportStrategy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy 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.v3.PlaybookImportStrategy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy 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.v3.PlaybookImportStrategy 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.v3.PlaybookImportStrategy 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.v3.PlaybookImportStrategy 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 playbook import strategy used for resource conflict resolution associated
+   * with an
+   * [ImportPlaybookRequest][google.cloud.dialogflow.cx.v3.ImportPlaybookRequest].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookImportStrategy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.PlaybookImportStrategy) + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.class, + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mainPlaybookImportStrategy_ = 0; + nestedResourceImportStrategy_ = 0; + toolImportStrategy_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy build() { + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy buildPartial() { + com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy result = + new com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mainPlaybookImportStrategy_ = mainPlaybookImportStrategy_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nestedResourceImportStrategy_ = nestedResourceImportStrategy_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.toolImportStrategy_ = toolImportStrategy_; + } + } + + @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.v3.PlaybookImportStrategy) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy other) { + if (other == com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.getDefaultInstance()) + return this; + if (other.mainPlaybookImportStrategy_ != 0) { + setMainPlaybookImportStrategyValue(other.getMainPlaybookImportStrategyValue()); + } + if (other.nestedResourceImportStrategy_ != 0) { + setNestedResourceImportStrategyValue(other.getNestedResourceImportStrategyValue()); + } + if (other.toolImportStrategy_ != 0) { + setToolImportStrategyValue(other.getToolImportStrategyValue()); + } + 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 32: + { + mainPlaybookImportStrategy_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 32 + case 40: + { + nestedResourceImportStrategy_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 40 + case 48: + { + toolImportStrategy_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 48 + 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 int mainPlaybookImportStrategy_ = 0; + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving conflicts with
+     * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mainPlaybookImportStrategy. + */ + @java.lang.Override + public int getMainPlaybookImportStrategyValue() { + return mainPlaybookImportStrategy_; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving conflicts with
+     * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mainPlaybookImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setMainPlaybookImportStrategyValue(int value) { + mainPlaybookImportStrategy_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving conflicts with
+     * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainPlaybookImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportStrategy getMainPlaybookImportStrategy() { + com.google.cloud.dialogflow.cx.v3.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3.ImportStrategy.forNumber(mainPlaybookImportStrategy_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ImportStrategy.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving conflicts with
+     * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mainPlaybookImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setMainPlaybookImportStrategy( + com.google.cloud.dialogflow.cx.v3.ImportStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mainPlaybookImportStrategy_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving conflicts with
+     * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMainPlaybookImportStrategy() { + bitField0_ = (bitField0_ & ~0x00000001); + mainPlaybookImportStrategy_ = 0; + onChanged(); + return this; + } + + private int nestedResourceImportStrategy_ = 0; + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving referenced
+     * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nestedResourceImportStrategy. + */ + @java.lang.Override + public int getNestedResourceImportStrategyValue() { + return nestedResourceImportStrategy_; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving referenced
+     * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for nestedResourceImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setNestedResourceImportStrategyValue(int value) { + nestedResourceImportStrategy_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving referenced
+     * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nestedResourceImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportStrategy getNestedResourceImportStrategy() { + com.google.cloud.dialogflow.cx.v3.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3.ImportStrategy.forNumber(nestedResourceImportStrategy_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ImportStrategy.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving referenced
+     * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The nestedResourceImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setNestedResourceImportStrategy( + com.google.cloud.dialogflow.cx.v3.ImportStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + nestedResourceImportStrategy_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving referenced
+     * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNestedResourceImportStrategy() { + bitField0_ = (bitField0_ & ~0x00000002); + nestedResourceImportStrategy_ = 0; + onChanged(); + return this; + } + + private int toolImportStrategy_ = 0; + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving tool conflicts.
+     * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+     * main playbook and nested resource import strategies, meaning if the
+     * playbook that references the tool is skipped, the tool will also be
+     * skipped.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for toolImportStrategy. + */ + @java.lang.Override + public int getToolImportStrategyValue() { + return toolImportStrategy_; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving tool conflicts.
+     * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+     * main playbook and nested resource import strategies, meaning if the
+     * playbook that references the tool is skipped, the tool will also be
+     * skipped.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for toolImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setToolImportStrategyValue(int value) { + toolImportStrategy_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving tool conflicts.
+     * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+     * main playbook and nested resource import strategies, meaning if the
+     * playbook that references the tool is skipped, the tool will also be
+     * skipped.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolImportStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportStrategy getToolImportStrategy() { + com.google.cloud.dialogflow.cx.v3.ImportStrategy result = + com.google.cloud.dialogflow.cx.v3.ImportStrategy.forNumber(toolImportStrategy_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ImportStrategy.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving tool conflicts.
+     * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+     * main playbook and nested resource import strategies, meaning if the
+     * playbook that references the tool is skipped, the tool will also be
+     * skipped.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The toolImportStrategy to set. + * @return This builder for chaining. + */ + public Builder setToolImportStrategy(com.google.cloud.dialogflow.cx.v3.ImportStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + toolImportStrategy_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the import strategy used when resolving tool conflicts.
+     * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+     * main playbook and nested resource import strategies, meaning if the
+     * playbook that references the tool is skipped, the tool will also be
+     * skipped.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearToolImportStrategy() { + bitField0_ = (bitField0_ & ~0x00000004); + toolImportStrategy_ = 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.v3.PlaybookImportStrategy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.PlaybookImportStrategy) + private static final com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy(); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookImportStrategy 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.v3.PlaybookImportStrategy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookImportStrategyOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookImportStrategyOrBuilder.java new file mode 100644 index 000000000000..d52d8c570632 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookImportStrategyOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface PlaybookImportStrategyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.PlaybookImportStrategy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving conflicts with
+   * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mainPlaybookImportStrategy. + */ + int getMainPlaybookImportStrategyValue(); + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving conflicts with
+   * the main playbook. If not specified, 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy main_playbook_import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainPlaybookImportStrategy. + */ + com.google.cloud.dialogflow.cx.v3.ImportStrategy getMainPlaybookImportStrategy(); + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving referenced
+   * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nestedResourceImportStrategy. + */ + int getNestedResourceImportStrategyValue(); + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving referenced
+   * playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy nested_resource_import_strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nestedResourceImportStrategy. + */ + com.google.cloud.dialogflow.cx.v3.ImportStrategy getNestedResourceImportStrategy(); + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving tool conflicts.
+   * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+   * main playbook and nested resource import strategies, meaning if the
+   * playbook that references the tool is skipped, the tool will also be
+   * skipped.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for toolImportStrategy. + */ + int getToolImportStrategyValue(); + + /** + * + * + *
+   * Optional. Specifies the import strategy used when resolving tool conflicts.
+   * If not specified, 'CREATE_NEW' is assumed. This will be applied after the
+   * main playbook and nested resource import strategies, meaning if the
+   * playbook that references the tool is skipped, the tool will also be
+   * skipped.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportStrategy tool_import_strategy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolImportStrategy. + */ + com.google.cloud.dialogflow.cx.v3.ImportStrategy getToolImportStrategy(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInput.java new file mode 100644 index 000000000000..d717baf97853 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInput.java @@ -0,0 +1,651 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Input of the playbook.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookInput} + */ +public final class PlaybookInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.PlaybookInput) + PlaybookInputOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PlaybookInput.newBuilder() to construct. + private PlaybookInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookInput() { + precedingConversationSummary_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookInput.class, + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder.class); + } + + public static final int PRECEDING_CONVERSATION_SUMMARY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object precedingConversationSummary_ = ""; + + /** + * + * + *
+   * Optional. Summary string of the preceding conversation for the child
+   * playbook invocation.
+   * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The precedingConversationSummary. + */ + @java.lang.Override + public java.lang.String getPrecedingConversationSummary() { + java.lang.Object ref = precedingConversationSummary_; + 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(); + precedingConversationSummary_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Summary string of the preceding conversation for the child
+   * playbook invocation.
+   * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for precedingConversationSummary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrecedingConversationSummaryBytes() { + java.lang.Object ref = precedingConversationSummary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + precedingConversationSummary_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(precedingConversationSummary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, precedingConversationSummary_); + } + 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(precedingConversationSummary_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 1, precedingConversationSummary_); + } + 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.v3.PlaybookInput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.PlaybookInput other = + (com.google.cloud.dialogflow.cx.v3.PlaybookInput) obj; + + if (!getPrecedingConversationSummary().equals(other.getPrecedingConversationSummary())) + 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) + PRECEDING_CONVERSATION_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getPrecedingConversationSummary().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInput 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.v3.PlaybookInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInput 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.v3.PlaybookInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInput 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.v3.PlaybookInput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInput 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.v3.PlaybookInput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInput 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.v3.PlaybookInput 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.v3.PlaybookInput 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.v3.PlaybookInput 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; + } + + /** + * + * + *
+   * Input of the playbook.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookInput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.PlaybookInput) + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookInput.class, + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.PlaybookInput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + precedingConversationSummary_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInput getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInput build() { + com.google.cloud.dialogflow.cx.v3.PlaybookInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInput buildPartial() { + com.google.cloud.dialogflow.cx.v3.PlaybookInput result = + new com.google.cloud.dialogflow.cx.v3.PlaybookInput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.PlaybookInput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.precedingConversationSummary_ = precedingConversationSummary_; + } + } + + @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.v3.PlaybookInput) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.PlaybookInput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.PlaybookInput other) { + if (other == com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance()) + return this; + if (!other.getPrecedingConversationSummary().isEmpty()) { + precedingConversationSummary_ = other.precedingConversationSummary_; + bitField0_ |= 0x00000001; + 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: + { + precedingConversationSummary_ = input.readStringRequireUtf8(); + 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 java.lang.Object precedingConversationSummary_ = ""; + + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The precedingConversationSummary. + */ + public java.lang.String getPrecedingConversationSummary() { + java.lang.Object ref = precedingConversationSummary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + precedingConversationSummary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for precedingConversationSummary. + */ + public com.google.protobuf.ByteString getPrecedingConversationSummaryBytes() { + java.lang.Object ref = precedingConversationSummary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + precedingConversationSummary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The precedingConversationSummary to set. + * @return This builder for chaining. + */ + public Builder setPrecedingConversationSummary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + precedingConversationSummary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPrecedingConversationSummary() { + precedingConversationSummary_ = getDefaultInstance().getPrecedingConversationSummary(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for precedingConversationSummary to set. + * @return This builder for chaining. + */ + public Builder setPrecedingConversationSummaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + precedingConversationSummary_ = value; + bitField0_ |= 0x00000001; + 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.v3.PlaybookInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.PlaybookInput) + private static final com.google.cloud.dialogflow.cx.v3.PlaybookInput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.PlaybookInput(); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookInput 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.v3.PlaybookInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInputOrBuilder.java new file mode 100644 index 000000000000..04ba3b04247c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInputOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface PlaybookInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.PlaybookInput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Summary string of the preceding conversation for the child
+   * playbook invocation.
+   * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The precedingConversationSummary. + */ + java.lang.String getPrecedingConversationSummary(); + + /** + * + * + *
+   * Optional. Summary string of the preceding conversation for the child
+   * playbook invocation.
+   * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for precedingConversationSummary. + */ + com.google.protobuf.ByteString getPrecedingConversationSummaryBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInvocation.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInvocation.java new file mode 100644 index 000000000000..402236aaeea0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInvocation.java @@ -0,0 +1,1647 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Stores metadata of the invocation of a child playbook.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookInvocation} + */ +public final class PlaybookInvocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.PlaybookInvocation) + PlaybookInvocationOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PlaybookInvocation.newBuilder() to construct. + private PlaybookInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookInvocation() { + playbook_ = ""; + displayName_ = ""; + playbookState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookInvocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.class, + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.Builder.class); + } + + private int bitField0_; + public static final int PLAYBOOK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object playbook_ = ""; + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + @java.lang.Override + public java.lang.String getPlaybook() { + java.lang.Object ref = playbook_; + 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(); + playbook_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookBytes() { + java.lang.Object ref = playbook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. The display name of the playbook.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The display name of the playbook.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_INPUT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.PlaybookInput playbookInput_; + + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + @java.lang.Override + public boolean hasPlaybookInput() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInput getPlaybookInput() { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder getPlaybookInputOrBuilder() { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + + public static final int PLAYBOOK_OUTPUT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.PlaybookOutput playbookOutput_; + + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + @java.lang.Override + public boolean hasPlaybookOutput() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput getPlaybookOutput() { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder getPlaybookOutputOrBuilder() { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + + public static final int PLAYBOOK_STATE_FIELD_NUMBER = 4; + private int playbookState_ = 0; + + /** + * + * + *
+   * Required. Playbook invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for playbookState. + */ + @java.lang.Override + public int getPlaybookStateValue() { + return playbookState_; + } + + /** + * + * + *
+   * Required. Playbook invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.OutputState getPlaybookState() { + com.google.cloud.dialogflow.cx.v3.OutputState result = + com.google.cloud.dialogflow.cx.v3.OutputState.forNumber(playbookState_); + return result == null ? com.google.cloud.dialogflow.cx.v3.OutputState.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(playbook_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, playbook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlaybookInput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getPlaybookOutput()); + } + if (playbookState_ + != com.google.cloud.dialogflow.cx.v3.OutputState.OUTPUT_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, playbookState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + 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(playbook_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, playbook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaybookInput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPlaybookOutput()); + } + if (playbookState_ + != com.google.cloud.dialogflow.cx.v3.OutputState.OUTPUT_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, playbookState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + 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.v3.PlaybookInvocation)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation other = + (com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) obj; + + if (!getPlaybook().equals(other.getPlaybook())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasPlaybookInput() != other.hasPlaybookInput()) return false; + if (hasPlaybookInput()) { + if (!getPlaybookInput().equals(other.getPlaybookInput())) return false; + } + if (hasPlaybookOutput() != other.hasPlaybookOutput()) return false; + if (hasPlaybookOutput()) { + if (!getPlaybookOutput().equals(other.getPlaybookOutput())) return false; + } + if (playbookState_ != other.playbookState_) 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) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasPlaybookInput()) { + hash = (37 * hash) + PLAYBOOK_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookInput().hashCode(); + } + if (hasPlaybookOutput()) { + hash = (37 * hash) + PLAYBOOK_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookOutput().hashCode(); + } + hash = (37 * hash) + PLAYBOOK_STATE_FIELD_NUMBER; + hash = (53 * hash) + playbookState_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInvocation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInvocation 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.v3.PlaybookInvocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInvocation 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.v3.PlaybookInvocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInvocation 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.v3.PlaybookInvocation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInvocation 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.v3.PlaybookInvocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInvocation 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.v3.PlaybookInvocation 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.v3.PlaybookInvocation 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.v3.PlaybookInvocation 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; + } + + /** + * + * + *
+   * Stores metadata of the invocation of a child playbook.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookInvocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.PlaybookInvocation) + com.google.cloud.dialogflow.cx.v3.PlaybookInvocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.class, + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookInputFieldBuilder(); + getPlaybookOutputFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playbook_ = ""; + displayName_ = ""; + playbookInput_ = null; + if (playbookInputBuilder_ != null) { + playbookInputBuilder_.dispose(); + playbookInputBuilder_ = null; + } + playbookOutput_ = null; + if (playbookOutputBuilder_ != null) { + playbookOutputBuilder_.dispose(); + playbookOutputBuilder_ = null; + } + playbookState_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInvocation getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInvocation build() { + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookInvocation buildPartial() { + com.google.cloud.dialogflow.cx.v3.PlaybookInvocation result = + new com.google.cloud.dialogflow.cx.v3.PlaybookInvocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.PlaybookInvocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.playbook_ = playbook_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.playbookInput_ = + playbookInputBuilder_ == null ? playbookInput_ : playbookInputBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.playbookOutput_ = + playbookOutputBuilder_ == null ? playbookOutput_ : playbookOutputBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.playbookState_ = playbookState_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.PlaybookInvocation) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.PlaybookInvocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.PlaybookInvocation other) { + if (other == com.google.cloud.dialogflow.cx.v3.PlaybookInvocation.getDefaultInstance()) + return this; + if (!other.getPlaybook().isEmpty()) { + playbook_ = other.playbook_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPlaybookInput()) { + mergePlaybookInput(other.getPlaybookInput()); + } + if (other.hasPlaybookOutput()) { + mergePlaybookOutput(other.getPlaybookOutput()); + } + if (other.playbookState_ != 0) { + setPlaybookStateValue(other.getPlaybookStateValue()); + } + 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: + { + playbook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getPlaybookInputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage(getPlaybookOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 32: + { + playbookState_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 42 + 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 java.lang.Object playbook_ = ""; + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + public java.lang.String getPlaybook() { + java.lang.Object ref = playbook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + playbook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + public com.google.protobuf.ByteString getPlaybookBytes() { + java.lang.Object ref = playbook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The playbook to set. + * @return This builder for chaining. + */ + public Builder setPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPlaybook() { + playbook_ = getDefaultInstance().getPlaybook(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for playbook to set. + * @return This builder for chaining. + */ + public Builder setPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + playbook_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.PlaybookInput playbookInput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInput, + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder> + playbookInputBuilder_; + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + public boolean hasPlaybookInput() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookInput getPlaybookInput() { + if (playbookInputBuilder_ == null) { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance() + : playbookInput_; + } else { + return playbookInputBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInput(com.google.cloud.dialogflow.cx.v3.PlaybookInput value) { + if (playbookInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookInput_ = value; + } else { + playbookInputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInput( + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder builderForValue) { + if (playbookInputBuilder_ == null) { + playbookInput_ = builderForValue.build(); + } else { + playbookInputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookInput(com.google.cloud.dialogflow.cx.v3.PlaybookInput value) { + if (playbookInputBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && playbookInput_ != null + && playbookInput_ + != com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance()) { + getPlaybookInputBuilder().mergeFrom(value); + } else { + playbookInput_ = value; + } + } else { + playbookInputBuilder_.mergeFrom(value); + } + if (playbookInput_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookInput() { + bitField0_ = (bitField0_ & ~0x00000004); + playbookInput_ = null; + if (playbookInputBuilder_ != null) { + playbookInputBuilder_.dispose(); + playbookInputBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder getPlaybookInputBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPlaybookInputFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder getPlaybookInputOrBuilder() { + if (playbookInputBuilder_ != null) { + return playbookInputBuilder_.getMessageOrBuilder(); + } else { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + } + + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInput, + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder> + getPlaybookInputFieldBuilder() { + if (playbookInputBuilder_ == null) { + playbookInputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookInput, + com.google.cloud.dialogflow.cx.v3.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder>( + getPlaybookInput(), getParentForChildren(), isClean()); + playbookInput_ = null; + } + return playbookInputBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.PlaybookOutput playbookOutput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder> + playbookOutputBuilder_; + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + public boolean hasPlaybookOutput() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput getPlaybookOutput() { + if (playbookOutputBuilder_ == null) { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } else { + return playbookOutputBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookOutput(com.google.cloud.dialogflow.cx.v3.PlaybookOutput value) { + if (playbookOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookOutput_ = value; + } else { + playbookOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookOutput( + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder builderForValue) { + if (playbookOutputBuilder_ == null) { + playbookOutput_ = builderForValue.build(); + } else { + playbookOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookOutput(com.google.cloud.dialogflow.cx.v3.PlaybookOutput value) { + if (playbookOutputBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && playbookOutput_ != null + && playbookOutput_ + != com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance()) { + getPlaybookOutputBuilder().mergeFrom(value); + } else { + playbookOutput_ = value; + } + } else { + playbookOutputBuilder_.mergeFrom(value); + } + if (playbookOutput_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookOutput() { + bitField0_ = (bitField0_ & ~0x00000008); + playbookOutput_ = null; + if (playbookOutputBuilder_ != null) { + playbookOutputBuilder_.dispose(); + playbookOutputBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder getPlaybookOutputBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPlaybookOutputFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder getPlaybookOutputOrBuilder() { + if (playbookOutputBuilder_ != null) { + return playbookOutputBuilder_.getMessageOrBuilder(); + } else { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + } + + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder> + getPlaybookOutputFieldBuilder() { + if (playbookOutputBuilder_ == null) { + playbookOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder>( + getPlaybookOutput(), getParentForChildren(), isClean()); + playbookOutput_ = null; + } + return playbookOutputBuilder_; + } + + private int playbookState_ = 0; + + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for playbookState. + */ + @java.lang.Override + public int getPlaybookStateValue() { + return playbookState_; + } + + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for playbookState to set. + * @return This builder for chaining. + */ + public Builder setPlaybookStateValue(int value) { + playbookState_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.OutputState getPlaybookState() { + com.google.cloud.dialogflow.cx.v3.OutputState result = + com.google.cloud.dialogflow.cx.v3.OutputState.forNumber(playbookState_); + return result == null ? com.google.cloud.dialogflow.cx.v3.OutputState.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The playbookState to set. + * @return This builder for chaining. + */ + public Builder setPlaybookState(com.google.cloud.dialogflow.cx.v3.OutputState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + playbookState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPlaybookState() { + bitField0_ = (bitField0_ & ~0x00000010); + playbookState_ = 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.v3.PlaybookInvocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.PlaybookInvocation) + private static final com.google.cloud.dialogflow.cx.v3.PlaybookInvocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.PlaybookInvocation(); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookInvocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookInvocation 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.v3.PlaybookInvocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInvocationOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInvocationOrBuilder.java new file mode 100644 index 000000000000..b2f7d3a613b9 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookInvocationOrBuilder.java @@ -0,0 +1,202 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface PlaybookInvocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.PlaybookInvocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + java.lang.String getPlaybook(); + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + com.google.protobuf.ByteString getPlaybookBytes(); + + /** + * + * + *
+   * Output only. The display name of the playbook.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. The display name of the playbook.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + boolean hasPlaybookInput(); + + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + com.google.cloud.dialogflow.cx.v3.PlaybookInput getPlaybookInput(); + + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookInputOrBuilder getPlaybookInputOrBuilder(); + + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + boolean hasPlaybookOutput(); + + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOutput getPlaybookOutput(); + + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder getPlaybookOutputOrBuilder(); + + /** + * + * + *
+   * Required. Playbook invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for playbookState. + */ + int getPlaybookStateValue(); + + /** + * + * + *
+   * Required. Playbook invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookState. + */ + com.google.cloud.dialogflow.cx.v3.OutputState getPlaybookState(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookName.java new file mode 100644 index 000000000000..edef3c139ce4 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PlaybookName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_PLAYBOOK = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String playbook; + + @Deprecated + protected PlaybookName() { + project = null; + location = null; + agent = null; + playbook = null; + } + + private PlaybookName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + playbook = Preconditions.checkNotNull(builder.getPlaybook()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PlaybookName of(String project, String location, String agent, String playbook) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .build(); + } + + public static String format(String project, String location, String agent, String playbook) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .build() + .toString(); + } + + public static PlaybookName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_PLAYBOOK.validatedMatch( + formattedString, "PlaybookName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("playbook")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PlaybookName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_PLAYBOOK.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (playbook != null) { + fieldMapBuilder.put("playbook", playbook); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_PLAYBOOK.instantiate( + "project", project, "location", location, "agent", agent, "playbook", playbook); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PlaybookName that = ((PlaybookName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.playbook, that.playbook); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(playbook); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}. */ + public static class Builder { + private String project; + private String location; + private String agent; + private String playbook; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setPlaybook(String playbook) { + this.playbook = playbook; + return this; + } + + private Builder(PlaybookName playbookName) { + this.project = playbookName.project; + this.location = playbookName.location; + this.agent = playbookName.agent; + this.playbook = playbookName.playbook; + } + + public PlaybookName build() { + return new PlaybookName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOrBuilder.java new file mode 100644 index 000000000000..64896cf6c5ef --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOrBuilder.java @@ -0,0 +1,845 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface PlaybookOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Playbook) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The human-readable name of the playbook, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Required. The human-readable name of the playbook, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. High level description of the goal the playbook intend to
+   * accomplish. A goal should be concise since it's visible to other playbooks
+   * that may reference this playbook.
+   * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The goal. + */ + java.lang.String getGoal(); + + /** + * + * + *
+   * Required. High level description of the goal the playbook intend to
+   * accomplish. A goal should be concise since it's visible to other playbooks
+   * that may reference this playbook.
+   * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for goal. + */ + com.google.protobuf.ByteString getGoalBytes(); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getInputParameterDefinitionsList(); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ParameterDefinition getInputParameterDefinitions(int index); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getInputParameterDefinitionsCount(); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getInputParameterDefinitionsOrBuilderList(); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getOutputParameterDefinitionsList(); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ParameterDefinition getOutputParameterDefinitions(int index); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getOutputParameterDefinitionsCount(); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getOutputParameterDefinitionsOrBuilderList(); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index); + + /** + * + * + *
+   * Instruction to accomplish target goal.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + * + * @return Whether the instruction field is set. + */ + boolean hasInstruction(); + + /** + * + * + *
+   * Instruction to accomplish target goal.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + * + * @return The instruction. + */ + com.google.cloud.dialogflow.cx.v3.Playbook.Instruction getInstruction(); + + /** + * + * + *
+   * Instruction to accomplish target goal.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook.Instruction instruction = 17; + */ + com.google.cloud.dialogflow.cx.v3.Playbook.InstructionOrBuilder getInstructionOrBuilder(); + + /** + * + * + *
+   * Output only. Estimated number of tokes current playbook takes when sent to
+   * the LLM.
+   * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + long getTokenCount(); + + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedPlaybooks. + */ + java.util.List getReferencedPlaybooksList(); + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedPlaybooks. + */ + int getReferencedPlaybooksCount(); + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedPlaybooks at the given index. + */ + java.lang.String getReferencedPlaybooks(int index); + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedPlaybooks at the given index. + */ + com.google.protobuf.ByteString getReferencedPlaybooksBytes(int index); + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedFlows. + */ + java.util.List getReferencedFlowsList(); + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedFlows. + */ + int getReferencedFlowsCount(); + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedFlows at the given index. + */ + java.lang.String getReferencedFlows(int index); + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedFlows at the given index. + */ + com.google.protobuf.ByteString getReferencedFlowsBytes(int index); + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedTools. + */ + java.util.List getReferencedToolsList(); + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedTools. + */ + int getReferencedToolsCount(); + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedTools at the given index. + */ + java.lang.String getReferencedTools(int index); + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedTools at the given index. + */ + com.google.protobuf.ByteString getReferencedToolsBytes(int index); + + /** + * + * + *
+   * Optional. Output only. Names of inline actions scoped to this playbook.
+   * These actions are in addition to those belonging to referenced tools, child
+   * playbooks, and flows, e.g. actions that are defined in the playbook's code
+   * block.
+   * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the inlineActions. + */ + java.util.List getInlineActionsList(); + + /** + * + * + *
+   * Optional. Output only. Names of inline actions scoped to this playbook.
+   * These actions are in addition to those belonging to referenced tools, child
+   * playbooks, and flows, e.g. actions that are defined in the playbook's code
+   * block.
+   * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of inlineActions. + */ + int getInlineActionsCount(); + + /** + * + * + *
+   * Optional. Output only. Names of inline actions scoped to this playbook.
+   * These actions are in addition to those belonging to referenced tools, child
+   * playbooks, and flows, e.g. actions that are defined in the playbook's code
+   * block.
+   * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The inlineActions at the given index. + */ + java.lang.String getInlineActions(int index); + + /** + * + * + *
+   * Optional. Output only. Names of inline actions scoped to this playbook.
+   * These actions are in addition to those belonging to referenced tools, child
+   * playbooks, and flows, e.g. actions that are defined in the playbook's code
+   * block.
+   * 
+ * + * + * repeated string inline_actions = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the inlineActions at the given index. + */ + com.google.protobuf.ByteString getInlineActionsBytes(int index); + + /** + * + * + *
+   * Optional. The playbook's scoped code block, which may implement handlers
+   * and actions.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the codeBlock field is set. + */ + boolean hasCodeBlock(); + + /** + * + * + *
+   * Optional. The playbook's scoped code block, which may implement handlers
+   * and actions.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The codeBlock. + */ + com.google.cloud.dialogflow.cx.v3.CodeBlock getCodeBlock(); + + /** + * + * + *
+   * Optional. The playbook's scoped code block, which may implement handlers
+   * and actions.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.CodeBlock code_block = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.CodeBlockOrBuilder getCodeBlockOrBuilder(); + + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + boolean hasLlmModelSettings(); + + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings(); + + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getHandlersList(); + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.Handler getHandlers(int index); + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getHandlersCount(); + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getHandlersOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of registered handlers to execuate based on the specified
+   * triggers.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Handler handlers = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.HandlerOrBuilder getHandlersOrBuilder(int index); + + /** + * + * + *
+   * Optional. Type of the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for playbookType. + */ + int getPlaybookTypeValue(); + + /** + * + * + *
+   * Optional. Type of the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook.PlaybookType playbook_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookType. + */ + com.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType getPlaybookType(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOutput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOutput.java new file mode 100644 index 000000000000..d4cc6333090b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOutput.java @@ -0,0 +1,634 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Output of the playbook.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookOutput} + */ +public final class PlaybookOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.PlaybookOutput) + PlaybookOutputOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PlaybookOutput.newBuilder() to construct. + private PlaybookOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookOutput() { + executionSummary_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookOutput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.class, + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder.class); + } + + public static final int EXECUTION_SUMMARY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object executionSummary_ = ""; + + /** + * + * + *
+   * Optional. Summary string of the execution result of the child playbook.
+   * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The executionSummary. + */ + @java.lang.Override + public java.lang.String getExecutionSummary() { + java.lang.Object ref = executionSummary_; + 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(); + executionSummary_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Summary string of the execution result of the child playbook.
+   * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for executionSummary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionSummaryBytes() { + java.lang.Object ref = executionSummary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionSummary_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionSummary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, executionSummary_); + } + 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(executionSummary_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, executionSummary_); + } + 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.v3.PlaybookOutput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.PlaybookOutput other = + (com.google.cloud.dialogflow.cx.v3.PlaybookOutput) obj; + + if (!getExecutionSummary().equals(other.getExecutionSummary())) 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) + EXECUTION_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getExecutionSummary().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookOutput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookOutput 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.v3.PlaybookOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookOutput 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.v3.PlaybookOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookOutput 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.v3.PlaybookOutput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookOutput 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.v3.PlaybookOutput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookOutput 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.v3.PlaybookOutput 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.v3.PlaybookOutput 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.v3.PlaybookOutput 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; + } + + /** + * + * + *
+   * Output of the playbook.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.PlaybookOutput) + com.google.cloud.dialogflow.cx.v3.PlaybookOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.class, + com.google.cloud.dialogflow.cx.v3.PlaybookOutput.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.PlaybookOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + executionSummary_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput build() { + com.google.cloud.dialogflow.cx.v3.PlaybookOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOutput buildPartial() { + com.google.cloud.dialogflow.cx.v3.PlaybookOutput result = + new com.google.cloud.dialogflow.cx.v3.PlaybookOutput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.PlaybookOutput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.executionSummary_ = executionSummary_; + } + } + + @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.v3.PlaybookOutput) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.PlaybookOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.PlaybookOutput other) { + if (other == com.google.cloud.dialogflow.cx.v3.PlaybookOutput.getDefaultInstance()) + return this; + if (!other.getExecutionSummary().isEmpty()) { + executionSummary_ = other.executionSummary_; + bitField0_ |= 0x00000001; + 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: + { + executionSummary_ = input.readStringRequireUtf8(); + 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 java.lang.Object executionSummary_ = ""; + + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The executionSummary. + */ + public java.lang.String getExecutionSummary() { + java.lang.Object ref = executionSummary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionSummary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for executionSummary. + */ + public com.google.protobuf.ByteString getExecutionSummaryBytes() { + java.lang.Object ref = executionSummary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionSummary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The executionSummary to set. + * @return This builder for chaining. + */ + public Builder setExecutionSummary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + executionSummary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExecutionSummary() { + executionSummary_ = getDefaultInstance().getExecutionSummary(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for executionSummary to set. + * @return This builder for chaining. + */ + public Builder setExecutionSummaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + executionSummary_ = value; + bitField0_ |= 0x00000001; + 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.v3.PlaybookOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.PlaybookOutput) + private static final com.google.cloud.dialogflow.cx.v3.PlaybookOutput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.PlaybookOutput(); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookOutput 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.v3.PlaybookOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOutputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOutputOrBuilder.java new file mode 100644 index 000000000000..4b7b6041e8dc --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookOutputOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface PlaybookOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.PlaybookOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Summary string of the execution result of the child playbook.
+   * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The executionSummary. + */ + java.lang.String getExecutionSummary(); + + /** + * + * + *
+   * Optional. Summary string of the execution result of the child playbook.
+   * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for executionSummary. + */ + com.google.protobuf.ByteString getExecutionSummaryBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookProto.java new file mode 100644 index 000000000000..0e76d00afdbd --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookProto.java @@ -0,0 +1,647 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public final class PlaybookProto { + private PlaybookProto() {} + + 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_v3_CreatePlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Playbook_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Playbook_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Handler_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Handler_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_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/v3/playbook" + + ".proto\022\035google.cloud.dialogflow.cx.v3\032\034g" + + "oogle/api/annotations.proto\032\027google/api/" + + "client.proto\032\037google/api/field_behavior." + + "proto\032\031google/api/resource.proto\032.google" + + "/cloud/dialogflow/cx/v3/code_block.proto\032+google/cloud/dialogflow/cx/v3/example." + + "proto\032/google/cloud/dialogflow/cx/v3/fulfillment.proto\0327google/cloud/dialogflow/" + + "cx/v3/generative_settings.proto\0323google/cloud/dialogflow/cx/v3/import_strategy.p" + + "roto\0328google/cloud/dialogflow/cx/v3/parameter_definition.proto\032#google/longrunni" + + "ng/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.pro" + + "to\032\034google/protobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\223\001\n" + + "\025CreatePlaybookRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"dialogflow.googleapis.com/Playbook\022>\n" + + "\010playbook\030\002" + + " \001(\0132\'.google.cloud.dialogflow.cx.v3.PlaybookB\003\340A\002\"Q\n" + + "\025DeletePlaybookRequest\0228\n" + + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"dialogflow.googleapis.com/Playbook\"y\n" + + "\024ListPlaybooksRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"dialogflow.googleapis.com/Playbook\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\"l\n" + + "\025ListPlaybooksResponse\022:\n" + + "\tplaybooks\030\001 \003(\0132\'.google.cloud.dialogflow.cx.v3.Playbook\022\027\n" + + "\017next_page_token\030\002 \001(\t\"N\n" + + "\022GetPlaybookRequest\0228\n" + + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"dialogflow.googleapis.com/Playbook\"\210\001\n" + + "\025UpdatePlaybookRequest\022>\n" + + "\010playbook\030\001" + + " \001(\0132\'.google.cloud.dialogflow.cx.v3.PlaybookB\003\340A\002\022/\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"\347\n\n" + + "\010Playbook\022\014\n" + + "\004name\030\001 \001(\t\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022\021\n" + + "\004goal\030\003 \001(\tB\003\340A\002\022\\\n" + + "\033input_parameter_definitions\030\005" + + " \003(\01322.google.cloud.dialogflow.cx.v3.ParameterDefinitionB\003\340A\001\022]\n" + + "\034output_parameter_definitions\030\006 \003(\01322.go" + + "ogle.cloud.dialogflow.cx.v3.ParameterDefinitionB\003\340A\001\022H\n" + + "\013instruction\030\021 \001(\01323.goog" + + "le.cloud.dialogflow.cx.v3.Playbook.Instruction\022\030\n" + + "\013token_count\030\010 \001(\003B\003\340A\003\0224\n" + + "\013create_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022H\n" + + "\024referenced_playbooks\030\013 \003(\tB*\340A\003\372A$\n" + + "\"dialogflow.googleapis.com/Playbook\022@\n" + + "\020referenced_flows\030\014 \003(\tB&\340A\003\372A \n" + + "\036dialogflow.googleapis.com/Flow\022@\n" + + "\020referenced_tools\030\r" + + " \003(\tB&\340A\001\372A \n" + + "\036dialogflow.googleapis.com/Tool\022\036\n" + + "\016inline_actions\030\026 \003(\tB\006\340A\001\340A\003\022A\n\n" + + "code_block\030\025 \001(\0132(" + + ".google.cloud.dialogflow.cx.v3.CodeBlockB\003\340A\001\022P\n" + + "\022llm_model_settings\030\016 \001(\0132/.goog" + + "le.cloud.dialogflow.cx.v3.LlmModelSettingsB\003\340A\001\022=\n" + + "\010handlers\030\020" + + " \003(\0132&.google.cloud.dialogflow.cx.v3.HandlerB\003\340A\001\022P\n\r" + + "playbook_type\030\023" + + " \001(\01624.google.cloud.dialogflow.cx.v3.Playbook.PlaybookTypeB\003\340A\001\032b\n" + + "\004Step\022\016\n" + + "\004text\030\001 \001(\tH\000\022;\n" + + "\005steps\030\002 \003(\0132,.google.cloud.dialogflow.cx.v3.Playbook.StepB\r\n" + + "\013instruction\032^\n" + + "\013Instruction\022\022\n\n" + + "guidelines\030\001 \001(\t\022;\n" + + "\005steps\030\002 \003(\0132,.google.cloud.dialogflow.cx.v3.Playbook.Step\"D\n" + + "\014PlaybookType\022\035\n" + + "\031PLAYBOOK_TYPE_UNSPECIFIED\020\000\022\010\n" + + "\004TASK\020\001\022\013\n" + + "\007ROUTINE\020\003:t\352Aq\n" + + "\"dialogflow.googleapis.com/Playbook\022Kprojects/{project}/" + + "locations/{location}/agents/{agent}/playbooks/{playbook}\"\260\001\n" + + "\034CreatePlaybookVersionRequest\022A\n" + + "\006parent\030\001 \001(" + + "\tB1\340A\002\372A+\022)dialogflow.googleapis.com/PlaybookVersion\022M\n" + + "\020playbook_version\030\002" + + " \001(\0132..google.cloud.dialogflow.cx.v3.PlaybookVersionB\003\340A\002\"\243\003\n" + + "\017PlaybookVersion\022\014\n" + + "\004name\030\001 \001(\t\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\001\022>\n" + + "\010playbook\030\003 \001(\0132\'.goog" + + "le.cloud.dialogflow.cx.v3.PlaybookB\003\340A\003\022=\n" + + "\010examples\030\004" + + " \003(\0132&.google.cloud.dialogflow.cx.v3.ExampleB\003\340A\003\0224\n" + + "\013update_time\030\005 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003:\262\001\352A\256\001\n" + + ")dialogflow.googleapis.com/PlaybookVersion\022^projects/{project}/locations/{lo" + + "cation}/agents/{agent}/playbooks/{playbo" + + "ok}/versions/{version}*\020playbookVersions2\017playbookVersion\"\\\n" + + "\031GetPlaybookVersionRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")dialogflow.googleapis.com/PlaybookVersion\"`\n" + + "\035RestorePlaybookVersionRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")dialogflow.googleapis.com/PlaybookVersion\"[\n" + + "\036RestorePlaybookVersionResponse\0229\n" + + "\010playbook\030\002 \001(\0132\'.google.cloud.dialogflow.cx.v3.Playbook\"\221\001\n" + + "\033ListPlaybookVersionsRequest\022A\n" + + "\006parent\030\001 \001(\tB1\340A\002\372A+\022)" + + "dialogflow.googleapis.com/PlaybookVersion\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\202\001\n" + + "\034ListPlaybookVersionsResponse\022I\n" + + "\021playbook_versions\030\001 \003(\0132..google." + + "cloud.dialogflow.cx.v3.PlaybookVersion\022\027\n" + + "\017next_page_token\030\002 \001(\t\"_\n" + + "\034DeletePlaybookVersionRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")dialogflow.googleapis.com/PlaybookVersion\"\206\002\n" + + "\025ExportPlaybookRequest\0228\n" + + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"dialogflow.googleapis.com/Playbook\022\031\n" + + "\014playbook_uri\030\002 \001(\tB\003\340A\001\022Y\n" + + "\013data_format\030\003 \001(\0162?.google.cloud.dialogflow.c" + + "x.v3.ExportPlaybookRequest.DataFormatB\003\340A\001\"=\n\n" + + "DataFormat\022\033\n" + + "\027DATA_FORMAT_UNSPECIFIED\020\000\022\010\n" + + "\004BLOB\020\001\022\010\n" + + "\004JSON\020\002\"\350\001\n" + + "\025ImportPlaybookRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"dialogflow.googleapis.com/Playbook\022\026\n" + + "\014playbook_uri\030\002 \001(\tH\000\022\032\n" + + "\020playbook_content\030\003 \001(\014H\000\022S\n" + + "\017import_strategy\030\004 \001(\01325.google.cl" + + "oud.dialogflow.cx.v3.PlaybookImportStrategyB\003\340A\001B\n\n" + + "\010playbook\"\242\002\n" + + "\026PlaybookImportStrategy\022Y\n" + + "\035main_playbook_import_strategy\030\004" + + " \001(\0162-.google.cloud.dialogflow.cx.v3.ImportStrategyB\003\340A\001\022[\n" + + "\037nested_resource_import_strategy\030\005" + + " \001(\0162-.google.cloud.dialogflow.cx.v3.ImportStrategyB\003\340A\001\022P\n" + + "\024tool_import_strategy\030\006" + + " \001(\0162-.google.cloud.dialogflow.cx.v3.ImportStrategyB\003\340A\001\"\275\002\n" + + "\026ImportPlaybookResponse\0229\n" + + "\010playbook\030\001 \001(\tB\'\372A$\n" + + "\"dialogflow.googleapis.com/Playbook\022i\n" + + "\025conflicting_resources\030\002 \001(\0132J.google." + + "cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources\032}\n" + + "\024ConflictingResources\022\"\n" + + "\032main_playbook_display_name\030\001 \001(\t\022%\n" + + "\035nested_playbook_display_names\030\002 \003(\t\022\032\n" + + "\022tool_display_names\030\003 \003(\t\"X\n" + + "\026ExportPlaybookResponse\022\026\n" + + "\014playbook_uri\030\001 \001(\tH\000\022\032\n" + + "\020playbook_content\030\002 \001(\014H\000B\n\n" + + "\010playbook\"\314\003\n" + + "\007Handler\022L\n\r" + + "event_handler\030\001 \001(\01323" + + ".google.cloud.dialogflow.cx.v3.Handler.EventHandlerH\000\022T\n" + + "\021lifecycle_handler\030\003 \001(\013" + + "27.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandlerH\000\032\200\001\n" + + "\014EventHandler\022\022\n" + + "\005event\030\001 \001(\tB\003\340A\002\022\026\n" + + "\tcondition\030\003 \001(\tB\003\340A\001\022D\n" + + "\013fulfillment\030\002" + + " \001(\0132*.google.cloud.dialogflow.cx.v3.FulfillmentB\003\340A\002\032\216\001\n" + + "\020LifecycleHandler\022\034\n" + + "\017lifecycle_stage\030\001 \001(\tB\003\340A\002\022\026\n" + + "\tcondition\030\002 \001(\tB\003\340A\001\022D\n" + + "\013fulfillment\030\003" + + " \001(\0132*.google.cloud.dialogflow.cx.v3.FulfillmentB\003\340A\002B\t\n" + + "\007handler2\207\025\n" + + "\tPlaybooks\022\313\001\n" + + "\016CreatePlaybook\0224.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest\032\'.goog" + + "le.cloud.dialogflow.cx.v3.Playbook\"Z\332A\017p" + + "arent,playbook\202\323\344\223\002B\"6/v3/{parent=projec" + + "ts/*/locations/*/agents/*}/playbooks:\010playbook\022\245\001\n" + + "\016DeletePlaybook\0224.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest\032" + + "\026.google.protobuf.Empty\"E\332A\004name\202\323\344\223\0028*6" + + "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}\022\303\001\n\r" + + "ListPlaybooks\0223.google.cloud.dialogflow.cx.v3.ListPlaybooksRe" + + "quest\0324.google.cloud.dialogflow.cx.v3.Li" + + "stPlaybooksResponse\"G\332A\006parent\202\323\344\223\0028\0226/v" + + "3/{parent=projects/*/locations/*/agents/*}/playbooks\022\260\001\n" + + "\013GetPlaybook\0221.google.cloud.dialogflow.cx.v3.GetPlaybookRequest\032" + + "\'.google.cloud.dialogflow.cx.v3.Playbook" + + "\"E\332A\004name\202\323\344\223\0028\0226/v3/{name=projects/*/locations/*/agents/*/playbooks/*}\022\342\001\n" + + "\016ExportPlaybook\0224.google.cloud.dialogflow.cx." + + "v3.ExportPlaybookRequest\032\035.google.longrunning.Operation\"{\312A0\n" + + "\026ExportPlaybookResponse\022\026google.protobuf.Struct\202\323\344\223\002B\"=/v3/" + + "{name=projects/*/locations/*/agents/*/playbooks/*}:export:\001*\022\342\001\n" + + "\016ImportPlaybook\0224.google.cloud.dialogflow.cx.v3.ImportPl" + + "aybookRequest\032\035.google.longrunning.Operation\"{\312A0\n" + + "\026ImportPlaybookResponse\022\026googl" + + "e.protobuf.Struct\202\323\344\223\002B\"=/v3/{parent=pro" + + "jects/*/locations/*/agents/*}/playbooks:import:\001*\022\331\001\n" + + "\016UpdatePlaybook\0224.google.cloud.dialogflow.cx.v3.UpdatePlaybookReque" + + "st\032\'.google.cloud.dialogflow.cx.v3.Playb" + + "ook\"h\332A\024playbook,update_mask\202\323\344\223\002K2?/v3/" + + "{playbook.name=projects/*/locations/*/agents/*/playbooks/*}:\010playbook\022\373\001\n" + + "\025CreatePlaybookVersion\022;.google.cloud.dialogflo" + + "w.cx.v3.CreatePlaybookVersionRequest\032..google.cloud.dialogflow.cx.v3.PlaybookVer" + + "sion\"u\332A\027parent,playbook_version\202\323\344\223\002U\"A" + + "/v3/{parent=projects/*/locations/*/agent" + + "s/*/playbooks/*}/versions:\020playbook_version\022\320\001\n" + + "\022GetPlaybookVersion\0228.google.cloud.dialogflow.cx.v3.GetPlaybookVersionReq" + + "uest\032..google.cloud.dialogflow.cx.v3.Pla" + + "ybookVersion\"P\332A\004name\202\323\344\223\002C\022A/v3/{name=p" + + "rojects/*/locations/*/agents/*/playbooks/*/versions/*}\022\362\001\n" + + "\026RestorePlaybookVersion\022<.google.cloud.dialogflow.cx.v3.Restor" + + "ePlaybookVersionRequest\032=.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRe" + + "sponse\"[\332A\004name\202\323\344\223\002N\"I/v3/{name=project" + + "s/*/locations/*/agents/*/playbooks/*/versions/*}:restore:\001*\022\343\001\n" + + "\024ListPlaybookVersions\022:.google.cloud.dialogflow.cx.v3.Lis" + + "tPlaybookVersionsRequest\032;.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRes" + + "ponse\"R\332A\006parent\202\323\344\223\002C\022A/v3/{parent=proj" + + "ects/*/locations/*/agents/*/playbooks/*}/versions\022\276\001\n" + + "\025DeletePlaybookVersion\022;.google.cloud.dialogflow.cx.v3.DeletePlaybo" + + "okVersionRequest\032\026.google.protobuf.Empty" + + "\"P\332A\004name\202\323\344\223\002C*A/v3/{name=projects/*/lo" + + "cations/*/agents/*/playbooks/*/versions/" + + "*}\032x\312A\031dialogflow.googleapis.com\322AYhttps" + + "://www.googleapis.com/auth/cloud-platfor" + + "m,https://www.googleapis.com/auth/dialogflowB\214\001\n" + + "!com.google.cloud.dialogflow.cx.v3B\r" + + "PlaybookProtoP\001Z1cloud.google.com/go" + + "/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Go" + + "ogle.Cloud.Dialogflow.Cx.V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + 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.v3.CodeBlockProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ExampleProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.FulfillmentProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ImportStrategyProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookRequest_descriptor, + new java.lang.String[] { + "Parent", "Playbook", + }); + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybooksResponse_descriptor, + new java.lang.String[] { + "Playbooks", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_descriptor, + new java.lang.String[] { + "Playbook", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3_Playbook_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3_Playbook_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Playbook_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Goal", + "InputParameterDefinitions", + "OutputParameterDefinitions", + "Instruction", + "TokenCount", + "CreateTime", + "UpdateTime", + "ReferencedPlaybooks", + "ReferencedFlows", + "ReferencedTools", + "InlineActions", + "CodeBlock", + "LlmModelSettings", + "Handlers", + "PlaybookType", + }); + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Playbook_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Step_descriptor, + new java.lang.String[] { + "Text", "Steps", "Instruction", + }); + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Playbook_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Playbook_Instruction_descriptor, + new java.lang.String[] { + "Guidelines", "Steps", + }); + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CreatePlaybookVersionRequest_descriptor, + new java.lang.String[] { + "Parent", "PlaybookVersion", + }); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_descriptor, + new java.lang.String[] { + "Name", "Description", "Playbook", "Examples", "UpdateTime", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetPlaybookVersionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_descriptor, + new java.lang.String[] { + "Playbook", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListPlaybookVersionsResponse_descriptor, + new java.lang.String[] { + "PlaybookVersions", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DeletePlaybookVersionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookRequest_descriptor, + new java.lang.String[] { + "Name", "PlaybookUri", "DataFormat", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookRequest_descriptor, + new java.lang.String[] { + "Parent", "PlaybookUri", "PlaybookContent", "ImportStrategy", "Playbook", + }); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_PlaybookImportStrategy_descriptor, + new java.lang.String[] { + "MainPlaybookImportStrategy", "NestedResourceImportStrategy", "ToolImportStrategy", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_descriptor, + new java.lang.String[] { + "Playbook", "ConflictingResources", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportPlaybookResponse_ConflictingResources_descriptor, + new java.lang.String[] { + "MainPlaybookDisplayName", "NestedPlaybookDisplayNames", "ToolDisplayNames", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ExportPlaybookResponse_descriptor, + new java.lang.String[] { + "PlaybookUri", "PlaybookContent", "Playbook", + }); + internal_static_google_cloud_dialogflow_cx_v3_Handler_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_dialogflow_cx_v3_Handler_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Handler_descriptor, + new java.lang.String[] { + "EventHandler", "LifecycleHandler", "Handler", + }); + internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Handler_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Handler_EventHandler_descriptor, + new java.lang.String[] { + "Event", "Condition", "Fulfillment", + }); + internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Handler_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Handler_LifecycleHandler_descriptor, + new java.lang.String[] { + "LifecycleStage", "Condition", "Fulfillment", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + 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.v3.CodeBlockProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ExampleProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.FulfillmentProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ImportStrategyProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookTransition.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookTransition.java new file mode 100644 index 000000000000..8481072f4e94 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookTransition.java @@ -0,0 +1,853 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Stores metadata of the transition to another target playbook. Playbook
+ * transition actions exit the caller playbook and enter the target playbook.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookTransition} + */ +public final class PlaybookTransition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.PlaybookTransition) + PlaybookTransitionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PlaybookTransition.newBuilder() to construct. + private PlaybookTransition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookTransition() { + playbook_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookTransition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.class, + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.Builder.class); + } + + public static final int PLAYBOOK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object playbook_ = ""; + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + @java.lang.Override + public java.lang.String getPlaybook() { + java.lang.Object ref = playbook_; + 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(); + playbook_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookBytes() { + java.lang.Object ref = playbook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. The display name of the playbook.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The display name of the playbook.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playbook_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, playbook_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + 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(playbook_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, playbook_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + 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.v3.PlaybookTransition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.PlaybookTransition other = + (com.google.cloud.dialogflow.cx.v3.PlaybookTransition) obj; + + if (!getPlaybook().equals(other.getPlaybook())) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookTransition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookTransition 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.v3.PlaybookTransition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookTransition 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.v3.PlaybookTransition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookTransition 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.v3.PlaybookTransition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookTransition 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.v3.PlaybookTransition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookTransition 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.v3.PlaybookTransition 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.v3.PlaybookTransition 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.v3.PlaybookTransition 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; + } + + /** + * + * + *
+   * Stores metadata of the transition to another target playbook. Playbook
+   * transition actions exit the caller playbook and enter the target playbook.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookTransition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.PlaybookTransition) + com.google.cloud.dialogflow.cx.v3.PlaybookTransitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.class, + com.google.cloud.dialogflow.cx.v3.PlaybookTransition.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.PlaybookTransition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playbook_ = ""; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookTransition getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookTransition build() { + com.google.cloud.dialogflow.cx.v3.PlaybookTransition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookTransition buildPartial() { + com.google.cloud.dialogflow.cx.v3.PlaybookTransition result = + new com.google.cloud.dialogflow.cx.v3.PlaybookTransition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.PlaybookTransition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.playbook_ = playbook_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + } + + @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.v3.PlaybookTransition) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.PlaybookTransition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.PlaybookTransition other) { + if (other == com.google.cloud.dialogflow.cx.v3.PlaybookTransition.getDefaultInstance()) + return this; + if (!other.getPlaybook().isEmpty()) { + playbook_ = other.playbook_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + 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: + { + playbook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 java.lang.Object playbook_ = ""; + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + public java.lang.String getPlaybook() { + java.lang.Object ref = playbook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + playbook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + public com.google.protobuf.ByteString getPlaybookBytes() { + java.lang.Object ref = playbook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The playbook to set. + * @return This builder for chaining. + */ + public Builder setPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPlaybook() { + playbook_ = getDefaultInstance().getPlaybook(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for playbook to set. + * @return This builder for chaining. + */ + public Builder setPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + playbook_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the playbook.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = 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.v3.PlaybookTransition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.PlaybookTransition) + private static final com.google.cloud.dialogflow.cx.v3.PlaybookTransition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.PlaybookTransition(); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookTransition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookTransition 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.v3.PlaybookTransition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookTransitionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookTransitionOrBuilder.java new file mode 100644 index 000000000000..d2a001361e53 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookTransitionOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface PlaybookTransitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.PlaybookTransition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + java.lang.String getPlaybook(); + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + com.google.protobuf.ByteString getPlaybookBytes(); + + /** + * + * + *
+   * Output only. The display name of the playbook.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. The display name of the playbook.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersion.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersion.java new file mode 100644 index 000000000000..4a688aed2fd6 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersion.java @@ -0,0 +1,2034 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Playbook version is a snapshot of the playbook at certain timestamp.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookVersion} + */ +public final class PlaybookVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.PlaybookVersion) + PlaybookVersionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PlaybookVersion.newBuilder() to construct. + private PlaybookVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookVersion() { + name_ = ""; + description_ = ""; + examples_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookVersion(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.class, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * The unique identifier of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique identifier of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the playbook version.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the playbook version.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.Playbook playbook_; + + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the playbook field is set. + */ + @java.lang.Override + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The playbook. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + + public static final int EXAMPLES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List examples_; + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getExamplesList() { + return examples_; + } + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getExamplesOrBuilderList() { + return examples_; + } + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getExamplesCount() { + return examples_.size(); + } + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Example getExamples(int index) { + return examples_.get(index); + } + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExamplesOrBuilder(int index) { + return examples_.get(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPlaybook()); + } + for (int i = 0; i < examples_.size(); i++) { + output.writeMessage(4, examples_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPlaybook()); + } + for (int i = 0; i < examples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, examples_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + 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.v3.PlaybookVersion)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.PlaybookVersion other = + (com.google.cloud.dialogflow.cx.v3.PlaybookVersion) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasPlaybook() != other.hasPlaybook()) return false; + if (hasPlaybook()) { + if (!getPlaybook().equals(other.getPlaybook())) return false; + } + if (!getExamplesList().equals(other.getExamplesList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasPlaybook()) { + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + } + if (getExamplesCount() > 0) { + hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getExamplesList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookVersion 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.v3.PlaybookVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookVersion 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.v3.PlaybookVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookVersion 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.v3.PlaybookVersion parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookVersion 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.v3.PlaybookVersion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookVersion 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.v3.PlaybookVersion 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.v3.PlaybookVersion 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.v3.PlaybookVersion 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; + } + + /** + * + * + *
+   * Playbook version is a snapshot of the playbook at certain timestamp.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.PlaybookVersion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.PlaybookVersion) + com.google.cloud.dialogflow.cx.v3.PlaybookVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.class, + com.google.cloud.dialogflow.cx.v3.PlaybookVersion.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.PlaybookVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookFieldBuilder(); + getExamplesFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + } else { + examples_ = null; + examplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_PlaybookVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion build() { + com.google.cloud.dialogflow.cx.v3.PlaybookVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookVersion buildPartial() { + com.google.cloud.dialogflow.cx.v3.PlaybookVersion result = + new com.google.cloud.dialogflow.cx.v3.PlaybookVersion(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.PlaybookVersion result) { + if (examplesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + examples_ = java.util.Collections.unmodifiableList(examples_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.examples_ = examples_; + } else { + result.examples_ = examplesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.PlaybookVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.playbook_ = playbookBuilder_ == null ? playbook_ : playbookBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.PlaybookVersion) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.PlaybookVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.PlaybookVersion other) { + if (other == com.google.cloud.dialogflow.cx.v3.PlaybookVersion.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPlaybook()) { + mergePlaybook(other.getPlaybook()); + } + if (examplesBuilder_ == null) { + if (!other.examples_.isEmpty()) { + if (examples_.isEmpty()) { + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureExamplesIsMutable(); + examples_.addAll(other.examples_); + } + onChanged(); + } + } else { + if (!other.examples_.isEmpty()) { + if (examplesBuilder_.isEmpty()) { + examplesBuilder_.dispose(); + examplesBuilder_ = null; + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000008); + examplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExamplesFieldBuilder() + : null; + } else { + examplesBuilder_.addAllMessages(other.examples_); + } + } + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getPlaybookFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.dialogflow.cx.v3.Example m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Example.parser(), extensionRegistry); + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(m); + } else { + examplesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Playbook playbook_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + playbookBuilder_; + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the playbook field is set. + */ + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The playbook. + */ + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook() { + if (playbookBuilder_ == null) { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } else { + return playbookBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + } else { + playbookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3.Playbook.Builder builderForValue) { + if (playbookBuilder_ == null) { + playbook_ = builderForValue.build(); + } else { + playbookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePlaybook(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbookBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && playbook_ != null + && playbook_ != com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance()) { + getPlaybookBuilder().mergeFrom(value); + } else { + playbook_ = value; + } + } else { + playbookBuilder_.mergeFrom(value); + } + if (playbook_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPlaybook() { + bitField0_ = (bitField0_ & ~0x00000004); + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Builder getPlaybookBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPlaybookFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder() { + if (playbookBuilder_ != null) { + return playbookBuilder_.getMessageOrBuilder(); + } else { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + } + + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + getPlaybookFieldBuilder() { + if (playbookBuilder_ == null) { + playbookBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder>( + getPlaybook(), getParentForChildren(), isClean()); + playbook_ = null; + } + return playbookBuilder_; + } + + private java.util.List examples_ = + java.util.Collections.emptyList(); + + private void ensureExamplesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + examples_ = new java.util.ArrayList(examples_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder> + examplesBuilder_; + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getExamplesList() { + if (examplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(examples_); + } else { + return examplesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getExamplesCount() { + if (examplesBuilder_ == null) { + return examples_.size(); + } else { + return examplesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Example getExamples(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExamples(int index, com.google.cloud.dialogflow.cx.v3.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.set(index, value); + onChanged(); + } else { + examplesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExamples( + int index, com.google.cloud.dialogflow.cx.v3.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.set(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addExamples(com.google.cloud.dialogflow.cx.v3.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(value); + onChanged(); + } else { + examplesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addExamples(int index, com.google.cloud.dialogflow.cx.v3.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(index, value); + onChanged(); + } else { + examplesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addExamples(com.google.cloud.dialogflow.cx.v3.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addExamples( + int index, com.google.cloud.dialogflow.cx.v3.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllExamples( + java.lang.Iterable values) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, examples_); + onChanged(); + } else { + examplesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExamples() { + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + examplesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeExamples(int index) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.remove(index); + onChanged(); + } else { + examplesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Example.Builder getExamplesBuilder(int index) { + return getExamplesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExamplesOrBuilder(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getExamplesOrBuilderList() { + if (examplesBuilder_ != null) { + return examplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(examples_); + } + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Example.Builder addExamplesBuilder() { + return getExamplesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Example.Builder addExamplesBuilder(int index) { + return getExamplesFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getExamplesBuilderList() { + return getExamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder> + getExamplesFieldBuilder() { + if (examplesBuilder_ == null) { + examplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder>( + examples_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + examples_ = null; + } + return examplesBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @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.v3.PlaybookVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.PlaybookVersion) + private static final com.google.cloud.dialogflow.cx.v3.PlaybookVersion DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.PlaybookVersion(); + } + + public static com.google.cloud.dialogflow.cx.v3.PlaybookVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookVersion 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.v3.PlaybookVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersionName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersionName.java new file mode 100644 index 000000000000..6877816f10dd --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersionName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PlaybookVersionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_PLAYBOOK_VERSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String playbook; + private final String version; + + @Deprecated + protected PlaybookVersionName() { + project = null; + location = null; + agent = null; + playbook = null; + version = null; + } + + private PlaybookVersionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + playbook = Preconditions.checkNotNull(builder.getPlaybook()); + version = Preconditions.checkNotNull(builder.getVersion()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public String getVersion() { + return version; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PlaybookVersionName of( + String project, String location, String agent, String playbook, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .setVersion(version) + .build(); + } + + public static String format( + String project, String location, String agent, String playbook, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .setVersion(version) + .build() + .toString(); + } + + public static PlaybookVersionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_PLAYBOOK_VERSION.validatedMatch( + formattedString, "PlaybookVersionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("playbook"), + matchMap.get("version")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PlaybookVersionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_PLAYBOOK_VERSION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (playbook != null) { + fieldMapBuilder.put("playbook", playbook); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_PLAYBOOK_VERSION.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "playbook", + playbook, + "version", + version); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PlaybookVersionName that = ((PlaybookVersionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.playbook, that.playbook) + && Objects.equals(this.version, that.version); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(playbook); + h *= 1000003; + h ^= Objects.hashCode(version); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String playbook; + private String version; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public String getVersion() { + return version; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setPlaybook(String playbook) { + this.playbook = playbook; + return this; + } + + public Builder setVersion(String version) { + this.version = version; + return this; + } + + private Builder(PlaybookVersionName playbookVersionName) { + this.project = playbookVersionName.project; + this.location = playbookVersionName.location; + this.agent = playbookVersionName.agent; + this.playbook = playbookVersionName.playbook; + this.version = playbookVersionName.version; + } + + public PlaybookVersionName build() { + return new PlaybookVersionName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersionOrBuilder.java new file mode 100644 index 000000000000..67bb36a451d4 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PlaybookVersionOrBuilder.java @@ -0,0 +1,236 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface PlaybookVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.PlaybookVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * The unique identifier of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The description of the playbook version.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the playbook version.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the playbook field is set. + */ + boolean hasPlaybook(); + + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The playbook. + */ + com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook(); + + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder(); + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getExamplesList(); + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3.Example getExamples(int index); + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getExamplesCount(); + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getExamplesOrBuilderList(); + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExamplesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java index 96bea74c9af3..d407378aeb52 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java @@ -90,6 +90,7 @@ public enum InputCase AUDIO(5), EVENT(6), DTMF(7), + TOOL_CALL_RESULT(11), INPUT_NOT_SET(0); private final int value; @@ -119,6 +120,8 @@ public static InputCase forNumber(int value) { return EVENT; case 7: return DTMF; + case 11: + return TOOL_CALL_RESULT; case 0: return INPUT_NOT_SET; default: @@ -405,6 +408,60 @@ public com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder getDtmfOrBuilder() { return com.google.cloud.dialogflow.cx.v3.DtmfInput.getDefaultInstance(); } + public static final int TOOL_CALL_RESULT_FIELD_NUMBER = 11; + + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * + * @return Whether the toolCallResult field is set. + */ + @java.lang.Override + public boolean hasToolCallResult() { + return inputCase_ == 11; + } + + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * + * @return The toolCallResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult getToolCallResult() { + if (inputCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3.ToolCallResult) input_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance(); + } + + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResultOrBuilder getToolCallResultOrBuilder() { + if (inputCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3.ToolCallResult) input_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance(); + } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; @SuppressWarnings("serial") @@ -496,6 +553,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (inputCase_ == 7) { output.writeMessage(7, (com.google.cloud.dialogflow.cx.v3.DtmfInput) input_); } + if (inputCase_ == 11) { + output.writeMessage(11, (com.google.cloud.dialogflow.cx.v3.ToolCallResult) input_); + } getUnknownFields().writeTo(output); } @@ -533,6 +593,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.cloud.dialogflow.cx.v3.DtmfInput) input_); } + if (inputCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.dialogflow.cx.v3.ToolCallResult) input_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -567,6 +632,9 @@ public boolean equals(final java.lang.Object obj) { case 7: if (!getDtmf().equals(other.getDtmf())) return false; break; + case 11: + if (!getToolCallResult().equals(other.getToolCallResult())) return false; + break; case 0: default: } @@ -604,6 +672,10 @@ public int hashCode() { hash = (37 * hash) + DTMF_FIELD_NUMBER; hash = (53 * hash) + getDtmf().hashCode(); break; + case 11: + hash = (37 * hash) + TOOL_CALL_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getToolCallResult().hashCode(); + break; case 0: default: } @@ -774,6 +846,9 @@ public Builder clear() { if (dtmfBuilder_ != null) { dtmfBuilder_.clear(); } + if (toolCallResultBuilder_ != null) { + toolCallResultBuilder_.clear(); + } languageCode_ = ""; inputCase_ = 0; input_ = null; @@ -814,7 +889,7 @@ public com.google.cloud.dialogflow.cx.v3.QueryInput buildPartial() { private void buildPartial0(com.google.cloud.dialogflow.cx.v3.QueryInput result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.languageCode_ = languageCode_; } } @@ -837,6 +912,9 @@ private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.QueryInput res if (inputCase_ == 7 && dtmfBuilder_ != null) { result.input_ = dtmfBuilder_.build(); } + if (inputCase_ == 11 && toolCallResultBuilder_ != null) { + result.input_ = toolCallResultBuilder_.build(); + } } @java.lang.Override @@ -886,7 +964,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryInput other) { if (other == com.google.cloud.dialogflow.cx.v3.QueryInput.getDefaultInstance()) return this; if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } switch (other.getInputCase()) { @@ -915,6 +993,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryInput other) { mergeDtmf(other.getDtmf()); break; } + case TOOL_CALL_RESULT: + { + mergeToolCallResult(other.getToolCallResult()); + break; + } case INPUT_NOT_SET: { break; @@ -961,7 +1044,7 @@ public Builder mergeFrom( case 34: { languageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 34 case 42: @@ -982,6 +1065,12 @@ public Builder mergeFrom( inputCase_ = 7; break; } // case 58 + case 90: + { + input.readMessage(getToolCallResultFieldBuilder().getBuilder(), extensionRegistry); + inputCase_ = 11; + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2101,6 +2190,224 @@ public com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder getDtmfOrBuilder() { return dtmfBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCallResult, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallResultOrBuilder> + toolCallResultBuilder_; + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * + * @return Whether the toolCallResult field is set. + */ + @java.lang.Override + public boolean hasToolCallResult() { + return inputCase_ == 11; + } + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * + * @return The toolCallResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult getToolCallResult() { + if (toolCallResultBuilder_ == null) { + if (inputCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3.ToolCallResult) input_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance(); + } else { + if (inputCase_ == 11) { + return toolCallResultBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + public Builder setToolCallResult(com.google.cloud.dialogflow.cx.v3.ToolCallResult value) { + if (toolCallResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + onChanged(); + } else { + toolCallResultBuilder_.setMessage(value); + } + inputCase_ = 11; + return this; + } + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + public Builder setToolCallResult( + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Builder builderForValue) { + if (toolCallResultBuilder_ == null) { + input_ = builderForValue.build(); + onChanged(); + } else { + toolCallResultBuilder_.setMessage(builderForValue.build()); + } + inputCase_ = 11; + return this; + } + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + public Builder mergeToolCallResult(com.google.cloud.dialogflow.cx.v3.ToolCallResult value) { + if (toolCallResultBuilder_ == null) { + if (inputCase_ == 11 + && input_ != com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance()) { + input_ = + com.google.cloud.dialogflow.cx.v3.ToolCallResult.newBuilder( + (com.google.cloud.dialogflow.cx.v3.ToolCallResult) input_) + .mergeFrom(value) + .buildPartial(); + } else { + input_ = value; + } + onChanged(); + } else { + if (inputCase_ == 11) { + toolCallResultBuilder_.mergeFrom(value); + } else { + toolCallResultBuilder_.setMessage(value); + } + } + inputCase_ = 11; + return this; + } + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + public Builder clearToolCallResult() { + if (toolCallResultBuilder_ == null) { + if (inputCase_ == 11) { + inputCase_ = 0; + input_ = null; + onChanged(); + } + } else { + if (inputCase_ == 11) { + inputCase_ = 0; + input_ = null; + } + toolCallResultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.Builder getToolCallResultBuilder() { + return getToolCallResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResultOrBuilder getToolCallResultOrBuilder() { + if ((inputCase_ == 11) && (toolCallResultBuilder_ != null)) { + return toolCallResultBuilder_.getMessageOrBuilder(); + } else { + if (inputCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3.ToolCallResult) input_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCallResult, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallResultOrBuilder> + getToolCallResultFieldBuilder() { + if (toolCallResultBuilder_ == null) { + if (!(inputCase_ == 11)) { + input_ = com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance(); + } + toolCallResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCallResult, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallResultOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.ToolCallResult) input_, + getParentForChildren(), + isClean()); + input_ = null; + } + inputCase_ = 11; + onChanged(); + return toolCallResultBuilder_; + } + private java.lang.Object languageCode_ = ""; /** @@ -2175,7 +2482,7 @@ public Builder setLanguageCode(java.lang.String value) { throw new NullPointerException(); } languageCode_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2196,7 +2503,7 @@ public Builder setLanguageCode(java.lang.String value) { */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -2222,7 +2529,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); languageCode_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInputOrBuilder.java index b78251d3dc6e..bad7a6d1d3b2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInputOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInputOrBuilder.java @@ -209,6 +209,43 @@ public interface QueryInputOrBuilder */ com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder getDtmfOrBuilder(); + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * + * @return Whether the toolCallResult field is set. + */ + boolean hasToolCallResult(); + + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + * + * @return The toolCallResult. + */ + com.google.cloud.dialogflow.cx.v3.ToolCallResult getToolCallResult(); + + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult tool_call_result = 11; + */ + com.google.cloud.dialogflow.cx.v3.ToolCallResultOrBuilder getToolCallResultOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java index 00ec7b8e62f8..8f7b48f57d49 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java @@ -42,8 +42,10 @@ private QueryParameters(com.google.protobuf.GeneratedMessageV3.Builder builde private QueryParameters() { timeZone_ = ""; sessionEntityTypes_ = java.util.Collections.emptyList(); + parameterScope_ = ""; currentPage_ = ""; flowVersions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + currentPlaybook_ = ""; channel_ = ""; } @@ -473,6 +475,69 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; } + public static final int PARAMETER_SCOPE_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object parameterScope_ = ""; + + /** + * + * + *
+   * Scope for the parameters. If not specified, parameters will be treated as
+   * session parameters. Parameters with custom scope will not be put into
+   * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
+   *
+   * You can reference the parameters with custom scope in the agent with the
+   * following format: $parameter-scope.params.parameter-id.
+   * 
+ * + * string parameter_scope = 12; + * + * @return The parameterScope. + */ + @java.lang.Override + public java.lang.String getParameterScope() { + java.lang.Object ref = parameterScope_; + 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(); + parameterScope_ = s; + return s; + } + } + + /** + * + * + *
+   * Scope for the parameters. If not specified, parameters will be treated as
+   * session parameters. Parameters with custom scope will not be put into
+   * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
+   *
+   * You can reference the parameters with custom scope in the agent with the
+   * following format: $parameter-scope.params.parameter-id.
+   * 
+ * + * string parameter_scope = 12; + * + * @return The bytes for parameterScope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParameterScopeBytes() { + java.lang.Object ref = parameterScope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int CURRENT_PAGE_FIELD_NUMBER = 6; @SuppressWarnings("serial") @@ -822,6 +887,135 @@ public com.google.protobuf.ByteString getFlowVersionsBytes(int index) { return flowVersions_.getByteString(index); } + public static final int CURRENT_PLAYBOOK_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object currentPlaybook_ = ""; + + /** + * + * + *
+   * Optional. The unique identifier of the
+   * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+   * session with. If `current_playbook` is specified, the previous state of the
+   * session will be ignored by Dialogflow.
+   *
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The currentPlaybook. + */ + @java.lang.Override + public java.lang.String getCurrentPlaybook() { + java.lang.Object ref = currentPlaybook_; + 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(); + currentPlaybook_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The unique identifier of the
+   * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+   * session with. If `current_playbook` is specified, the previous state of the
+   * session will be ignored by Dialogflow.
+   *
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for currentPlaybook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrentPlaybookBytes() { + java.lang.Object ref = currentPlaybook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentPlaybook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 21; + private com.google.cloud.dialogflow.cx.v3.LlmModelSettings llmModelSettings_; + + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + @java.lang.Override + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + public static final int CHANNEL_FIELD_NUMBER = 15; @SuppressWarnings("serial") @@ -919,7 +1113,7 @@ public com.google.protobuf.ByteString getChannelBytes() { */ @java.lang.Override public boolean hasSessionTtl() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** @@ -993,7 +1187,7 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() { */ @java.lang.Override public boolean hasEndUserMetadata() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** @@ -1082,7 +1276,7 @@ public com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder() { */ @java.lang.Override public boolean hasSearchConfig() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** @@ -1142,7 +1336,7 @@ public com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder getSearchConfigOr * * @deprecated * google.cloud.dialogflow.cx.v3.QueryParameters.populate_data_store_connection_signals is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=730 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=770 * @return The populateDataStoreConnectionSignals. */ @java.lang.Override @@ -1191,21 +1385,30 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetWebhookHeaders(), WebhookHeadersDefaultEntryHolder.defaultEntry, 10); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parameterScope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, parameterScope_); + } for (int i = 0; i < flowVersions_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 14, flowVersions_.getRaw(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, channel_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(16, getSessionTtl()); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(18, getEndUserMetadata()); } - if (((bitField0_ & 0x00000020) != 0)) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentPlaybook_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, currentPlaybook_); + } + if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(20, getSearchConfig()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(21, getLlmModelSettings()); + } if (populateDataStoreConnectionSignals_ != false) { output.writeBool(25, populateDataStoreConnectionSignals_); } @@ -1253,6 +1456,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, webhookHeaders__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parameterScope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, parameterScope_); + } { int dataSize = 0; for (int i = 0; i < flowVersions_.size(); i++) { @@ -1264,15 +1470,21 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, channel_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getSessionTtl()); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEndUserMetadata()); } - if (((bitField0_ & 0x00000020) != 0)) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentPlaybook_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, currentPlaybook_); + } + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getSearchConfig()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getLlmModelSettings()); + } if (populateDataStoreConnectionSignals_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize( @@ -1308,11 +1520,17 @@ public boolean equals(final java.lang.Object obj) { if (hasParameters()) { if (!getParameters().equals(other.getParameters())) return false; } + if (!getParameterScope().equals(other.getParameterScope())) return false; if (!getCurrentPage().equals(other.getCurrentPage())) return false; if (getDisableWebhook() != other.getDisableWebhook()) return false; if (getAnalyzeQueryTextSentiment() != other.getAnalyzeQueryTextSentiment()) return false; if (!internalGetWebhookHeaders().equals(other.internalGetWebhookHeaders())) return false; if (!getFlowVersionsList().equals(other.getFlowVersionsList())) return false; + if (!getCurrentPlaybook().equals(other.getCurrentPlaybook())) return false; + if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false; + if (hasLlmModelSettings()) { + if (!getLlmModelSettings().equals(other.getLlmModelSettings())) return false; + } if (!getChannel().equals(other.getChannel())) return false; if (hasSessionTtl() != other.hasSessionTtl()) return false; if (hasSessionTtl()) { @@ -1357,6 +1575,8 @@ public int hashCode() { hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; hash = (53 * hash) + getParameters().hashCode(); } + hash = (37 * hash) + PARAMETER_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getParameterScope().hashCode(); hash = (37 * hash) + CURRENT_PAGE_FIELD_NUMBER; hash = (53 * hash) + getCurrentPage().hashCode(); hash = (37 * hash) + DISABLE_WEBHOOK_FIELD_NUMBER; @@ -1371,6 +1591,12 @@ public int hashCode() { hash = (37 * hash) + FLOW_VERSIONS_FIELD_NUMBER; hash = (53 * hash) + getFlowVersionsList().hashCode(); } + hash = (37 * hash) + CURRENT_PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getCurrentPlaybook().hashCode(); + if (hasLlmModelSettings()) { + hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLlmModelSettings().hashCode(); + } hash = (37 * hash) + CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getChannel().hashCode(); if (hasSessionTtl()) { @@ -1556,6 +1782,7 @@ private void maybeForceBuilderInitialization() { getSessionEntityTypesFieldBuilder(); getPayloadFieldBuilder(); getParametersFieldBuilder(); + getLlmModelSettingsFieldBuilder(); getSessionTtlFieldBuilder(); getEndUserMetadataFieldBuilder(); getSearchConfigFieldBuilder(); @@ -1589,11 +1816,18 @@ public Builder clear() { parametersBuilder_.dispose(); parametersBuilder_ = null; } + parameterScope_ = ""; currentPage_ = ""; disableWebhook_ = false; analyzeQueryTextSentiment_ = false; internalGetMutableWebhookHeaders().clear(); flowVersions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + currentPlaybook_ = ""; + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } channel_ = ""; sessionTtl_ = null; if (sessionTtlBuilder_ != null) { @@ -1679,40 +1913,51 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.QueryParameters res to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.currentPage_ = currentPage_; + result.parameterScope_ = parameterScope_; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.disableWebhook_ = disableWebhook_; + result.currentPage_ = currentPage_; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.analyzeQueryTextSentiment_ = analyzeQueryTextSentiment_; + result.disableWebhook_ = disableWebhook_; } if (((from_bitField0_ & 0x00000100) != 0)) { + result.analyzeQueryTextSentiment_ = analyzeQueryTextSentiment_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { result.webhookHeaders_ = internalGetWebhookHeaders(); result.webhookHeaders_.makeImmutable(); } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { flowVersions_.makeImmutable(); result.flowVersions_ = flowVersions_; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { + result.currentPlaybook_ = currentPlaybook_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.llmModelSettings_ = + llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00002000) != 0)) { result.channel_ = channel_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.sessionTtl_ = sessionTtlBuilder_ == null ? sessionTtl_ : sessionTtlBuilder_.build(); - to_bitField0_ |= 0x00000008; + to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.endUserMetadata_ = endUserMetadataBuilder_ == null ? endUserMetadata_ : endUserMetadataBuilder_.build(); - to_bitField0_ |= 0x00000010; + to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.searchConfig_ = searchConfigBuilder_ == null ? searchConfig_ : searchConfigBuilder_.build(); - to_bitField0_ |= 0x00000020; + to_bitField0_ |= 0x00000040; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.populateDataStoreConnectionSignals_ = populateDataStoreConnectionSignals_; } result.bitField0_ |= to_bitField0_; @@ -1805,9 +2050,14 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryParameters other if (other.hasParameters()) { mergeParameters(other.getParameters()); } + if (!other.getParameterScope().isEmpty()) { + parameterScope_ = other.parameterScope_; + bitField0_ |= 0x00000020; + onChanged(); + } if (!other.getCurrentPage().isEmpty()) { currentPage_ = other.currentPage_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } if (other.getDisableWebhook() != false) { @@ -1817,20 +2067,28 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryParameters other setAnalyzeQueryTextSentiment(other.getAnalyzeQueryTextSentiment()); } internalGetMutableWebhookHeaders().mergeFrom(other.internalGetWebhookHeaders()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; if (!other.flowVersions_.isEmpty()) { if (flowVersions_.isEmpty()) { flowVersions_ = other.flowVersions_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } else { ensureFlowVersionsIsMutable(); flowVersions_.addAll(other.flowVersions_); } onChanged(); } + if (!other.getCurrentPlaybook().isEmpty()) { + currentPlaybook_ = other.currentPlaybook_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.hasLlmModelSettings()) { + mergeLlmModelSettings(other.getLlmModelSettings()); + } if (!other.getChannel().isEmpty()) { channel_ = other.channel_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; onChanged(); } if (other.hasSessionTtl()) { @@ -1912,19 +2170,19 @@ public Builder mergeFrom( case 50: { currentPage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 50 case 56: { disableWebhook_ = input.readBool(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 56 case 64: { analyzeQueryTextSentiment_ = input.readBool(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 64 case 82: @@ -1936,9 +2194,15 @@ public Builder mergeFrom( internalGetMutableWebhookHeaders() .getMutableMap() .put(webhookHeaders__.getKey(), webhookHeaders__.getValue()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 82 + case 98: + { + parameterScope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 98 case 114: { java.lang.String s = input.readStringRequireUtf8(); @@ -1949,31 +2213,44 @@ public Builder mergeFrom( case 122: { channel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; break; } // case 122 case 130: { input.readMessage(getSessionTtlFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00004000; break; } // case 130 case 146: { input.readMessage(getEndUserMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00008000; break; } // case 146 + case 154: + { + currentPlaybook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 154 case 162: { input.readMessage(getSearchConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00010000; break; } // case 162 + case 170: + { + input.readMessage( + getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 170 case 200: { populateDataStoreConnectionSignals_ = input.readBool(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00020000; break; } // case 200 default: @@ -3401,37 +3678,30 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { return parametersBuilder_; } - private java.lang.Object currentPage_ = ""; + private java.lang.Object parameterScope_ = ""; /** * * *
-     * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to
-     * override the [current page][QueryResult.current_page] in the session.
-     * Format:
-     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
+     * Scope for the parameters. If not specified, parameters will be treated as
+     * session parameters. Parameters with custom scope will not be put into
+     * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
      *
-     * If `current_page` is specified, the previous state of the session will be
-     * ignored by Dialogflow, including the [previous
-     * page][QueryResult.current_page] and the [previous session
-     * parameters][QueryResult.parameters].
-     * In most cases,
-     * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page]
-     * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters]
-     * should be configured together to direct a session to a specific state.
+     * You can reference the parameters with custom scope in the agent with the
+     * following format: $parameter-scope.params.parameter-id.
      * 
* - * string current_page = 6 [(.google.api.resource_reference) = { ... } + * string parameter_scope = 12; * - * @return The currentPage. + * @return The parameterScope. */ - public java.lang.String getCurrentPage() { - java.lang.Object ref = currentPage_; + public java.lang.String getParameterScope() { + java.lang.Object ref = parameterScope_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - currentPage_ = s; + parameterScope_ = s; return s; } else { return (java.lang.String) ref; @@ -3442,31 +3712,24 @@ public java.lang.String getCurrentPage() { * * *
-     * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to
-     * override the [current page][QueryResult.current_page] in the session.
-     * Format:
-     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
+     * Scope for the parameters. If not specified, parameters will be treated as
+     * session parameters. Parameters with custom scope will not be put into
+     * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
      *
-     * If `current_page` is specified, the previous state of the session will be
-     * ignored by Dialogflow, including the [previous
-     * page][QueryResult.current_page] and the [previous session
-     * parameters][QueryResult.parameters].
-     * In most cases,
-     * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page]
-     * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters]
-     * should be configured together to direct a session to a specific state.
+     * You can reference the parameters with custom scope in the agent with the
+     * following format: $parameter-scope.params.parameter-id.
      * 
* - * string current_page = 6 [(.google.api.resource_reference) = { ... } + * string parameter_scope = 12; * - * @return The bytes for currentPage. + * @return The bytes for parameterScope. */ - public com.google.protobuf.ByteString getCurrentPageBytes() { - java.lang.Object ref = currentPage_; + public com.google.protobuf.ByteString getParameterScopeBytes() { + java.lang.Object ref = parameterScope_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - currentPage_ = b; + parameterScope_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -3477,14 +3740,164 @@ public com.google.protobuf.ByteString getCurrentPageBytes() { * * *
-     * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to
-     * override the [current page][QueryResult.current_page] in the session.
-     * Format:
-     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
+     * Scope for the parameters. If not specified, parameters will be treated as
+     * session parameters. Parameters with custom scope will not be put into
+     * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
      *
-     * If `current_page` is specified, the previous state of the session will be
-     * ignored by Dialogflow, including the [previous
-     * page][QueryResult.current_page] and the [previous session
+     * You can reference the parameters with custom scope in the agent with the
+     * following format: $parameter-scope.params.parameter-id.
+     * 
+ * + * string parameter_scope = 12; + * + * @param value The parameterScope to set. + * @return This builder for chaining. + */ + public Builder setParameterScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parameterScope_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Scope for the parameters. If not specified, parameters will be treated as
+     * session parameters. Parameters with custom scope will not be put into
+     * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
+     *
+     * You can reference the parameters with custom scope in the agent with the
+     * following format: $parameter-scope.params.parameter-id.
+     * 
+ * + * string parameter_scope = 12; + * + * @return This builder for chaining. + */ + public Builder clearParameterScope() { + parameterScope_ = getDefaultInstance().getParameterScope(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Scope for the parameters. If not specified, parameters will be treated as
+     * session parameters. Parameters with custom scope will not be put into
+     * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
+     *
+     * You can reference the parameters with custom scope in the agent with the
+     * following format: $parameter-scope.params.parameter-id.
+     * 
+ * + * string parameter_scope = 12; + * + * @param value The bytes for parameterScope to set. + * @return This builder for chaining. + */ + public Builder setParameterScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parameterScope_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object currentPage_ = ""; + + /** + * + * + *
+     * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to
+     * override the [current page][QueryResult.current_page] in the session.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
+     *
+     * If `current_page` is specified, the previous state of the session will be
+     * ignored by Dialogflow, including the [previous
+     * page][QueryResult.current_page] and the [previous session
+     * parameters][QueryResult.parameters].
+     * In most cases,
+     * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page]
+     * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters]
+     * should be configured together to direct a session to a specific state.
+     * 
+ * + * string current_page = 6 [(.google.api.resource_reference) = { ... } + * + * @return The currentPage. + */ + public java.lang.String getCurrentPage() { + java.lang.Object ref = currentPage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currentPage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to
+     * override the [current page][QueryResult.current_page] in the session.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
+     *
+     * If `current_page` is specified, the previous state of the session will be
+     * ignored by Dialogflow, including the [previous
+     * page][QueryResult.current_page] and the [previous session
+     * parameters][QueryResult.parameters].
+     * In most cases,
+     * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page]
+     * and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters]
+     * should be configured together to direct a session to a specific state.
+     * 
+ * + * string current_page = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for currentPage. + */ + public com.google.protobuf.ByteString getCurrentPageBytes() { + java.lang.Object ref = currentPage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentPage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to
+     * override the [current page][QueryResult.current_page] in the session.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
+     *
+     * If `current_page` is specified, the previous state of the session will be
+     * ignored by Dialogflow, including the [previous
+     * page][QueryResult.current_page] and the [previous session
      * parameters][QueryResult.parameters].
      * In most cases,
      * [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page]
@@ -3502,7 +3915,7 @@ public Builder setCurrentPage(java.lang.String value) {
         throw new NullPointerException();
       }
       currentPage_ = value;
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000040;
       onChanged();
       return this;
     }
@@ -3532,7 +3945,7 @@ public Builder setCurrentPage(java.lang.String value) {
      */
     public Builder clearCurrentPage() {
       currentPage_ = getDefaultInstance().getCurrentPage();
-      bitField0_ = (bitField0_ & ~0x00000020);
+      bitField0_ = (bitField0_ & ~0x00000040);
       onChanged();
       return this;
     }
@@ -3567,7 +3980,7 @@ public Builder setCurrentPageBytes(com.google.protobuf.ByteString value) {
       }
       checkByteStringIsUtf8(value);
       currentPage_ = value;
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000040;
       onChanged();
       return this;
     }
@@ -3605,7 +4018,7 @@ public boolean getDisableWebhook() {
     public Builder setDisableWebhook(boolean value) {
 
       disableWebhook_ = value;
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return this;
     }
@@ -3622,7 +4035,7 @@ public Builder setDisableWebhook(boolean value) {
      * @return This builder for chaining.
      */
     public Builder clearDisableWebhook() {
-      bitField0_ = (bitField0_ & ~0x00000040);
+      bitField0_ = (bitField0_ & ~0x00000080);
       disableWebhook_ = false;
       onChanged();
       return this;
@@ -3663,7 +4076,7 @@ public boolean getAnalyzeQueryTextSentiment() {
     public Builder setAnalyzeQueryTextSentiment(boolean value) {
 
       analyzeQueryTextSentiment_ = value;
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return this;
     }
@@ -3681,7 +4094,7 @@ public Builder setAnalyzeQueryTextSentiment(boolean value) {
      * @return This builder for chaining.
      */
     public Builder clearAnalyzeQueryTextSentiment() {
-      bitField0_ = (bitField0_ & ~0x00000080);
+      bitField0_ = (bitField0_ & ~0x00000100);
       analyzeQueryTextSentiment_ = false;
       onChanged();
       return this;
@@ -3707,7 +4120,7 @@ public Builder clearAnalyzeQueryTextSentiment() {
       if (!webhookHeaders_.isMutable()) {
         webhookHeaders_ = webhookHeaders_.copy();
       }
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return webhookHeaders_;
     }
@@ -3825,7 +4238,7 @@ public java.lang.String getWebhookHeadersOrThrow(java.lang.String key) {
     }
 
     public Builder clearWebhookHeaders() {
-      bitField0_ = (bitField0_ & ~0x00000100);
+      bitField0_ = (bitField0_ & ~0x00000200);
       internalGetMutableWebhookHeaders().getMutableMap().clear();
       return this;
     }
@@ -3857,7 +4270,7 @@ public Builder removeWebhookHeaders(java.lang.String key) {
     /** Use alternate mutation accessors instead. */
     @java.lang.Deprecated
     public java.util.Map getMutableWebhookHeaders() {
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       return internalGetMutableWebhookHeaders().getMutableMap();
     }
 
@@ -3885,7 +4298,7 @@ public Builder putWebhookHeaders(java.lang.String key, java.lang.String value) {
         throw new NullPointerException("map value");
       }
       internalGetMutableWebhookHeaders().getMutableMap().put(key, value);
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       return this;
     }
 
@@ -3907,7 +4320,7 @@ public Builder putWebhookHeaders(java.lang.String key, java.lang.String value) {
      */
     public Builder putAllWebhookHeaders(java.util.Map values) {
       internalGetMutableWebhookHeaders().getMutableMap().putAll(values);
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       return this;
     }
 
@@ -3918,7 +4331,7 @@ private void ensureFlowVersionsIsMutable() {
       if (!flowVersions_.isModifiable()) {
         flowVersions_ = new com.google.protobuf.LazyStringArrayList(flowVersions_);
       }
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
     }
 
     /**
@@ -4038,7 +4451,7 @@ public Builder setFlowVersions(int index, java.lang.String value) {
       }
       ensureFlowVersionsIsMutable();
       flowVersions_.set(index, value);
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -4068,7 +4481,7 @@ public Builder addFlowVersions(java.lang.String value) {
       }
       ensureFlowVersionsIsMutable();
       flowVersions_.add(value);
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -4095,7 +4508,7 @@ public Builder addFlowVersions(java.lang.String value) {
     public Builder addAllFlowVersions(java.lang.Iterable values) {
       ensureFlowVersionsIsMutable();
       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, flowVersions_);
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -4120,7 +4533,7 @@ public Builder addAllFlowVersions(java.lang.Iterable values) {
      */
     public Builder clearFlowVersions() {
       flowVersions_ = com.google.protobuf.LazyStringArrayList.emptyList();
-      bitField0_ = (bitField0_ & ~0x00000200);
+      bitField0_ = (bitField0_ & ~0x00000400);
       ;
       onChanged();
       return this;
@@ -4152,11 +4565,377 @@ public Builder addFlowVersionsBytes(com.google.protobuf.ByteString value) {
       checkByteStringIsUtf8(value);
       ensureFlowVersionsIsMutable();
       flowVersions_.add(value);
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
 
+    private java.lang.Object currentPlaybook_ = "";
+
+    /**
+     *
+     *
+     * 
+     * Optional. The unique identifier of the
+     * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+     * session with. If `current_playbook` is specified, the previous state of the
+     * session will be ignored by Dialogflow.
+     *
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The currentPlaybook. + */ + public java.lang.String getCurrentPlaybook() { + java.lang.Object ref = currentPlaybook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currentPlaybook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The unique identifier of the
+     * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+     * session with. If `current_playbook` is specified, the previous state of the
+     * session will be ignored by Dialogflow.
+     *
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for currentPlaybook. + */ + public com.google.protobuf.ByteString getCurrentPlaybookBytes() { + java.lang.Object ref = currentPlaybook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentPlaybook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The unique identifier of the
+     * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+     * session with. If `current_playbook` is specified, the previous state of the
+     * session will be ignored by Dialogflow.
+     *
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The currentPlaybook to set. + * @return This builder for chaining. + */ + public Builder setCurrentPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + currentPlaybook_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The unique identifier of the
+     * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+     * session with. If `current_playbook` is specified, the previous state of the
+     * session will be ignored by Dialogflow.
+     *
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCurrentPlaybook() { + currentPlaybook_ = getDefaultInstance().getCurrentPlaybook(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The unique identifier of the
+     * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+     * session with. If `current_playbook` is specified, the previous state of the
+     * session will be ignored by Dialogflow.
+     *
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for currentPlaybook to set. + * @return This builder for chaining. + */ + public Builder setCurrentPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + currentPlaybook_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.LlmModelSettings llmModelSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder> + llmModelSettingsBuilder_; + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings() { + if (llmModelSettingsBuilder_ == null) { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } else { + return llmModelSettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLlmModelSettings(com.google.cloud.dialogflow.cx.v3.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + llmModelSettings_ = value; + } else { + llmModelSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder builderForValue) { + if (llmModelSettingsBuilder_ == null) { + llmModelSettings_ = builderForValue.build(); + } else { + llmModelSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLlmModelSettings(com.google.cloud.dialogflow.cx.v3.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && llmModelSettings_ != null + && llmModelSettings_ + != com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance()) { + getLlmModelSettingsBuilder().mergeFrom(value); + } else { + llmModelSettings_ = value; + } + } else { + llmModelSettingsBuilder_.mergeFrom(value); + } + if (llmModelSettings_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLlmModelSettings() { + bitField0_ = (bitField0_ & ~0x00001000); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder getLlmModelSettingsBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getLlmModelSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + if (llmModelSettingsBuilder_ != null) { + return llmModelSettingsBuilder_.getMessageOrBuilder(); + } else { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + } + + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder> + getLlmModelSettingsFieldBuilder() { + if (llmModelSettingsBuilder_ == null) { + llmModelSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder>( + getLlmModelSettings(), getParentForChildren(), isClean()); + llmModelSettings_ = null; + } + return llmModelSettingsBuilder_; + } + private java.lang.Object channel_ = ""; /** @@ -4258,7 +5037,7 @@ public Builder setChannel(java.lang.String value) { throw new NullPointerException(); } channel_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4288,7 +5067,7 @@ public Builder setChannel(java.lang.String value) { */ public Builder clearChannel() { channel_ = getDefaultInstance().getChannel(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } @@ -4323,7 +5102,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); channel_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4351,7 +5130,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) { * @return Whether the sessionTtl field is set. */ public boolean hasSessionTtl() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** @@ -4401,7 +5180,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration value) { } else { sessionTtlBuilder_.setMessage(value); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4425,7 +5204,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration.Builder builderForValu } else { sessionTtlBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4445,7 +5224,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration.Builder builderForValu */ public Builder mergeSessionTtl(com.google.protobuf.Duration value) { if (sessionTtlBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) + if (((bitField0_ & 0x00004000) != 0) && sessionTtl_ != null && sessionTtl_ != com.google.protobuf.Duration.getDefaultInstance()) { getSessionTtlBuilder().mergeFrom(value); @@ -4456,7 +5235,7 @@ public Builder mergeSessionTtl(com.google.protobuf.Duration value) { sessionTtlBuilder_.mergeFrom(value); } if (sessionTtl_ != null) { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -4476,7 +5255,7 @@ public Builder mergeSessionTtl(com.google.protobuf.Duration value) { *
*/ public Builder clearSessionTtl() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00004000); sessionTtl_ = null; if (sessionTtlBuilder_ != null) { sessionTtlBuilder_.dispose(); @@ -4500,7 +5279,7 @@ public Builder clearSessionTtl() { * */ public com.google.protobuf.Duration.Builder getSessionTtlBuilder() { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00004000; onChanged(); return getSessionTtlFieldBuilder().getBuilder(); } @@ -4595,7 +5374,7 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() { * @return Whether the endUserMetadata field is set. */ public boolean hasEndUserMetadata() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** @@ -4673,7 +5452,7 @@ public Builder setEndUserMetadata(com.google.protobuf.Struct value) { } else { endUserMetadataBuilder_.setMessage(value); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4711,7 +5490,7 @@ public Builder setEndUserMetadata(com.google.protobuf.Struct.Builder builderForV } else { endUserMetadataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4745,7 +5524,7 @@ public Builder setEndUserMetadata(com.google.protobuf.Struct.Builder builderForV */ public Builder mergeEndUserMetadata(com.google.protobuf.Struct value) { if (endUserMetadataBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) + if (((bitField0_ & 0x00008000) != 0) && endUserMetadata_ != null && endUserMetadata_ != com.google.protobuf.Struct.getDefaultInstance()) { getEndUserMetadataBuilder().mergeFrom(value); @@ -4756,7 +5535,7 @@ public Builder mergeEndUserMetadata(com.google.protobuf.Struct value) { endUserMetadataBuilder_.mergeFrom(value); } if (endUserMetadata_ != null) { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -4790,7 +5569,7 @@ public Builder mergeEndUserMetadata(com.google.protobuf.Struct value) { * */ public Builder clearEndUserMetadata() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00008000); endUserMetadata_ = null; if (endUserMetadataBuilder_ != null) { endUserMetadataBuilder_.dispose(); @@ -4828,7 +5607,7 @@ public Builder clearEndUserMetadata() { * */ public com.google.protobuf.Struct.Builder getEndUserMetadataBuilder() { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00008000; onChanged(); return getEndUserMetadataFieldBuilder().getBuilder(); } @@ -4935,7 +5714,7 @@ public com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder() { * @return Whether the searchConfig field is set. */ public boolean hasSearchConfig() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** @@ -4981,7 +5760,7 @@ public Builder setSearchConfig(com.google.cloud.dialogflow.cx.v3.SearchConfig va } else { searchConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5004,7 +5783,7 @@ public Builder setSearchConfig( } else { searchConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5022,7 +5801,7 @@ public Builder setSearchConfig( */ public Builder mergeSearchConfig(com.google.cloud.dialogflow.cx.v3.SearchConfig value) { if (searchConfigBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00010000) != 0) && searchConfig_ != null && searchConfig_ != com.google.cloud.dialogflow.cx.v3.SearchConfig.getDefaultInstance()) { @@ -5034,7 +5813,7 @@ public Builder mergeSearchConfig(com.google.cloud.dialogflow.cx.v3.SearchConfig searchConfigBuilder_.mergeFrom(value); } if (searchConfig_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -5052,7 +5831,7 @@ public Builder mergeSearchConfig(com.google.cloud.dialogflow.cx.v3.SearchConfig * */ public Builder clearSearchConfig() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00010000); searchConfig_ = null; if (searchConfigBuilder_ != null) { searchConfigBuilder_.dispose(); @@ -5074,7 +5853,7 @@ public Builder clearSearchConfig() { * */ public com.google.cloud.dialogflow.cx.v3.SearchConfig.Builder getSearchConfigBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00010000; onChanged(); return getSearchConfigFieldBuilder().getBuilder(); } @@ -5146,7 +5925,7 @@ public com.google.cloud.dialogflow.cx.v3.SearchConfigOrBuilder getSearchConfigOr * * @deprecated * google.cloud.dialogflow.cx.v3.QueryParameters.populate_data_store_connection_signals is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=730 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=770 * @return The populateDataStoreConnectionSignals. */ @java.lang.Override @@ -5171,7 +5950,7 @@ public boolean getPopulateDataStoreConnectionSignals() { * * @deprecated * google.cloud.dialogflow.cx.v3.QueryParameters.populate_data_store_connection_signals is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=730 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=770 * @param value The populateDataStoreConnectionSignals to set. * @return This builder for chaining. */ @@ -5179,7 +5958,7 @@ public boolean getPopulateDataStoreConnectionSignals() { public Builder setPopulateDataStoreConnectionSignals(boolean value) { populateDataStoreConnectionSignals_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5200,12 +5979,12 @@ public Builder setPopulateDataStoreConnectionSignals(boolean value) { * * @deprecated * google.cloud.dialogflow.cx.v3.QueryParameters.populate_data_store_connection_signals is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=730 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=770 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearPopulateDataStoreConnectionSignals() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00020000); populateDataStoreConnectionSignals_ = false; onChanged(); return this; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java index ba83333b6839..d297a81036e8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java @@ -332,6 +332,42 @@ com.google.cloud.dialogflow.cx.v3.SessionEntityTypeOrBuilder getSessionEntityTyp */ com.google.protobuf.StructOrBuilder getParametersOrBuilder(); + /** + * + * + *
+   * Scope for the parameters. If not specified, parameters will be treated as
+   * session parameters. Parameters with custom scope will not be put into
+   * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
+   *
+   * You can reference the parameters with custom scope in the agent with the
+   * following format: $parameter-scope.params.parameter-id.
+   * 
+ * + * string parameter_scope = 12; + * + * @return The parameterScope. + */ + java.lang.String getParameterScope(); + + /** + * + * + *
+   * Scope for the parameters. If not specified, parameters will be treated as
+   * session parameters. Parameters with custom scope will not be put into
+   * [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
+   *
+   * You can reference the parameters with custom scope in the agent with the
+   * following format: $parameter-scope.params.parameter-id.
+   * 
+ * + * string parameter_scope = 12; + * + * @return The bytes for parameterScope. + */ + com.google.protobuf.ByteString getParameterScopeBytes(); + /** * * @@ -589,6 +625,91 @@ java.lang.String getWebhookHeadersOrDefault( */ com.google.protobuf.ByteString getFlowVersionsBytes(int index); + /** + * + * + *
+   * Optional. The unique identifier of the
+   * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+   * session with. If `current_playbook` is specified, the previous state of the
+   * session will be ignored by Dialogflow.
+   *
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The currentPlaybook. + */ + java.lang.String getCurrentPlaybook(); + + /** + * + * + *
+   * Optional. The unique identifier of the
+   * [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the
+   * session with. If `current_playbook` is specified, the previous state of the
+   * session will be ignored by Dialogflow.
+   *
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
+   * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for currentPlaybook. + */ + com.google.protobuf.ByteString getCurrentPlaybookBytes(); + + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + boolean hasLlmModelSettings(); + + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + com.google.cloud.dialogflow.cx.v3.LlmModelSettings getLlmModelSettings(); + + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder(); + /** * * @@ -835,7 +956,7 @@ java.lang.String getWebhookHeadersOrDefault( * * @deprecated * google.cloud.dialogflow.cx.v3.QueryParameters.populate_data_store_connection_signals is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=730 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=770 * @return The populateDataStoreConnectionSignals. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java index 90d306887c22..54fada1e513f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java @@ -42,10 +42,6 @@ private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { private QueryResult() { languageCode_ = ""; responseMessages_ = java.util.Collections.emptyList(); - webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); - webhookLatencies_ = java.util.Collections.emptyList(); - webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); webhookStatuses_ = java.util.Collections.emptyList(); webhookPayloads_ = java.util.Collections.emptyList(); } @@ -739,286 +735,6 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMes return responseMessages_.get(index); } - public static final int WEBHOOK_IDS_FIELD_NUMBER = 25; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList webhookIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * The list of webhook ids in the order of call sequence.
-   * 
- * - * repeated string webhook_ids = 25; - * - * @return A list containing the webhookIds. - */ - public com.google.protobuf.ProtocolStringList getWebhookIdsList() { - return webhookIds_; - } - - /** - * - * - *
-   * The list of webhook ids in the order of call sequence.
-   * 
- * - * repeated string webhook_ids = 25; - * - * @return The count of webhookIds. - */ - public int getWebhookIdsCount() { - return webhookIds_.size(); - } - - /** - * - * - *
-   * The list of webhook ids in the order of call sequence.
-   * 
- * - * repeated string webhook_ids = 25; - * - * @param index The index of the element to return. - * @return The webhookIds at the given index. - */ - public java.lang.String getWebhookIds(int index) { - return webhookIds_.get(index); - } - - /** - * - * - *
-   * The list of webhook ids in the order of call sequence.
-   * 
- * - * repeated string webhook_ids = 25; - * - * @param index The index of the value to return. - * @return The bytes of the webhookIds at the given index. - */ - public com.google.protobuf.ByteString getWebhookIdsBytes(int index) { - return webhookIds_.getByteString(index); - } - - public static final int WEBHOOK_DISPLAY_NAMES_FIELD_NUMBER = 26; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList webhookDisplayNames_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * The list of webhook display names in the order of call sequence.
-   * 
- * - * repeated string webhook_display_names = 26; - * - * @return A list containing the webhookDisplayNames. - */ - public com.google.protobuf.ProtocolStringList getWebhookDisplayNamesList() { - return webhookDisplayNames_; - } - - /** - * - * - *
-   * The list of webhook display names in the order of call sequence.
-   * 
- * - * repeated string webhook_display_names = 26; - * - * @return The count of webhookDisplayNames. - */ - public int getWebhookDisplayNamesCount() { - return webhookDisplayNames_.size(); - } - - /** - * - * - *
-   * The list of webhook display names in the order of call sequence.
-   * 
- * - * repeated string webhook_display_names = 26; - * - * @param index The index of the element to return. - * @return The webhookDisplayNames at the given index. - */ - public java.lang.String getWebhookDisplayNames(int index) { - return webhookDisplayNames_.get(index); - } - - /** - * - * - *
-   * The list of webhook display names in the order of call sequence.
-   * 
- * - * repeated string webhook_display_names = 26; - * - * @param index The index of the value to return. - * @return The bytes of the webhookDisplayNames at the given index. - */ - public com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index) { - return webhookDisplayNames_.getByteString(index); - } - - public static final int WEBHOOK_LATENCIES_FIELD_NUMBER = 27; - - @SuppressWarnings("serial") - private java.util.List webhookLatencies_; - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - @java.lang.Override - public java.util.List getWebhookLatenciesList() { - return webhookLatencies_; - } - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - @java.lang.Override - public java.util.List - getWebhookLatenciesOrBuilderList() { - return webhookLatencies_; - } - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - @java.lang.Override - public int getWebhookLatenciesCount() { - return webhookLatencies_.size(); - } - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - @java.lang.Override - public com.google.protobuf.Duration getWebhookLatencies(int index) { - return webhookLatencies_.get(index); - } - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index) { - return webhookLatencies_.get(index); - } - - public static final int WEBHOOK_TAGS_FIELD_NUMBER = 29; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList webhookTags_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * The list of webhook tags in the order of call sequence.
-   * 
- * - * repeated string webhook_tags = 29; - * - * @return A list containing the webhookTags. - */ - public com.google.protobuf.ProtocolStringList getWebhookTagsList() { - return webhookTags_; - } - - /** - * - * - *
-   * The list of webhook tags in the order of call sequence.
-   * 
- * - * repeated string webhook_tags = 29; - * - * @return The count of webhookTags. - */ - public int getWebhookTagsCount() { - return webhookTags_.size(); - } - - /** - * - * - *
-   * The list of webhook tags in the order of call sequence.
-   * 
- * - * repeated string webhook_tags = 29; - * - * @param index The index of the element to return. - * @return The webhookTags at the given index. - */ - public java.lang.String getWebhookTags(int index) { - return webhookTags_.get(index); - } - - /** - * - * - *
-   * The list of webhook tags in the order of call sequence.
-   * 
- * - * repeated string webhook_tags = 29; - * - * @param index The index of the value to return. - * @return The bytes of the webhookTags at the given index. - */ - public com.google.protobuf.ByteString getWebhookTagsBytes(int index) { - return webhookTags_.getByteString(index); - } - public static final int WEBHOOK_STATUSES_FIELD_NUMBER = 13; @SuppressWarnings("serial") @@ -1322,7 +1038,7 @@ public com.google.cloud.dialogflow.cx.v3.FlowOrBuilder getCurrentFlowOrBuilder() * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=1049 + * google/cloud/dialogflow/cx/v3/session.proto;l=1080 * @return Whether the intent field is set. */ @java.lang.Override @@ -1346,7 +1062,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=1049 + * google/cloud/dialogflow/cx/v3/session.proto;l=1080 * @return The intent. */ @java.lang.Override @@ -1400,7 +1116,7 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1060 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1091 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -1840,19 +1556,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (queryCase_ == 23) { output.writeMessage(23, (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); } - for (int i = 0; i < webhookIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 25, webhookIds_.getRaw(i)); - } - for (int i = 0; i < webhookDisplayNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 26, webhookDisplayNames_.getRaw(i)); - } - for (int i = 0; i < webhookLatencies_.size(); i++) { - output.writeMessage(27, webhookLatencies_.get(i)); - } - for (int i = 0; i < webhookTags_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 29, webhookTags_.getRaw(i)); - } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(31, getCurrentFlow()); } @@ -1926,34 +1629,6 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 23, (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); } - { - int dataSize = 0; - for (int i = 0; i < webhookIds_.size(); i++) { - dataSize += computeStringSizeNoTag(webhookIds_.getRaw(i)); - } - size += dataSize; - size += 2 * getWebhookIdsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < webhookDisplayNames_.size(); i++) { - dataSize += computeStringSizeNoTag(webhookDisplayNames_.getRaw(i)); - } - size += dataSize; - size += 2 * getWebhookDisplayNamesList().size(); - } - for (int i = 0; i < webhookLatencies_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(27, webhookLatencies_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < webhookTags_.size(); i++) { - dataSize += computeStringSizeNoTag(webhookTags_.getRaw(i)); - } - size += dataSize; - size += 2 * getWebhookTagsList().size(); - } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getCurrentFlow()); } @@ -1987,10 +1662,6 @@ public boolean equals(final java.lang.Object obj) { if (!getParameters().equals(other.getParameters())) return false; } if (!getResponseMessagesList().equals(other.getResponseMessagesList())) return false; - if (!getWebhookIdsList().equals(other.getWebhookIdsList())) return false; - if (!getWebhookDisplayNamesList().equals(other.getWebhookDisplayNamesList())) return false; - if (!getWebhookLatenciesList().equals(other.getWebhookLatenciesList())) return false; - if (!getWebhookTagsList().equals(other.getWebhookTagsList())) return false; if (!getWebhookStatusesList().equals(other.getWebhookStatusesList())) return false; if (!getWebhookPayloadsList().equals(other.getWebhookPayloadsList())) return false; if (hasCurrentPage() != other.hasCurrentPage()) return false; @@ -2070,22 +1741,6 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getResponseMessagesList().hashCode(); } - if (getWebhookIdsCount() > 0) { - hash = (37 * hash) + WEBHOOK_IDS_FIELD_NUMBER; - hash = (53 * hash) + getWebhookIdsList().hashCode(); - } - if (getWebhookDisplayNamesCount() > 0) { - hash = (37 * hash) + WEBHOOK_DISPLAY_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getWebhookDisplayNamesList().hashCode(); - } - if (getWebhookLatenciesCount() > 0) { - hash = (37 * hash) + WEBHOOK_LATENCIES_FIELD_NUMBER; - hash = (53 * hash) + getWebhookLatenciesList().hashCode(); - } - if (getWebhookTagsCount() > 0) { - hash = (37 * hash) + WEBHOOK_TAGS_FIELD_NUMBER; - hash = (53 * hash) + getWebhookTagsList().hashCode(); - } if (getWebhookStatusesCount() > 0) { hash = (37 * hash) + WEBHOOK_STATUSES_FIELD_NUMBER; hash = (53 * hash) + getWebhookStatusesList().hashCode(); @@ -2297,7 +1952,6 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getParametersFieldBuilder(); getResponseMessagesFieldBuilder(); - getWebhookLatenciesFieldBuilder(); getWebhookStatusesFieldBuilder(); getWebhookPayloadsFieldBuilder(); getCurrentPageFieldBuilder(); @@ -2331,30 +1985,20 @@ public Builder clear() { responseMessagesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); - webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); - if (webhookLatenciesBuilder_ == null) { - webhookLatencies_ = java.util.Collections.emptyList(); - } else { - webhookLatencies_ = null; - webhookLatenciesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000400); - webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (webhookStatusesBuilder_ == null) { webhookStatuses_ = java.util.Collections.emptyList(); } else { webhookStatuses_ = null; webhookStatusesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000100); if (webhookPayloadsBuilder_ == null) { webhookPayloads_ = java.util.Collections.emptyList(); } else { webhookPayloads_ = null; webhookPayloadsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00000200); currentPage_ = null; if (currentPageBuilder_ != null) { currentPageBuilder_.dispose(); @@ -2445,28 +2089,19 @@ private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.QueryR } else { result.responseMessages_ = responseMessagesBuilder_.build(); } - if (webhookLatenciesBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { - webhookLatencies_ = java.util.Collections.unmodifiableList(webhookLatencies_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.webhookLatencies_ = webhookLatencies_; - } else { - result.webhookLatencies_ = webhookLatenciesBuilder_.build(); - } if (webhookStatusesBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { webhookStatuses_ = java.util.Collections.unmodifiableList(webhookStatuses_); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000100); } result.webhookStatuses_ = webhookStatuses_; } else { result.webhookStatuses_ = webhookStatusesBuilder_.build(); } if (webhookPayloadsBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { webhookPayloads_ = java.util.Collections.unmodifiableList(webhookPayloads_); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00000200); } result.webhookPayloads_ = webhookPayloads_; } else { @@ -2484,60 +2119,48 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.QueryResult result) result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000100) != 0)) { - webhookIds_.makeImmutable(); - result.webhookIds_ = webhookIds_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - webhookDisplayNames_.makeImmutable(); - result.webhookDisplayNames_ = webhookDisplayNames_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - webhookTags_.makeImmutable(); - result.webhookTags_ = webhookTags_; - } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.currentPage_ = currentPageBuilder_ == null ? currentPage_ : currentPageBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.currentFlow_ = currentFlowBuilder_ == null ? currentFlow_ : currentFlowBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.intent_ = intentBuilder_ == null ? intent_ : intentBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.intentDetectionConfidence_ = intentDetectionConfidence_; } - if (((from_bitField0_ & 0x00040000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.match_ = matchBuilder_ == null ? match_ : matchBuilder_.build(); to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00080000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.diagnosticInfo_ = diagnosticInfoBuilder_ == null ? diagnosticInfo_ : diagnosticInfoBuilder_.build(); to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00100000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.sentimentAnalysisResult_ = sentimentAnalysisResultBuilder_ == null ? sentimentAnalysisResult_ : sentimentAnalysisResultBuilder_.build(); to_bitField0_ |= 0x00000040; } - if (((from_bitField0_ & 0x00200000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); to_bitField0_ |= 0x00000080; } - if (((from_bitField0_ & 0x00400000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.allowAnswerFeedback_ = allowAnswerFeedback_; } - if (((from_bitField0_ & 0x00800000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { result.dataStoreConnectionSignals_ = dataStoreConnectionSignalsBuilder_ == null ? dataStoreConnectionSignals_ @@ -2635,68 +2258,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { } } } - if (!other.webhookIds_.isEmpty()) { - if (webhookIds_.isEmpty()) { - webhookIds_ = other.webhookIds_; - bitField0_ |= 0x00000100; - } else { - ensureWebhookIdsIsMutable(); - webhookIds_.addAll(other.webhookIds_); - } - onChanged(); - } - if (!other.webhookDisplayNames_.isEmpty()) { - if (webhookDisplayNames_.isEmpty()) { - webhookDisplayNames_ = other.webhookDisplayNames_; - bitField0_ |= 0x00000200; - } else { - ensureWebhookDisplayNamesIsMutable(); - webhookDisplayNames_.addAll(other.webhookDisplayNames_); - } - onChanged(); - } - if (webhookLatenciesBuilder_ == null) { - if (!other.webhookLatencies_.isEmpty()) { - if (webhookLatencies_.isEmpty()) { - webhookLatencies_ = other.webhookLatencies_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.addAll(other.webhookLatencies_); - } - onChanged(); - } - } else { - if (!other.webhookLatencies_.isEmpty()) { - if (webhookLatenciesBuilder_.isEmpty()) { - webhookLatenciesBuilder_.dispose(); - webhookLatenciesBuilder_ = null; - webhookLatencies_ = other.webhookLatencies_; - bitField0_ = (bitField0_ & ~0x00000400); - webhookLatenciesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getWebhookLatenciesFieldBuilder() - : null; - } else { - webhookLatenciesBuilder_.addAllMessages(other.webhookLatencies_); - } - } - } - if (!other.webhookTags_.isEmpty()) { - if (webhookTags_.isEmpty()) { - webhookTags_ = other.webhookTags_; - bitField0_ |= 0x00000800; - } else { - ensureWebhookTagsIsMutable(); - webhookTags_.addAll(other.webhookTags_); - } - onChanged(); - } if (webhookStatusesBuilder_ == null) { if (!other.webhookStatuses_.isEmpty()) { if (webhookStatuses_.isEmpty()) { webhookStatuses_ = other.webhookStatuses_; - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000100); } else { ensureWebhookStatusesIsMutable(); webhookStatuses_.addAll(other.webhookStatuses_); @@ -2709,7 +2275,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { webhookStatusesBuilder_.dispose(); webhookStatusesBuilder_ = null; webhookStatuses_ = other.webhookStatuses_; - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000100); webhookStatusesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWebhookStatusesFieldBuilder() @@ -2723,7 +2289,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { if (!other.webhookPayloads_.isEmpty()) { if (webhookPayloads_.isEmpty()) { webhookPayloads_ = other.webhookPayloads_; - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00000200); } else { ensureWebhookPayloadsIsMutable(); webhookPayloads_.addAll(other.webhookPayloads_); @@ -2736,7 +2302,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { webhookPayloadsBuilder_.dispose(); webhookPayloadsBuilder_ = null; webhookPayloads_ = other.webhookPayloads_; - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00000200); webhookPayloadsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWebhookPayloadsFieldBuilder() @@ -2889,25 +2455,25 @@ public Builder mergeFrom( case 58: { input.readMessage(getCurrentPageFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000400; break; } // case 58 case 66: { input.readMessage(getIntentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00001000; break; } // case 66 case 77: { intentDetectionConfidence_ = input.readFloat(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00002000; break; } // case 77 case 82: { input.readMessage(getDiagnosticInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00008000; break; } // case 82 case 90: @@ -2946,21 +2512,21 @@ public Builder mergeFrom( case 122: { input.readMessage(getMatchFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00004000; break; } // case 122 case 138: { input.readMessage( getSentimentAnalysisResultFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00010000; break; } // case 138 case 170: { input.readMessage( getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00200000; + bitField0_ |= 0x00020000; break; } // case 170 case 186: @@ -2969,56 +2535,23 @@ public Builder mergeFrom( queryCase_ = 23; break; } // case 186 - case 202: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureWebhookIdsIsMutable(); - webhookIds_.add(s); - break; - } // case 202 - case 210: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureWebhookDisplayNamesIsMutable(); - webhookDisplayNames_.add(s); - break; - } // case 210 - case 218: - { - com.google.protobuf.Duration m = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (webhookLatenciesBuilder_ == null) { - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.add(m); - } else { - webhookLatenciesBuilder_.addMessage(m); - } - break; - } // case 218 - case 234: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureWebhookTagsIsMutable(); - webhookTags_.add(s); - break; - } // case 234 case 250: { input.readMessage(getCurrentFlowFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00000800; break; } // case 250 case 256: { allowAnswerFeedback_ = input.readBool(); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00040000; break; } // case 256 case 282: { input.readMessage( getDataStoreConnectionSignalsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00800000; + bitField0_ |= 0x00080000; break; } // case 282 default: @@ -4518,1151 +4051,233 @@ public Builder addResponseMessages( onChanged(); } else { responseMessagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public Builder addResponseMessages( - int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder builderForValue) { - if (responseMessagesBuilder_ == null) { - ensureResponseMessagesIsMutable(); - responseMessages_.add(index, builderForValue.build()); - onChanged(); - } else { - responseMessagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public Builder addAllResponseMessages( - java.lang.Iterable values) { - if (responseMessagesBuilder_ == null) { - ensureResponseMessagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, responseMessages_); - onChanged(); - } else { - responseMessagesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public Builder clearResponseMessages() { - if (responseMessagesBuilder_ == null) { - responseMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - responseMessagesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public Builder removeResponseMessages(int index) { - if (responseMessagesBuilder_ == null) { - ensureResponseMessagesIsMutable(); - responseMessages_.remove(index); - onChanged(); - } else { - responseMessagesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder getResponseMessagesBuilder( - int index) { - return getResponseMessagesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOrBuilder( - int index) { - if (responseMessagesBuilder_ == null) { - return responseMessages_.get(index); - } else { - return responseMessagesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public java.util.List - getResponseMessagesOrBuilderList() { - if (responseMessagesBuilder_ != null) { - return responseMessagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responseMessages_); - } - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addResponseMessagesBuilder() { - return getResponseMessagesFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()); - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addResponseMessagesBuilder( - int index) { - return getResponseMessagesFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()); - } - - /** - * - * - *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; - */ - public java.util.List - getResponseMessagesBuilderList() { - return getResponseMessagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder> - getResponseMessagesFieldBuilder() { - if (responseMessagesBuilder_ == null) { - responseMessagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>( - responseMessages_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - responseMessages_ = null; - } - return responseMessagesBuilder_; - } - - private com.google.protobuf.LazyStringArrayList webhookIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureWebhookIdsIsMutable() { - if (!webhookIds_.isModifiable()) { - webhookIds_ = new com.google.protobuf.LazyStringArrayList(webhookIds_); - } - bitField0_ |= 0x00000100; - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @return A list containing the webhookIds. - */ - public com.google.protobuf.ProtocolStringList getWebhookIdsList() { - webhookIds_.makeImmutable(); - return webhookIds_; - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @return The count of webhookIds. - */ - public int getWebhookIdsCount() { - return webhookIds_.size(); - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @param index The index of the element to return. - * @return The webhookIds at the given index. - */ - public java.lang.String getWebhookIds(int index) { - return webhookIds_.get(index); - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @param index The index of the value to return. - * @return The bytes of the webhookIds at the given index. - */ - public com.google.protobuf.ByteString getWebhookIdsBytes(int index) { - return webhookIds_.getByteString(index); - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @param index The index to set the value at. - * @param value The webhookIds to set. - * @return This builder for chaining. - */ - public Builder setWebhookIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebhookIdsIsMutable(); - webhookIds_.set(index, value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @param value The webhookIds to add. - * @return This builder for chaining. - */ - public Builder addWebhookIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebhookIdsIsMutable(); - webhookIds_.add(value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @param values The webhookIds to add. - * @return This builder for chaining. - */ - public Builder addAllWebhookIds(java.lang.Iterable values) { - ensureWebhookIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookIds_); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @return This builder for chaining. - */ - public Builder clearWebhookIds() { - webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of webhook ids in the order of call sequence.
-     * 
- * - * repeated string webhook_ids = 25; - * - * @param value The bytes of the webhookIds to add. - * @return This builder for chaining. - */ - public Builder addWebhookIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureWebhookIdsIsMutable(); - webhookIds_.add(value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList webhookDisplayNames_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureWebhookDisplayNamesIsMutable() { - if (!webhookDisplayNames_.isModifiable()) { - webhookDisplayNames_ = new com.google.protobuf.LazyStringArrayList(webhookDisplayNames_); - } - bitField0_ |= 0x00000200; - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @return A list containing the webhookDisplayNames. - */ - public com.google.protobuf.ProtocolStringList getWebhookDisplayNamesList() { - webhookDisplayNames_.makeImmutable(); - return webhookDisplayNames_; - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @return The count of webhookDisplayNames. - */ - public int getWebhookDisplayNamesCount() { - return webhookDisplayNames_.size(); - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @param index The index of the element to return. - * @return The webhookDisplayNames at the given index. - */ - public java.lang.String getWebhookDisplayNames(int index) { - return webhookDisplayNames_.get(index); - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @param index The index of the value to return. - * @return The bytes of the webhookDisplayNames at the given index. - */ - public com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index) { - return webhookDisplayNames_.getByteString(index); - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @param index The index to set the value at. - * @param value The webhookDisplayNames to set. - * @return This builder for chaining. - */ - public Builder setWebhookDisplayNames(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebhookDisplayNamesIsMutable(); - webhookDisplayNames_.set(index, value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @param value The webhookDisplayNames to add. - * @return This builder for chaining. - */ - public Builder addWebhookDisplayNames(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebhookDisplayNamesIsMutable(); - webhookDisplayNames_.add(value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @param values The webhookDisplayNames to add. - * @return This builder for chaining. - */ - public Builder addAllWebhookDisplayNames(java.lang.Iterable values) { - ensureWebhookDisplayNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookDisplayNames_); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @return This builder for chaining. - */ - public Builder clearWebhookDisplayNames() { - webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of webhook display names in the order of call sequence.
-     * 
- * - * repeated string webhook_display_names = 26; - * - * @param value The bytes of the webhookDisplayNames to add. - * @return This builder for chaining. - */ - public Builder addWebhookDisplayNamesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureWebhookDisplayNamesIsMutable(); - webhookDisplayNames_.add(value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - private java.util.List webhookLatencies_ = - java.util.Collections.emptyList(); - - private void ensureWebhookLatenciesIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { - webhookLatencies_ = - new java.util.ArrayList(webhookLatencies_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - webhookLatenciesBuilder_; - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public java.util.List getWebhookLatenciesList() { - if (webhookLatenciesBuilder_ == null) { - return java.util.Collections.unmodifiableList(webhookLatencies_); - } else { - return webhookLatenciesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public int getWebhookLatenciesCount() { - if (webhookLatenciesBuilder_ == null) { - return webhookLatencies_.size(); - } else { - return webhookLatenciesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public com.google.protobuf.Duration getWebhookLatencies(int index) { - if (webhookLatenciesBuilder_ == null) { - return webhookLatencies_.get(index); - } else { - return webhookLatenciesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder setWebhookLatencies(int index, com.google.protobuf.Duration value) { - if (webhookLatenciesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.set(index, value); - onChanged(); - } else { - webhookLatenciesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder setWebhookLatencies( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (webhookLatenciesBuilder_ == null) { - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.set(index, builderForValue.build()); - onChanged(); - } else { - webhookLatenciesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder addWebhookLatencies(com.google.protobuf.Duration value) { - if (webhookLatenciesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.add(value); - onChanged(); - } else { - webhookLatenciesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder addWebhookLatencies(int index, com.google.protobuf.Duration value) { - if (webhookLatenciesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.add(index, value); - onChanged(); - } else { - webhookLatenciesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder addWebhookLatencies(com.google.protobuf.Duration.Builder builderForValue) { - if (webhookLatenciesBuilder_ == null) { - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.add(builderForValue.build()); - onChanged(); - } else { - webhookLatenciesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder addWebhookLatencies( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (webhookLatenciesBuilder_ == null) { - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.add(index, builderForValue.build()); - onChanged(); - } else { - webhookLatenciesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder addAllWebhookLatencies( - java.lang.Iterable values) { - if (webhookLatenciesBuilder_ == null) { - ensureWebhookLatenciesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookLatencies_); - onChanged(); - } else { - webhookLatenciesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder clearWebhookLatencies() { - if (webhookLatenciesBuilder_ == null) { - webhookLatencies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - webhookLatenciesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public Builder removeWebhookLatencies(int index) { - if (webhookLatenciesBuilder_ == null) { - ensureWebhookLatenciesIsMutable(); - webhookLatencies_.remove(index); - onChanged(); - } else { - webhookLatenciesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public com.google.protobuf.Duration.Builder getWebhookLatenciesBuilder(int index) { - return getWebhookLatenciesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index) { - if (webhookLatenciesBuilder_ == null) { - return webhookLatencies_.get(index); - } else { - return webhookLatenciesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public java.util.List - getWebhookLatenciesOrBuilderList() { - if (webhookLatenciesBuilder_ != null) { - return webhookLatenciesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(webhookLatencies_); - } - } - - /** - * - * - *
-     * The list of webhook latencies in the order of call sequence.
-     * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - public com.google.protobuf.Duration.Builder addWebhookLatenciesBuilder() { - return getWebhookLatenciesFieldBuilder() - .addBuilder(com.google.protobuf.Duration.getDefaultInstance()); + } + return this; } /** * * *
-     * The list of webhook latencies in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated .google.protobuf.Duration webhook_latencies = 27; + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public com.google.protobuf.Duration.Builder addWebhookLatenciesBuilder(int index) { - return getWebhookLatenciesFieldBuilder() - .addBuilder(index, com.google.protobuf.Duration.getDefaultInstance()); + public Builder addResponseMessages( + int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder builderForValue) { + if (responseMessagesBuilder_ == null) { + ensureResponseMessagesIsMutable(); + responseMessages_.add(index, builderForValue.build()); + onChanged(); + } else { + responseMessagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; } /** * * *
-     * The list of webhook latencies in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated .google.protobuf.Duration webhook_latencies = 27; + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public java.util.List getWebhookLatenciesBuilderList() { - return getWebhookLatenciesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getWebhookLatenciesFieldBuilder() { - if (webhookLatenciesBuilder_ == null) { - webhookLatenciesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - webhookLatencies_, - ((bitField0_ & 0x00000400) != 0), - getParentForChildren(), - isClean()); - webhookLatencies_ = null; - } - return webhookLatenciesBuilder_; - } - - private com.google.protobuf.LazyStringArrayList webhookTags_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureWebhookTagsIsMutable() { - if (!webhookTags_.isModifiable()) { - webhookTags_ = new com.google.protobuf.LazyStringArrayList(webhookTags_); + public Builder addAllResponseMessages( + java.lang.Iterable values) { + if (responseMessagesBuilder_ == null) { + ensureResponseMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, responseMessages_); + onChanged(); + } else { + responseMessagesBuilder_.addAllMessages(values); } - bitField0_ |= 0x00000800; + return this; } /** * * *
-     * The list of webhook tags in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated string webhook_tags = 29; - * - * @return A list containing the webhookTags. + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public com.google.protobuf.ProtocolStringList getWebhookTagsList() { - webhookTags_.makeImmutable(); - return webhookTags_; + public Builder clearResponseMessages() { + if (responseMessagesBuilder_ == null) { + responseMessages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + responseMessagesBuilder_.clear(); + } + return this; } /** * * *
-     * The list of webhook tags in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated string webhook_tags = 29; - * - * @return The count of webhookTags. + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public int getWebhookTagsCount() { - return webhookTags_.size(); + public Builder removeResponseMessages(int index) { + if (responseMessagesBuilder_ == null) { + ensureResponseMessagesIsMutable(); + responseMessages_.remove(index); + onChanged(); + } else { + responseMessagesBuilder_.remove(index); + } + return this; } /** * * *
-     * The list of webhook tags in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated string webhook_tags = 29; - * - * @param index The index of the element to return. - * @return The webhookTags at the given index. + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public java.lang.String getWebhookTags(int index) { - return webhookTags_.get(index); + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder getResponseMessagesBuilder( + int index) { + return getResponseMessagesFieldBuilder().getBuilder(index); } /** * * *
-     * The list of webhook tags in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated string webhook_tags = 29; - * - * @param index The index of the value to return. - * @return The bytes of the webhookTags at the given index. + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public com.google.protobuf.ByteString getWebhookTagsBytes(int index) { - return webhookTags_.getByteString(index); + public com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOrBuilder( + int index) { + if (responseMessagesBuilder_ == null) { + return responseMessages_.get(index); + } else { + return responseMessagesBuilder_.getMessageOrBuilder(index); + } } /** * * *
-     * The list of webhook tags in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated string webhook_tags = 29; - * - * @param index The index to set the value at. - * @param value The webhookTags to set. - * @return This builder for chaining. + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public Builder setWebhookTags(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List + getResponseMessagesOrBuilderList() { + if (responseMessagesBuilder_ != null) { + return responseMessagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responseMessages_); } - ensureWebhookTagsIsMutable(); - webhookTags_.set(index, value); - bitField0_ |= 0x00000800; - onChanged(); - return this; } /** * * *
-     * The list of webhook tags in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated string webhook_tags = 29; - * - * @param value The webhookTags to add. - * @return This builder for chaining. + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public Builder addWebhookTags(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebhookTagsIsMutable(); - webhookTags_.add(value); - bitField0_ |= 0x00000800; - onChanged(); - return this; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addResponseMessagesBuilder() { + return getResponseMessagesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()); } /** * * *
-     * The list of webhook tags in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated string webhook_tags = 29; - * - * @param values The webhookTags to add. - * @return This builder for chaining. + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public Builder addAllWebhookTags(java.lang.Iterable values) { - ensureWebhookTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookTags_); - bitField0_ |= 0x00000800; - onChanged(); - return this; + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addResponseMessagesBuilder( + int index) { + return getResponseMessagesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()); } /** * * *
-     * The list of webhook tags in the order of call sequence.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
      * 
* - * repeated string webhook_tags = 29; - * - * @return This builder for chaining. + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; */ - public Builder clearWebhookTags() { - webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - ; - onChanged(); - return this; + public java.util.List + getResponseMessagesBuilderList() { + return getResponseMessagesFieldBuilder().getBuilderList(); } - /** - * - * - *
-     * The list of webhook tags in the order of call sequence.
-     * 
- * - * repeated string webhook_tags = 29; - * - * @param value The bytes of the webhookTags to add. - * @return This builder for chaining. - */ - public Builder addWebhookTagsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder> + getResponseMessagesFieldBuilder() { + if (responseMessagesBuilder_ == null) { + responseMessagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>( + responseMessages_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + responseMessages_ = null; } - checkByteStringIsUtf8(value); - ensureWebhookTagsIsMutable(); - webhookTags_.add(value); - bitField0_ |= 0x00000800; - onChanged(); - return this; + return responseMessagesBuilder_; } private java.util.List webhookStatuses_ = java.util.Collections.emptyList(); private void ensureWebhookStatusesIsMutable() { - if (!((bitField0_ & 0x00001000) != 0)) { + if (!((bitField0_ & 0x00000100) != 0)) { webhookStatuses_ = new java.util.ArrayList(webhookStatuses_); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000100; } } @@ -5883,7 +4498,7 @@ public Builder addAllWebhookStatuses( public Builder clearWebhookStatuses() { if (webhookStatusesBuilder_ == null) { webhookStatuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); } else { webhookStatusesBuilder_.clear(); @@ -6010,7 +4625,7 @@ public java.util.List getWebhookStatusesBuilderLi com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( webhookStatuses_, - ((bitField0_ & 0x00001000) != 0), + ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); webhookStatuses_ = null; @@ -6022,9 +4637,9 @@ public java.util.List getWebhookStatusesBuilderLi java.util.Collections.emptyList(); private void ensureWebhookPayloadsIsMutable() { - if (!((bitField0_ & 0x00002000) != 0)) { + if (!((bitField0_ & 0x00000200) != 0)) { webhookPayloads_ = new java.util.ArrayList(webhookPayloads_); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00000200; } } @@ -6282,7 +4897,7 @@ public Builder addAllWebhookPayloads( public Builder clearWebhookPayloads() { if (webhookPayloadsBuilder_ == null) { webhookPayloads_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); } else { webhookPayloadsBuilder_.clear(); @@ -6432,7 +5047,7 @@ public java.util.List getWebhookPayloadsBuil com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( webhookPayloads_, - ((bitField0_ & 0x00002000) != 0), + ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); webhookPayloads_ = null; @@ -6461,7 +5076,7 @@ public java.util.List getWebhookPayloadsBuil * @return Whether the currentPage field is set. */ public boolean hasCurrentPage() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** @@ -6507,7 +5122,7 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { } else { currentPageBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -6529,7 +5144,7 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page.Builder bui } else { currentPageBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -6547,7 +5162,7 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page.Builder bui */ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { if (currentPageBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00000400) != 0) && currentPage_ != null && currentPage_ != com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance()) { getCurrentPageBuilder().mergeFrom(value); @@ -6558,7 +5173,7 @@ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { currentPageBuilder_.mergeFrom(value); } if (currentPage_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -6576,7 +5191,7 @@ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { * .google.cloud.dialogflow.cx.v3.Page current_page = 7; */ public Builder clearCurrentPage() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00000400); currentPage_ = null; if (currentPageBuilder_ != null) { currentPageBuilder_.dispose(); @@ -6598,7 +5213,7 @@ public Builder clearCurrentPage() { * .google.cloud.dialogflow.cx.v3.Page current_page = 7; */ public com.google.cloud.dialogflow.cx.v3.Page.Builder getCurrentPageBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000400; onChanged(); return getCurrentPageFieldBuilder().getBuilder(); } @@ -6673,7 +5288,7 @@ public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() * @return Whether the currentFlow field is set. */ public boolean hasCurrentFlow() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** @@ -6719,7 +5334,7 @@ public Builder setCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow value) { } else { currentFlowBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -6741,7 +5356,7 @@ public Builder setCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow.Builder bui } else { currentFlowBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -6759,7 +5374,7 @@ public Builder setCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow.Builder bui */ public Builder mergeCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow value) { if (currentFlowBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00000800) != 0) && currentFlow_ != null && currentFlow_ != com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance()) { getCurrentFlowBuilder().mergeFrom(value); @@ -6770,7 +5385,7 @@ public Builder mergeCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow value) { currentFlowBuilder_.mergeFrom(value); } if (currentFlow_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00000800; onChanged(); } return this; @@ -6788,7 +5403,7 @@ public Builder mergeCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow value) { * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; */ public Builder clearCurrentFlow() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00000800); currentFlow_ = null; if (currentFlowBuilder_ != null) { currentFlowBuilder_.dispose(); @@ -6810,7 +5425,7 @@ public Builder clearCurrentFlow() { * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; */ public com.google.cloud.dialogflow.cx.v3.Flow.Builder getCurrentFlowBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00000800; onChanged(); return getCurrentFlowFieldBuilder().getBuilder(); } @@ -6886,12 +5501,12 @@ public com.google.cloud.dialogflow.cx.v3.FlowOrBuilder getCurrentFlowOrBuilder() * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=1049 + * google/cloud/dialogflow/cx/v3/session.proto;l=1080 * @return Whether the intent field is set. */ @java.lang.Deprecated public boolean hasIntent() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** @@ -6909,7 +5524,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=1049 + * google/cloud/dialogflow/cx/v3/session.proto;l=1080 * @return The intent. */ @java.lang.Deprecated @@ -6947,7 +5562,7 @@ public Builder setIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { } else { intentBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -6973,7 +5588,7 @@ public Builder setIntent(com.google.cloud.dialogflow.cx.v3.Intent.Builder builde } else { intentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -6995,7 +5610,7 @@ public Builder setIntent(com.google.cloud.dialogflow.cx.v3.Intent.Builder builde @java.lang.Deprecated public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { if (intentBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00001000) != 0) && intent_ != null && intent_ != com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance()) { getIntentBuilder().mergeFrom(value); @@ -7006,7 +5621,7 @@ public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { intentBuilder_.mergeFrom(value); } if (intent_ != null) { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00001000; onChanged(); } return this; @@ -7028,7 +5643,7 @@ public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { */ @java.lang.Deprecated public Builder clearIntent() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00001000); intent_ = null; if (intentBuilder_ != null) { intentBuilder_.dispose(); @@ -7054,7 +5669,7 @@ public Builder clearIntent() { */ @java.lang.Deprecated public com.google.cloud.dialogflow.cx.v3.Intent.Builder getIntentBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00001000; onChanged(); return getIntentFieldBuilder().getBuilder(); } @@ -7135,7 +5750,7 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1060 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1091 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -7162,7 +5777,7 @@ public float getIntentDetectionConfidence() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1060 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1091 * @param value The intentDetectionConfidence to set. * @return This builder for chaining. */ @@ -7170,7 +5785,7 @@ public float getIntentDetectionConfidence() { public Builder setIntentDetectionConfidence(float value) { intentDetectionConfidence_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -7193,12 +5808,12 @@ public Builder setIntentDetectionConfidence(float value) { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1060 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1091 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearIntentDetectionConfidence() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00002000); intentDetectionConfidence_ = 0F; onChanged(); return this; @@ -7223,7 +5838,7 @@ public Builder clearIntentDetectionConfidence() { * @return Whether the match field is set. */ public boolean hasMatch() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** @@ -7265,7 +5880,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3.Match value) { } else { matchBuilder_.setMessage(value); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -7285,7 +5900,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3.Match.Builder builderF } else { matchBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -7301,7 +5916,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3.Match.Builder builderF */ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3.Match value) { if (matchBuilder_ == null) { - if (((bitField0_ & 0x00040000) != 0) + if (((bitField0_ & 0x00004000) != 0) && match_ != null && match_ != com.google.cloud.dialogflow.cx.v3.Match.getDefaultInstance()) { getMatchBuilder().mergeFrom(value); @@ -7312,7 +5927,7 @@ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3.Match value) { matchBuilder_.mergeFrom(value); } if (match_ != null) { - bitField0_ |= 0x00040000; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -7328,7 +5943,7 @@ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3.Match value) { * .google.cloud.dialogflow.cx.v3.Match match = 15; */ public Builder clearMatch() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00004000); match_ = null; if (matchBuilder_ != null) { matchBuilder_.dispose(); @@ -7348,7 +5963,7 @@ public Builder clearMatch() { * .google.cloud.dialogflow.cx.v3.Match match = 15; */ public com.google.cloud.dialogflow.cx.v3.Match.Builder getMatchBuilder() { - bitField0_ |= 0x00040000; + bitField0_ |= 0x00004000; onChanged(); return getMatchFieldBuilder().getBuilder(); } @@ -7433,7 +6048,7 @@ public com.google.cloud.dialogflow.cx.v3.MatchOrBuilder getMatchOrBuilder() { * @return Whether the diagnosticInfo field is set. */ public boolean hasDiagnosticInfo() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** @@ -7507,7 +6122,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct value) { } else { diagnosticInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -7543,7 +6158,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForVa } else { diagnosticInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -7575,7 +6190,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForVa */ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { if (diagnosticInfoBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) + if (((bitField0_ & 0x00008000) != 0) && diagnosticInfo_ != null && diagnosticInfo_ != com.google.protobuf.Struct.getDefaultInstance()) { getDiagnosticInfoBuilder().mergeFrom(value); @@ -7586,7 +6201,7 @@ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { diagnosticInfoBuilder_.mergeFrom(value); } if (diagnosticInfo_ != null) { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -7618,7 +6233,7 @@ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { * .google.protobuf.Struct diagnostic_info = 10; */ public Builder clearDiagnosticInfo() { - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00008000); diagnosticInfo_ = null; if (diagnosticInfoBuilder_ != null) { diagnosticInfoBuilder_.dispose(); @@ -7654,7 +6269,7 @@ public Builder clearDiagnosticInfo() { * .google.protobuf.Struct diagnostic_info = 10; */ public com.google.protobuf.Struct.Builder getDiagnosticInfoBuilder() { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00008000; onChanged(); return getDiagnosticInfoFieldBuilder().getBuilder(); } @@ -7759,7 +6374,7 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { * @return Whether the sentimentAnalysisResult field is set. */ public boolean hasSentimentAnalysisResult() { - return ((bitField0_ & 0x00100000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** @@ -7810,7 +6425,7 @@ public Builder setSentimentAnalysisResult( } else { sentimentAnalysisResultBuilder_.setMessage(value); } - bitField0_ |= 0x00100000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -7835,7 +6450,7 @@ public Builder setSentimentAnalysisResult( } else { sentimentAnalysisResultBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00100000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -7856,7 +6471,7 @@ public Builder setSentimentAnalysisResult( public Builder mergeSentimentAnalysisResult( com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult value) { if (sentimentAnalysisResultBuilder_ == null) { - if (((bitField0_ & 0x00100000) != 0) + if (((bitField0_ & 0x00010000) != 0) && sentimentAnalysisResult_ != null && sentimentAnalysisResult_ != com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.getDefaultInstance()) { @@ -7868,7 +6483,7 @@ public Builder mergeSentimentAnalysisResult( sentimentAnalysisResultBuilder_.mergeFrom(value); } if (sentimentAnalysisResult_ != null) { - bitField0_ |= 0x00100000; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -7888,7 +6503,7 @@ public Builder mergeSentimentAnalysisResult( * */ public Builder clearSentimentAnalysisResult() { - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00010000); sentimentAnalysisResult_ = null; if (sentimentAnalysisResultBuilder_ != null) { sentimentAnalysisResultBuilder_.dispose(); @@ -7913,7 +6528,7 @@ public Builder clearSentimentAnalysisResult() { */ public com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.Builder getSentimentAnalysisResultBuilder() { - bitField0_ |= 0x00100000; + bitField0_ |= 0x00010000; onChanged(); return getSentimentAnalysisResultFieldBuilder().getBuilder(); } @@ -7995,7 +6610,7 @@ public Builder clearSentimentAnalysisResult() { * @return Whether the advancedSettings field is set. */ public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00200000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** @@ -8045,7 +6660,7 @@ public Builder setAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSet } else { advancedSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -8070,7 +6685,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -8090,7 +6705,7 @@ public Builder setAdvancedSettings( */ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSettings value) { if (advancedSettingsBuilder_ == null) { - if (((bitField0_ & 0x00200000) != 0) + if (((bitField0_ & 0x00020000) != 0) && advancedSettings_ != null && advancedSettings_ != com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance()) { @@ -8102,7 +6717,7 @@ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedS advancedSettingsBuilder_.mergeFrom(value); } if (advancedSettings_ != null) { - bitField0_ |= 0x00200000; + bitField0_ |= 0x00020000; onChanged(); } return this; @@ -8122,7 +6737,7 @@ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedS * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; */ public Builder clearAdvancedSettings() { - bitField0_ = (bitField0_ & ~0x00200000); + bitField0_ = (bitField0_ & ~0x00020000); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -8146,7 +6761,7 @@ public Builder clearAdvancedSettings() { * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; */ public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder getAdvancedSettingsBuilder() { - bitField0_ |= 0x00200000; + bitField0_ |= 0x00020000; onChanged(); return getAdvancedSettingsFieldBuilder().getBuilder(); } @@ -8240,7 +6855,7 @@ public boolean getAllowAnswerFeedback() { public Builder setAllowAnswerFeedback(boolean value) { allowAnswerFeedback_ = value; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -8258,7 +6873,7 @@ public Builder setAllowAnswerFeedback(boolean value) { * @return This builder for chaining. */ public Builder clearAllowAnswerFeedback() { - bitField0_ = (bitField0_ & ~0x00400000); + bitField0_ = (bitField0_ & ~0x00040000); allowAnswerFeedback_ = false; onChanged(); return this; @@ -8287,7 +6902,7 @@ public Builder clearAllowAnswerFeedback() { * @return Whether the dataStoreConnectionSignals field is set. */ public boolean hasDataStoreConnectionSignals() { - return ((bitField0_ & 0x00800000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** @@ -8337,7 +6952,7 @@ public Builder setDataStoreConnectionSignals( } else { dataStoreConnectionSignalsBuilder_.setMessage(value); } - bitField0_ |= 0x00800000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -8361,7 +6976,7 @@ public Builder setDataStoreConnectionSignals( } else { dataStoreConnectionSignalsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00800000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -8381,7 +6996,7 @@ public Builder setDataStoreConnectionSignals( public Builder mergeDataStoreConnectionSignals( com.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals value) { if (dataStoreConnectionSignalsBuilder_ == null) { - if (((bitField0_ & 0x00800000) != 0) + if (((bitField0_ & 0x00080000) != 0) && dataStoreConnectionSignals_ != null && dataStoreConnectionSignals_ != com.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals @@ -8394,7 +7009,7 @@ public Builder mergeDataStoreConnectionSignals( dataStoreConnectionSignalsBuilder_.mergeFrom(value); } if (dataStoreConnectionSignals_ != null) { - bitField0_ |= 0x00800000; + bitField0_ |= 0x00080000; onChanged(); } return this; @@ -8413,7 +7028,7 @@ public Builder mergeDataStoreConnectionSignals( * */ public Builder clearDataStoreConnectionSignals() { - bitField0_ = (bitField0_ & ~0x00800000); + bitField0_ = (bitField0_ & ~0x00080000); dataStoreConnectionSignals_ = null; if (dataStoreConnectionSignalsBuilder_ != null) { dataStoreConnectionSignalsBuilder_.dispose(); @@ -8437,7 +7052,7 @@ public Builder clearDataStoreConnectionSignals() { */ public com.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.Builder getDataStoreConnectionSignalsBuilder() { - bitField0_ |= 0x00800000; + bitField0_ |= 0x00080000; onChanged(); return getDataStoreConnectionSignalsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java index 31a25992f886..09000f54f808 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java @@ -419,224 +419,6 @@ public interface QueryResultOrBuilder com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOrBuilder( int index); - /** - * - * - *
-   * The list of webhook ids in the order of call sequence.
-   * 
- * - * repeated string webhook_ids = 25; - * - * @return A list containing the webhookIds. - */ - java.util.List getWebhookIdsList(); - - /** - * - * - *
-   * The list of webhook ids in the order of call sequence.
-   * 
- * - * repeated string webhook_ids = 25; - * - * @return The count of webhookIds. - */ - int getWebhookIdsCount(); - - /** - * - * - *
-   * The list of webhook ids in the order of call sequence.
-   * 
- * - * repeated string webhook_ids = 25; - * - * @param index The index of the element to return. - * @return The webhookIds at the given index. - */ - java.lang.String getWebhookIds(int index); - - /** - * - * - *
-   * The list of webhook ids in the order of call sequence.
-   * 
- * - * repeated string webhook_ids = 25; - * - * @param index The index of the value to return. - * @return The bytes of the webhookIds at the given index. - */ - com.google.protobuf.ByteString getWebhookIdsBytes(int index); - - /** - * - * - *
-   * The list of webhook display names in the order of call sequence.
-   * 
- * - * repeated string webhook_display_names = 26; - * - * @return A list containing the webhookDisplayNames. - */ - java.util.List getWebhookDisplayNamesList(); - - /** - * - * - *
-   * The list of webhook display names in the order of call sequence.
-   * 
- * - * repeated string webhook_display_names = 26; - * - * @return The count of webhookDisplayNames. - */ - int getWebhookDisplayNamesCount(); - - /** - * - * - *
-   * The list of webhook display names in the order of call sequence.
-   * 
- * - * repeated string webhook_display_names = 26; - * - * @param index The index of the element to return. - * @return The webhookDisplayNames at the given index. - */ - java.lang.String getWebhookDisplayNames(int index); - - /** - * - * - *
-   * The list of webhook display names in the order of call sequence.
-   * 
- * - * repeated string webhook_display_names = 26; - * - * @param index The index of the value to return. - * @return The bytes of the webhookDisplayNames at the given index. - */ - com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index); - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - java.util.List getWebhookLatenciesList(); - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - com.google.protobuf.Duration getWebhookLatencies(int index); - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - int getWebhookLatenciesCount(); - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - java.util.List - getWebhookLatenciesOrBuilderList(); - - /** - * - * - *
-   * The list of webhook latencies in the order of call sequence.
-   * 
- * - * repeated .google.protobuf.Duration webhook_latencies = 27; - */ - com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index); - - /** - * - * - *
-   * The list of webhook tags in the order of call sequence.
-   * 
- * - * repeated string webhook_tags = 29; - * - * @return A list containing the webhookTags. - */ - java.util.List getWebhookTagsList(); - - /** - * - * - *
-   * The list of webhook tags in the order of call sequence.
-   * 
- * - * repeated string webhook_tags = 29; - * - * @return The count of webhookTags. - */ - int getWebhookTagsCount(); - - /** - * - * - *
-   * The list of webhook tags in the order of call sequence.
-   * 
- * - * repeated string webhook_tags = 29; - * - * @param index The index of the element to return. - * @return The webhookTags at the given index. - */ - java.lang.String getWebhookTags(int index); - - /** - * - * - *
-   * The list of webhook tags in the order of call sequence.
-   * 
- * - * repeated string webhook_tags = 29; - * - * @param index The index of the value to return. - * @return The bytes of the webhookTags at the given index. - */ - com.google.protobuf.ByteString getWebhookTagsBytes(int index); - /** * * @@ -863,7 +645,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=1049 + * google/cloud/dialogflow/cx/v3/session.proto;l=1080 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -884,7 +666,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=1049 + * google/cloud/dialogflow/cx/v3/session.proto;l=1080 * @return The intent. */ @java.lang.Deprecated @@ -925,7 +707,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1060 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=1091 * @return The intentDetectionConfidence. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java index 9eaf435e7e5a..387a52a4681e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java @@ -8831,6 +8831,7 @@ public enum MessageCase MIXED_AUDIO(13), TELEPHONY_TRANSFER_CALL(18), KNOWLEDGE_INFO_CARD(20), + TOOL_CALL(22), MESSAGE_NOT_SET(0); private final int value; @@ -8870,6 +8871,8 @@ public static MessageCase forNumber(int value) { return TELEPHONY_TRANSFER_CALL; case 20: return KNOWLEDGE_INFO_CARD; + case 22: + return TOOL_CALL; case 0: return MESSAGE_NOT_SET; default: @@ -9525,6 +9528,63 @@ public boolean hasKnowledgeInfoCard() { return com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.getDefaultInstance(); } + public static final int TOOL_CALL_FIELD_NUMBER = 22; + + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * + * @return Whether the toolCall field is set. + */ + @java.lang.Override + public boolean hasToolCall() { + return messageCase_ == 22; + } + + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * + * @return The toolCall. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCall getToolCall() { + if (messageCase_ == 22) { + return (com.google.cloud.dialogflow.cx.v3.ToolCall) message_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance(); + } + + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallOrBuilder getToolCallOrBuilder() { + if (messageCase_ == 22) { + return (com.google.cloud.dialogflow.cx.v3.ToolCall) message_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance(); + } + public static final int RESPONSE_TYPE_FIELD_NUMBER = 4; private int responseType_ = 0; @@ -9683,6 +9743,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 20, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_); } + if (messageCase_ == 22) { + output.writeMessage(22, (com.google.cloud.dialogflow.cx.v3.ToolCall) message_); + } getUnknownFields().writeTo(output); } @@ -9751,6 +9814,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 20, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard) message_); } + if (messageCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.cloud.dialogflow.cx.v3.ToolCall) message_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -9801,6 +9869,9 @@ public boolean equals(final java.lang.Object obj) { case 20: if (!getKnowledgeInfoCard().equals(other.getKnowledgeInfoCard())) return false; break; + case 22: + if (!getToolCall().equals(other.getToolCall())) return false; + break; case 0: default: } @@ -9860,6 +9931,10 @@ public int hashCode() { hash = (37 * hash) + KNOWLEDGE_INFO_CARD_FIELD_NUMBER; hash = (53 * hash) + getKnowledgeInfoCard().hashCode(); break; + case 22: + hash = (37 * hash) + TOOL_CALL_FIELD_NUMBER; + hash = (53 * hash) + getToolCall().hashCode(); + break; case 0: default: } @@ -10049,6 +10124,9 @@ public Builder clear() { if (knowledgeInfoCardBuilder_ != null) { knowledgeInfoCardBuilder_.clear(); } + if (toolCallBuilder_ != null) { + toolCallBuilder_.clear(); + } responseType_ = 0; channel_ = ""; messageCase_ = 0; @@ -10090,10 +10168,10 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage buildPartial() { private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ResponseMessage result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.responseType_ = responseType_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.channel_ = channel_; } } @@ -10131,6 +10209,9 @@ private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.ResponseMessag if (messageCase_ == 20 && knowledgeInfoCardBuilder_ != null) { result.message_ = knowledgeInfoCardBuilder_.build(); } + if (messageCase_ == 22 && toolCallBuilder_ != null) { + result.message_ = toolCallBuilder_.build(); + } } @java.lang.Override @@ -10184,7 +10265,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage other } if (!other.getChannel().isEmpty()) { channel_ = other.channel_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); } switch (other.getMessageCase()) { @@ -10238,6 +10319,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage other mergeKnowledgeInfoCard(other.getKnowledgeInfoCard()); break; } + case TOOL_CALL: + { + mergeToolCall(other.getToolCall()); + break; + } case MESSAGE_NOT_SET: { break; @@ -10284,7 +10370,7 @@ public Builder mergeFrom( case 32: { responseType_ = input.readEnum(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 32 case 66: @@ -10335,7 +10421,7 @@ public Builder mergeFrom( case 154: { channel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 154 case 162: @@ -10345,6 +10431,12 @@ public Builder mergeFrom( messageCase_ = 20; break; } // case 162 + case 178: + { + input.readMessage(getToolCallFieldBuilder().getBuilder(), extensionRegistry); + messageCase_ = 22; + break; + } // case 178 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -12904,6 +12996,232 @@ public Builder clearKnowledgeInfoCard() { return knowledgeInfoCardBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCall, + com.google.cloud.dialogflow.cx.v3.ToolCall.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallOrBuilder> + toolCallBuilder_; + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * + * @return Whether the toolCall field is set. + */ + @java.lang.Override + public boolean hasToolCall() { + return messageCase_ == 22; + } + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * + * @return The toolCall. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCall getToolCall() { + if (toolCallBuilder_ == null) { + if (messageCase_ == 22) { + return (com.google.cloud.dialogflow.cx.v3.ToolCall) message_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance(); + } else { + if (messageCase_ == 22) { + return toolCallBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + public Builder setToolCall(com.google.cloud.dialogflow.cx.v3.ToolCall value) { + if (toolCallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + toolCallBuilder_.setMessage(value); + } + messageCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + public Builder setToolCall(com.google.cloud.dialogflow.cx.v3.ToolCall.Builder builderForValue) { + if (toolCallBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + toolCallBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + public Builder mergeToolCall(com.google.cloud.dialogflow.cx.v3.ToolCall value) { + if (toolCallBuilder_ == null) { + if (messageCase_ == 22 + && message_ != com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance()) { + message_ = + com.google.cloud.dialogflow.cx.v3.ToolCall.newBuilder( + (com.google.cloud.dialogflow.cx.v3.ToolCall) message_) + .mergeFrom(value) + .buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 22) { + toolCallBuilder_.mergeFrom(value); + } else { + toolCallBuilder_.setMessage(value); + } + } + messageCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + public Builder clearToolCall() { + if (toolCallBuilder_ == null) { + if (messageCase_ == 22) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 22) { + messageCase_ = 0; + message_ = null; + } + toolCallBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + public com.google.cloud.dialogflow.cx.v3.ToolCall.Builder getToolCallBuilder() { + return getToolCallFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallOrBuilder getToolCallOrBuilder() { + if ((messageCase_ == 22) && (toolCallBuilder_ != null)) { + return toolCallBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 22) { + return (com.google.cloud.dialogflow.cx.v3.ToolCall) message_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCall, + com.google.cloud.dialogflow.cx.v3.ToolCall.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallOrBuilder> + getToolCallFieldBuilder() { + if (toolCallBuilder_ == null) { + if (!(messageCase_ == 22)) { + message_ = com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance(); + } + toolCallBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCall, + com.google.cloud.dialogflow.cx.v3.ToolCall.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.ToolCall) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 22; + onChanged(); + return toolCallBuilder_; + } + private int responseType_ = 0; /** @@ -12936,7 +13254,7 @@ public int getResponseTypeValue() { */ public Builder setResponseTypeValue(int value) { responseType_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -12978,7 +13296,7 @@ public Builder setResponseType( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; responseType_ = value.getNumber(); onChanged(); return this; @@ -12996,7 +13314,7 @@ public Builder setResponseType( * @return This builder for chaining. */ public Builder clearResponseType() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); responseType_ = 0; onChanged(); return this; @@ -13076,7 +13394,7 @@ public Builder setChannel(java.lang.String value) { throw new NullPointerException(); } channel_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -13097,7 +13415,7 @@ public Builder setChannel(java.lang.String value) { */ public Builder clearChannel() { channel_ = getDefaultInstance().getChannel(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -13123,7 +13441,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); channel_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java index ffde785ef0fe..2e765d31421c 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java @@ -485,6 +485,46 @@ public interface ResponseMessageOrBuilder com.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardOrBuilder getKnowledgeInfoCardOrBuilder(); + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * + * @return Whether the toolCall field is set. + */ + boolean hasToolCall(); + + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + * + * @return The toolCall. + */ + com.google.cloud.dialogflow.cx.v3.ToolCall getToolCall(); + + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCall tool_call = 22; + */ + com.google.cloud.dialogflow.cx.v3.ToolCallOrBuilder getToolCallOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java index 151634097807..1c3457b47a8b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageProto.java @@ -83,28 +83,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n" + "4google/cloud/dialogflow/cx/v3/response_message.proto\022\035google.cloud.dialogflow." - + "cx.v3\032\037google/api/field_behavior.proto\032\034google/protobuf/struct.proto\"\361\r\n" + + "cx.v3\032\037google/api/field_behavior.proto\032-" + + "google/cloud/dialogflow/cx/v3/tool_call.proto\032\034google/protobuf/struct.proto\"\257\016\n" + "\017ResponseMessage\022C\n" - + "\004text\030\001" - + " \001(\01323.google.cloud.dialogflow.cx.v3.ResponseMessage.TextH\000\022*\n" + + "\004text\030\001 \001(\01323.google.c" + + "loud.dialogflow.cx.v3.ResponseMessage.TextH\000\022*\n" + "\007payload\030\002 \001(\0132\027.google.protobuf.StructH\000\022b\n" - + "\024conversation_success\030\t \001(\0132B.google" - + ".cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccessH\000\022[\n" - + "\021output_audio_text\030\010" - + " \001(\0132>.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioTextH\000\022]\n" + + "\024conversation_success\030\t \001(\0132B" + + ".google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccessH\000\022[\n" + + "\021output_audio_text\030\010 \001(\0132>.google.cloud.dialogflo" + + "w.cx.v3.ResponseMessage.OutputAudioTextH\000\022]\n" + "\022live_agent_handoff\030\n" - + " \001(\0132?.google.cloud.di" - + "alogflow.cx.v3.ResponseMessage.LiveAgentHandoffH\000\022]\n" - + "\017end_interaction\030\013 \001(\0132=.goo" - + "gle.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionB\003\340A\003H\000\022N\n\n" + + " \001(\0132?.google.c" + + "loud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoffH\000\022]\n" + + "\017end_interaction\030\013 \001(" + + "\0132=.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionB\003\340A\003H\000\022N\n\n" + "play_audio\030\014" + " \001(\01328.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioH\000\022U\n" + "\013mixed_audio\030\r" - + " \001(\01329.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioB\003\340A\003H\000\022g\n" - + "\027telephony_transfer_call\030\022 \001(\0132D.google.cloud." - + "dialogflow.cx.v3.ResponseMessage.TelephonyTransferCallH\000\022_\n" - + "\023knowledge_info_card\030\024" - + " \001(\0132@.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCardH\000\022R\n\r" + + " \001(\01329.google.cloud.dialogflow.c" + + "x.v3.ResponseMessage.MixedAudioB\003\340A\003H\000\022g\n" + + "\027telephony_transfer_call\030\022 \001(\0132D.google" + + ".cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCallH\000\022_\n" + + "\023knowledge_info_card\030\024 \001(\0132@.google.cloud.dialogflow.c" + + "x.v3.ResponseMessage.KnowledgeInfoCardH\000\022<\n" + + "\ttool_call\030\026 \001(\0132\'.google.cloud.dialogflow.cx.v3.ToolCallH\000\022R\n\r" + "response_type\030\004" + " \001(\0162;.google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType\022\017\n" + "\007channel\030\023 \001(\t\032C\n" @@ -125,8 +128,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\taudio_uri\030\001 \001(\tB\003\340A\002\022(\n" + "\033allow_playback_interruption\030\002 \001(\010B\003\340A\003\032\301\001\n\n" + "MixedAudio\022S\n" - + "\010segments\030\001" - + " \003(\0132A.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment\032^\n" + + "\010segments\030\001 \003(\0132A.goo" + + "gle.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment\032^\n" + "\007Segment\022\017\n" + "\005audio\030\001 \001(\014H\000\022\r\n" + "\003uri\030\002 \001(\tH\000\022(\n" @@ -142,16 +145,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020PARAMETER_PROMPT\020\002\022\022\n" + "\016HANDLER_PROMPT\020\003B\t\n" + "\007messageB\267\001\n" - + "!com.google.cloud.dialogflow.cx.v3B\024ResponseMessageProtoP\001Z1cloud.go" - + "ogle.com/go/dialogflow/cx/apiv3/cxpb;cxp" - + "b\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002" - + "!Google::Cloud::Dialogflow::CX::V3b\006proto3" + + "!com.google.cloud.dialogflow.cx.v3B\024ResponseMessageProtoP\001Z1cloud.google.com/go" + + "/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Go" + + "ogle.Cloud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ToolCallProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor = @@ -170,6 +173,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MixedAudio", "TelephonyTransferCall", "KnowledgeInfoCard", + "ToolCall", "ResponseType", "Channel", "Message", @@ -276,6 +280,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ToolCallProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionRequest.java new file mode 100644 index 000000000000..a6eddbed37b0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.RestorePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest} + */ +public final class RestorePlaybookVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest) + RestorePlaybookVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use RestorePlaybookVersionRequest.newBuilder() to construct. + private RestorePlaybookVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestorePlaybookVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestorePlaybookVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.RestorePlaybookVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest other = + (com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest 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.v3.RestorePlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest 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.v3.RestorePlaybookVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest 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.v3.RestorePlaybookVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest 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.v3.RestorePlaybookVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest 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.v3.RestorePlaybookVersionRequest 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.v3.RestorePlaybookVersionRequest 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.v3.RestorePlaybookVersionRequest 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
+   * [Playbooks.RestorePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest) + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest build() { + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest result = + new com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.RestorePlaybookVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.RestorePlaybookVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestorePlaybookVersionRequest 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.v3.RestorePlaybookVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionRequestOrBuilder.java new file mode 100644 index 000000000000..cc4563d877a0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface RestorePlaybookVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionResponse.java new file mode 100644 index 000000000000..669b5cf212ae --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionResponse.java @@ -0,0 +1,746 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Playbooks.RestorePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse} + */ +public final class RestorePlaybookVersionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse) + RestorePlaybookVersionResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use RestorePlaybookVersionResponse.newBuilder() to construct. + private RestorePlaybookVersionResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestorePlaybookVersionResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestorePlaybookVersionResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.class, + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.Builder.class); + } + + private int bitField0_; + public static final int PLAYBOOK_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.Playbook playbook_; + + /** + * + * + *
+   * The updated playbook.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + * + * @return Whether the playbook field is set. + */ + @java.lang.Override + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The updated playbook.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + * + * @return The playbook. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + + /** + * + * + *
+   * The updated playbook.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlaybook()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaybook()); + } + 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.v3.RestorePlaybookVersionResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse other = + (com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse) obj; + + if (hasPlaybook() != other.hasPlaybook()) return false; + if (hasPlaybook()) { + if (!getPlaybook().equals(other.getPlaybook())) 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 (hasPlaybook()) { + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse 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.v3.RestorePlaybookVersionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse 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.v3.RestorePlaybookVersionResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse 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.v3.RestorePlaybookVersionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse 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.v3.RestorePlaybookVersionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse 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.v3.RestorePlaybookVersionResponse 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.v3.RestorePlaybookVersionResponse 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.v3.RestorePlaybookVersionResponse 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
+   * [Playbooks.RestorePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse) + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.class, + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_RestorePlaybookVersionResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse build() { + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse result = + new com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.playbook_ = playbookBuilder_ == null ? playbook_ : playbookBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.RestorePlaybookVersionResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.getDefaultInstance()) + return this; + if (other.hasPlaybook()) { + mergePlaybook(other.getPlaybook()); + } + 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 18: + { + input.readMessage(getPlaybookFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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.cloud.dialogflow.cx.v3.Playbook playbook_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + playbookBuilder_; + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + * + * @return Whether the playbook field is set. + */ + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + * + * @return The playbook. + */ + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook() { + if (playbookBuilder_ == null) { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } else { + return playbookBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + } else { + playbookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3.Playbook.Builder builderForValue) { + if (playbookBuilder_ == null) { + playbook_ = builderForValue.build(); + } else { + playbookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + public Builder mergePlaybook(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbookBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && playbook_ != null + && playbook_ != com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance()) { + getPlaybookBuilder().mergeFrom(value); + } else { + playbook_ = value; + } + } else { + playbookBuilder_.mergeFrom(value); + } + if (playbook_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + public Builder clearPlaybook() { + bitField0_ = (bitField0_ & ~0x00000001); + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Builder getPlaybookBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPlaybookFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder() { + if (playbookBuilder_ != null) { + return playbookBuilder_.getMessageOrBuilder(); + } else { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + } + + /** + * + * + *
+     * The updated playbook.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + getPlaybookFieldBuilder() { + if (playbookBuilder_ == null) { + playbookBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder>( + getPlaybook(), getParentForChildren(), isClean()); + playbook_ = null; + } + return playbookBuilder_; + } + + @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.v3.RestorePlaybookVersionResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse) + private static final com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestorePlaybookVersionResponse 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.v3.RestorePlaybookVersionResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionResponseOrBuilder.java new file mode 100644 index 000000000000..c6b4debab94d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestorePlaybookVersionResponseOrBuilder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface RestorePlaybookVersionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The updated playbook.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + * + * @return Whether the playbook field is set. + */ + boolean hasPlaybook(); + + /** + * + * + *
+   * The updated playbook.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + * + * @return The playbook. + */ + com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook(); + + /** + * + * + *
+   * The updated playbook.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 2; + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionRequest.java new file mode 100644 index 000000000000..42b3a821f2b7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.RestoreToolVersion][google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest} + */ +public final class RestoreToolVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest) + RestoreToolVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use RestoreToolVersionRequest.newBuilder() to construct. + private RestoreToolVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestoreToolVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestoreToolVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the tool version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the tool version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v3.RestoreToolVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest other = + (com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest 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.v3.RestoreToolVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest 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.v3.RestoreToolVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest 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.v3.RestoreToolVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest 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.v3.RestoreToolVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest 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.v3.RestoreToolVersionRequest 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.v3.RestoreToolVersionRequest 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.v3.RestoreToolVersionRequest 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
+   * [Tools.RestoreToolVersion][google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest) + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.class, + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest build() { + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest result = + new com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3.RestoreToolVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool version.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3.RestoreToolVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreToolVersionRequest 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.v3.RestoreToolVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionRequestOrBuilder.java new file mode 100644 index 000000000000..1ee58c14caff --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface RestoreToolVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tool version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the tool version.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionResponse.java new file mode 100644 index 000000000000..b77eebc737db --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionResponse.java @@ -0,0 +1,734 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [Tools.RestoreToolVersion][google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse} + */ +public final class RestoreToolVersionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse) + RestoreToolVersionResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use RestoreToolVersionResponse.newBuilder() to construct. + private RestoreToolVersionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestoreToolVersionResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestoreToolVersionResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.class, + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.Builder.class); + } + + private int bitField0_; + public static final int TOOL_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.Tool tool_; + + /** + * + * + *
+   * The updated tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + * + * @return Whether the tool field is set. + */ + @java.lang.Override + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The updated tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + * + * @return The tool. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool getTool() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + + /** + * + * + *
+   * The updated tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTool()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTool()); + } + 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.v3.RestoreToolVersionResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse other = + (com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse) obj; + + if (hasTool() != other.hasTool()) return false; + if (hasTool()) { + if (!getTool().equals(other.getTool())) 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 (hasTool()) { + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse 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.v3.RestoreToolVersionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse 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.v3.RestoreToolVersionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse 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.v3.RestoreToolVersionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse 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.v3.RestoreToolVersionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse 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.v3.RestoreToolVersionResponse 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.v3.RestoreToolVersionResponse 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.v3.RestoreToolVersionResponse 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
+   * [Tools.RestoreToolVersion][google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse) + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.class, + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getToolFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse build() { + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse result = + new com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = toolBuilder_ == null ? tool_ : toolBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.RestoreToolVersionResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.getDefaultInstance()) + return this; + if (other.hasTool()) { + mergeTool(other.getTool()); + } + 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 18: + { + input.readMessage(getToolFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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.cloud.dialogflow.cx.v3.Tool tool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + toolBuilder_; + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + * + * @return Whether the tool field is set. + */ + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + * + * @return The tool. + */ + public com.google.cloud.dialogflow.cx.v3.Tool getTool() { + if (toolBuilder_ == null) { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } else { + return toolBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + } else { + toolBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3.Tool.Builder builderForValue) { + if (toolBuilder_ == null) { + tool_ = builderForValue.build(); + } else { + toolBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + public Builder mergeTool(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && tool_ != null + && tool_ != com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance()) { + getToolBuilder().mergeFrom(value); + } else { + tool_ = value; + } + } else { + toolBuilder_.mergeFrom(value); + } + if (tool_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + public Builder clearTool() { + bitField0_ = (bitField0_ & ~0x00000001); + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Builder getToolBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getToolFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder() { + if (toolBuilder_ != null) { + return toolBuilder_.getMessageOrBuilder(); + } else { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + } + + /** + * + * + *
+     * The updated tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + getToolFieldBuilder() { + if (toolBuilder_ == null) { + toolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder>( + getTool(), getParentForChildren(), isClean()); + tool_ = null; + } + return toolBuilder_; + } + + @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.v3.RestoreToolVersionResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse) + private static final com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreToolVersionResponse 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.v3.RestoreToolVersionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionResponseOrBuilder.java new file mode 100644 index 000000000000..ed2edec8c3af --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RestoreToolVersionResponseOrBuilder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface RestoreToolVersionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The updated tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + * + * @return Whether the tool field is set. + */ + boolean hasTool(); + + /** + * + * + *
+   * The updated tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + * + * @return The tool. + */ + com.google.cloud.dialogflow.cx.v3.Tool getTool(); + + /** + * + * + *
+   * The updated tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 2; + */ + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettings.java index 6d06895536d7..3163b670d36d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettings.java @@ -40,6 +40,7 @@ private SafetySettings(com.google.protobuf.GeneratedMessageV3.Builder builder } private SafetySettings() { + defaultBannedPhraseMatchStrategy_ = 0; bannedPhrases_ = java.util.Collections.emptyList(); } @@ -64,6 +65,172 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder.class); } + /** + * + * + *
+   * Strategy for matching phrases.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy} + */ + public enum PhraseMatchStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified, defaults to PARTIAL_MATCH.
+     * 
+ * + * PHRASE_MATCH_STRATEGY_UNSPECIFIED = 0; + */ + PHRASE_MATCH_STRATEGY_UNSPECIFIED(0), + /** + * + * + *
+     * Text that contains the phrase as a substring will be matched, e.g. "foo"
+     * will match "afoobar".
+     * 
+ * + * PARTIAL_MATCH = 1; + */ + PARTIAL_MATCH(1), + /** + * + * + *
+     * Text that contains the tokenized words of the phrase will be matched,
+     * e.g. "foo" will match "a foo bar" and "foo bar", but not "foobar".
+     * 
+ * + * WORD_MATCH = 2; + */ + WORD_MATCH(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified, defaults to PARTIAL_MATCH.
+     * 
+ * + * PHRASE_MATCH_STRATEGY_UNSPECIFIED = 0; + */ + public static final int PHRASE_MATCH_STRATEGY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Text that contains the phrase as a substring will be matched, e.g. "foo"
+     * will match "afoobar".
+     * 
+ * + * PARTIAL_MATCH = 1; + */ + public static final int PARTIAL_MATCH_VALUE = 1; + + /** + * + * + *
+     * Text that contains the tokenized words of the phrase will be matched,
+     * e.g. "foo" will match "a foo bar" and "foo bar", but not "foobar".
+     * 
+ * + * WORD_MATCH = 2; + */ + public static final int WORD_MATCH_VALUE = 2; + + 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 PhraseMatchStrategy 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 PhraseMatchStrategy forNumber(int value) { + switch (value) { + case 0: + return PHRASE_MATCH_STRATEGY_UNSPECIFIED; + case 1: + return PARTIAL_MATCH; + case 2: + return WORD_MATCH; + 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 PhraseMatchStrategy findValueByNumber(int number) { + return PhraseMatchStrategy.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.v3.SafetySettings.getDescriptor().getEnumTypes().get(0); + } + + private static final PhraseMatchStrategy[] VALUES = values(); + + public static PhraseMatchStrategy 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 PhraseMatchStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy) + } + public interface PhraseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) @@ -932,510 +1099,4576 @@ public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getDefaultInstanc } } - public static final int BANNED_PHRASES_FIELD_NUMBER = 1; + public interface RaiSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private java.util.List bannedPhrases_; + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getCategoryFiltersList(); - /** - * - * - *
-   * Banned phrases for generated text.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; - */ - @java.lang.Override - public java.util.List - getBannedPhrasesList() { - return bannedPhrases_; - } + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter getCategoryFilters( + int index); - /** - * - * - *
-   * Banned phrases for generated text.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; - */ - @java.lang.Override - public java.util.List - getBannedPhrasesOrBuilderList() { - return bannedPhrases_; - } + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getCategoryFiltersCount(); - /** - * - * - *
-   * Banned phrases for generated text.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; - */ - @java.lang.Override - public int getBannedPhrasesCount() { - return bannedPhrases_.size(); - } + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + .CategoryFilterOrBuilder> + getCategoryFiltersOrBuilderList(); - /** - * - * - *
-   * Banned phrases for generated text.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; - */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getBannedPhrases(int index) { - return bannedPhrases_.get(index); + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilterOrBuilder + getCategoryFiltersOrBuilder(int index); } /** * * *
-   * Banned phrases for generated text.
+   * Settings for Responsible AI.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings} */ - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder getBannedPhrasesOrBuilder( - int index) { - return bannedPhrases_.get(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; - } + public static final class RaiSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings) + RaiSettingsOrBuilder { + private static final long serialVersionUID = 0L; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < bannedPhrases_.size(); i++) { - output.writeMessage(1, bannedPhrases_.get(i)); + // Use RaiSettings.newBuilder() to construct. + private RaiSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - size = 0; - for (int i = 0; i < bannedPhrases_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bannedPhrases_.get(i)); + private RaiSettings() { + categoryFilters_ = java.util.Collections.emptyList(); } - 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.v3.SafetySettings)) { - return super.equals(obj); + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RaiSettings(); } - com.google.cloud.dialogflow.cx.v3.SafetySettings other = - (com.google.cloud.dialogflow.cx.v3.SafetySettings) obj; - - if (!getBannedPhrasesList().equals(other.getBannedPhrasesList())) 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 (getBannedPhrasesCount() > 0) { - hash = (37 * hash) + BANNED_PHRASES_FIELD_NUMBER; - hash = (53 * hash) + getBannedPhrasesList().hashCode(); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_descriptor; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder.class); + } - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+     * Sensitivity level for RAI categories.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel} + */ + public enum SafetyFilterLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified -- uses default sensitivity levels.
+       * 
+ * + * SAFETY_FILTER_LEVEL_UNSPECIFIED = 0; + */ + SAFETY_FILTER_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+       * Block no text -- effectively disables the category.
+       * 
+ * + * BLOCK_NONE = 1; + */ + BLOCK_NONE(1), + /** + * + * + *
+       * Block a few suspicious texts.
+       * 
+ * + * BLOCK_FEW = 2; + */ + BLOCK_FEW(2), + /** + * + * + *
+       * Block some suspicious texts.
+       * 
+ * + * BLOCK_SOME = 3; + */ + BLOCK_SOME(3), + /** + * + * + *
+       * Block most suspicious texts.
+       * 
+ * + * BLOCK_MOST = 4; + */ + BLOCK_MOST(4), + UNRECOGNIZED(-1), + ; - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
+       * Unspecified -- uses default sensitivity levels.
+       * 
+ * + * SAFETY_FILTER_LEVEL_UNSPECIFIED = 0; + */ + public static final int SAFETY_FILTER_LEVEL_UNSPECIFIED_VALUE = 0; - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+       * Block no text -- effectively disables the category.
+       * 
+ * + * BLOCK_NONE = 1; + */ + public static final int BLOCK_NONE_VALUE = 1; - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
+       * Block a few suspicious texts.
+       * 
+ * + * BLOCK_FEW = 2; + */ + public static final int BLOCK_FEW_VALUE = 2; - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+       * Block some suspicious texts.
+       * 
+ * + * BLOCK_SOME = 3; + */ + public static final int BLOCK_SOME_VALUE = 3; - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + /** + * + * + *
+       * Block most suspicious texts.
+       * 
+ * + * BLOCK_MOST = 4; + */ + public static final int BLOCK_MOST_VALUE = 4; - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + /** + * @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 SafetyFilterLevel valueOf(int value) { + return forNumber(value); + } - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SafetyFilterLevel forNumber(int value) { + switch (value) { + case 0: + return SAFETY_FILTER_LEVEL_UNSPECIFIED; + case 1: + return BLOCK_NONE; + case 2: + return BLOCK_FEW; + case 3: + return BLOCK_SOME; + case 4: + return BLOCK_MOST; + default: + return null; + } + } - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } - public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SafetyFilterLevel findValueByNumber(int number) { + return SafetyFilterLevel.forNumber(number); + } + }; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + 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 static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.SafetySettings prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDescriptor() + .getEnumTypes() + .get(0); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + private static final SafetyFilterLevel[] VALUES = values(); - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + public static SafetyFilterLevel 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()]; + } - /** - * - * - *
-   * Settings for Generative Safety.
-   * 
- * - * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SafetySettings) - com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto - .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor; + private final int value; + + private SafetyFilterLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel) + } + + /** + * + * + *
+     * RAI categories to configure.
+     * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory} + */ + public enum SafetyCategory implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * SAFETY_CATEGORY_UNSPECIFIED = 0; + */ + SAFETY_CATEGORY_UNSPECIFIED(0), + /** + * + * + *
+       * Dangerous content.
+       * 
+ * + * DANGEROUS_CONTENT = 1; + */ + DANGEROUS_CONTENT(1), + /** + * + * + *
+       * Hate speech.
+       * 
+ * + * HATE_SPEECH = 2; + */ + HATE_SPEECH(2), + /** + * + * + *
+       * Harassment.
+       * 
+ * + * HARASSMENT = 3; + */ + HARASSMENT(3), + /** + * + * + *
+       * Sexually explicit content.
+       * 
+ * + * SEXUALLY_EXPLICIT_CONTENT = 4; + */ + SEXUALLY_EXPLICIT_CONTENT(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * SAFETY_CATEGORY_UNSPECIFIED = 0; + */ + public static final int SAFETY_CATEGORY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Dangerous content.
+       * 
+ * + * DANGEROUS_CONTENT = 1; + */ + public static final int DANGEROUS_CONTENT_VALUE = 1; + + /** + * + * + *
+       * Hate speech.
+       * 
+ * + * HATE_SPEECH = 2; + */ + public static final int HATE_SPEECH_VALUE = 2; + + /** + * + * + *
+       * Harassment.
+       * 
+ * + * HARASSMENT = 3; + */ + public static final int HARASSMENT_VALUE = 3; + + /** + * + * + *
+       * Sexually explicit content.
+       * 
+ * + * SEXUALLY_EXPLICIT_CONTENT = 4; + */ + public static final int SEXUALLY_EXPLICIT_CONTENT_VALUE = 4; + + 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 SafetyCategory 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 SafetyCategory forNumber(int value) { + switch (value) { + case 0: + return SAFETY_CATEGORY_UNSPECIFIED; + case 1: + return DANGEROUS_CONTENT; + case 2: + return HATE_SPEECH; + case 3: + return HARASSMENT; + case 4: + return SEXUALLY_EXPLICIT_CONTENT; + 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 SafetyCategory findValueByNumber(int number) { + return SafetyCategory.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.v3.SafetySettings.RaiSettings.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final SafetyCategory[] VALUES = values(); + + public static SafetyCategory 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 SafetyCategory(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory) + } + + public interface CategoryFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * RAI category to configure.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @return The enum numeric value on the wire for category. + */ + int getCategoryValue(); + + /** + * + * + *
+       * RAI category to configure.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @return The category. + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory getCategory(); + + /** + * + * + *
+       * Blocking sensitivity level to configure for the RAI category.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @return The enum numeric value on the wire for filterLevel. + */ + int getFilterLevelValue(); + + /** + * + * + *
+       * Blocking sensitivity level to configure for the RAI category.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @return The filterLevel. + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + getFilterLevel(); + } + + /** + * + * + *
+     * Configuration of the sensitivity level for blocking an RAI category.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter} + */ + public static final class CategoryFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter) + CategoryFilterOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CategoryFilter.newBuilder() to construct. + private CategoryFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CategoryFilter() { + category_ = 0; + filterLevel_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CategoryFilter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder + .class); + } + + public static final int CATEGORY_FIELD_NUMBER = 1; + private int category_ = 0; + + /** + * + * + *
+       * RAI category to configure.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + + /** + * + * + *
+       * RAI category to configure.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory + getCategory() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory result = + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory.forNumber( + category_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory + .UNRECOGNIZED + : result; + } + + public static final int FILTER_LEVEL_FIELD_NUMBER = 2; + private int filterLevel_ = 0; + + /** + * + * + *
+       * Blocking sensitivity level to configure for the RAI category.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @return The enum numeric value on the wire for filterLevel. + */ + @java.lang.Override + public int getFilterLevelValue() { + return filterLevel_; + } + + /** + * + * + *
+       * Blocking sensitivity level to configure for the RAI category.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @return The filterLevel. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + getFilterLevel() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel result = + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + .forNumber(filterLevel_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + .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 (category_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory + .SAFETY_CATEGORY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, category_); + } + if (filterLevel_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + .SAFETY_FILTER_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, filterLevel_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (category_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory + .SAFETY_CATEGORY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, category_); + } + if (filterLevel_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + .SAFETY_FILTER_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, filterLevel_); + } + 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.v3.SafetySettings.RaiSettings.CategoryFilter)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter other = + (com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter) obj; + + if (category_ != other.category_) return false; + if (filterLevel_ != other.filterLevel_) 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) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + category_; + hash = (37 * hash) + FILTER_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + filterLevel_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + 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.v3.SafetySettings.RaiSettings.CategoryFilter + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + 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.v3.SafetySettings.RaiSettings.CategoryFilter + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + 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.v3.SafetySettings.RaiSettings.CategoryFilter + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + 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.v3.SafetySettings.RaiSettings.CategoryFilter + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + 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.v3.SafetySettings.RaiSettings.CategoryFilter + 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.v3.SafetySettings.RaiSettings.CategoryFilter + 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.v3.SafetySettings.RaiSettings.CategoryFilter 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; + } + + /** + * + * + *
+       * Configuration of the sensitivity level for blocking an RAI category.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter) + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + category_ = 0; + filterLevel_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter build() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + buildPartial() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter result = + new com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.category_ = category_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filterLevel_ = filterLevel_; + } + } + + @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.v3.SafetySettings.RaiSettings.CategoryFilter) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter other) { + if (other + == com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + .getDefaultInstance()) return this; + if (other.category_ != 0) { + setCategoryValue(other.getCategoryValue()); + } + if (other.filterLevel_ != 0) { + setFilterLevelValue(other.getFilterLevelValue()); + } + 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: + { + category_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + filterLevel_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 int category_ = 0; + + /** + * + * + *
+         * RAI category to configure.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + + /** + * + * + *
+         * RAI category to configure.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @param value The enum numeric value on the wire for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryValue(int value) { + category_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * RAI category to configure.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory + getCategory() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory result = + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory.forNumber( + category_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+         * RAI category to configure.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + category_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+         * RAI category to configure.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory category = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + bitField0_ = (bitField0_ & ~0x00000001); + category_ = 0; + onChanged(); + return this; + } + + private int filterLevel_ = 0; + + /** + * + * + *
+         * Blocking sensitivity level to configure for the RAI category.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @return The enum numeric value on the wire for filterLevel. + */ + @java.lang.Override + public int getFilterLevelValue() { + return filterLevel_; + } + + /** + * + * + *
+         * Blocking sensitivity level to configure for the RAI category.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @param value The enum numeric value on the wire for filterLevel to set. + * @return This builder for chaining. + */ + public Builder setFilterLevelValue(int value) { + filterLevel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Blocking sensitivity level to configure for the RAI category.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @return The filterLevel. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + getFilterLevel() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel result = + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + .forNumber(filterLevel_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+         * Blocking sensitivity level to configure for the RAI category.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @param value The filterLevel to set. + * @return This builder for chaining. + */ + public Builder setFilterLevel( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + filterLevel_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+         * Blocking sensitivity level to configure for the RAI category.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel filter_level = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearFilterLevel() { + bitField0_ = (bitField0_ & ~0x00000002); + filterLevel_ = 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.v3.SafetySettings.RaiSettings.CategoryFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter) + private static final com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + .CategoryFilter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter(); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoryFilter 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.v3.SafetySettings.RaiSettings.CategoryFilter + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CATEGORY_FILTERS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter> + categoryFilters_; + + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter> + getCategoryFiltersList() { + return categoryFilters_; + } + + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + .CategoryFilterOrBuilder> + getCategoryFiltersOrBuilderList() { + return categoryFilters_; + } + + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getCategoryFiltersCount() { + return categoryFilters_.size(); + } + + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + getCategoryFilters(int index) { + return categoryFilters_.get(index); + } + + /** + * + * + *
+     * Optional. RAI blocking configurations.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilterOrBuilder + getCategoryFiltersOrBuilder(int index) { + return categoryFilters_.get(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 < categoryFilters_.size(); i++) { + output.writeMessage(3, categoryFilters_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < categoryFilters_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, categoryFilters_.get(i)); + } + 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.v3.SafetySettings.RaiSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings other = + (com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings) obj; + + if (!getCategoryFiltersList().equals(other.getCategoryFiltersList())) 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 (getCategoryFiltersCount() > 0) { + hash = (37 * hash) + CATEGORY_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getCategoryFiltersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings 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.v3.SafetySettings.RaiSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings 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.v3.SafetySettings.RaiSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings 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.v3.SafetySettings.RaiSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings 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.v3.SafetySettings.RaiSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings 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.v3.SafetySettings.RaiSettings 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.v3.SafetySettings.RaiSettings 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.v3.SafetySettings.RaiSettings 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; + } + + /** + * + * + *
+     * Settings for Responsible AI.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings) + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (categoryFiltersBuilder_ == null) { + categoryFilters_ = java.util.Collections.emptyList(); + } else { + categoryFilters_ = null; + categoryFiltersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings build() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings result = + new com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings result) { + if (categoryFiltersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + categoryFilters_ = java.util.Collections.unmodifiableList(categoryFilters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.categoryFilters_ = categoryFilters_; + } else { + result.categoryFilters_ = categoryFiltersBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings result) { + int from_bitField0_ = bitField0_; + } + + @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.v3.SafetySettings.RaiSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance()) + return this; + if (categoryFiltersBuilder_ == null) { + if (!other.categoryFilters_.isEmpty()) { + if (categoryFilters_.isEmpty()) { + categoryFilters_ = other.categoryFilters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCategoryFiltersIsMutable(); + categoryFilters_.addAll(other.categoryFilters_); + } + onChanged(); + } + } else { + if (!other.categoryFilters_.isEmpty()) { + if (categoryFiltersBuilder_.isEmpty()) { + categoryFiltersBuilder_.dispose(); + categoryFiltersBuilder_ = null; + categoryFilters_ = other.categoryFilters_; + bitField0_ = (bitField0_ & ~0x00000001); + categoryFiltersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCategoryFiltersFieldBuilder() + : null; + } else { + categoryFiltersBuilder_.addAllMessages(other.categoryFilters_); + } + } + } + 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 26: + { + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + .CategoryFilter.parser(), + extensionRegistry); + if (categoryFiltersBuilder_ == null) { + ensureCategoryFiltersIsMutable(); + categoryFilters_.add(m); + } else { + categoryFiltersBuilder_.addMessage(m); + } + 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 java.util.List< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter> + categoryFilters_ = java.util.Collections.emptyList(); + + private void ensureCategoryFiltersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + categoryFilters_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter>( + categoryFilters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilterOrBuilder> + categoryFiltersBuilder_; + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter> + getCategoryFiltersList() { + if (categoryFiltersBuilder_ == null) { + return java.util.Collections.unmodifiableList(categoryFilters_); + } else { + return categoryFiltersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getCategoryFiltersCount() { + if (categoryFiltersBuilder_ == null) { + return categoryFilters_.size(); + } else { + return categoryFiltersBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + getCategoryFilters(int index) { + if (categoryFiltersBuilder_ == null) { + return categoryFilters_.get(index); + } else { + return categoryFiltersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCategoryFilters( + int index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter value) { + if (categoryFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoryFiltersIsMutable(); + categoryFilters_.set(index, value); + onChanged(); + } else { + categoryFiltersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCategoryFilters( + int index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder + builderForValue) { + if (categoryFiltersBuilder_ == null) { + ensureCategoryFiltersIsMutable(); + categoryFilters_.set(index, builderForValue.build()); + onChanged(); + } else { + categoryFiltersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCategoryFilters( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter value) { + if (categoryFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoryFiltersIsMutable(); + categoryFilters_.add(value); + onChanged(); + } else { + categoryFiltersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCategoryFilters( + int index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter value) { + if (categoryFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoryFiltersIsMutable(); + categoryFilters_.add(index, value); + onChanged(); + } else { + categoryFiltersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCategoryFilters( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder + builderForValue) { + if (categoryFiltersBuilder_ == null) { + ensureCategoryFiltersIsMutable(); + categoryFilters_.add(builderForValue.build()); + onChanged(); + } else { + categoryFiltersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCategoryFilters( + int index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder + builderForValue) { + if (categoryFiltersBuilder_ == null) { + ensureCategoryFiltersIsMutable(); + categoryFilters_.add(index, builderForValue.build()); + onChanged(); + } else { + categoryFiltersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllCategoryFilters( + java.lang.Iterable< + ? extends + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter> + values) { + if (categoryFiltersBuilder_ == null) { + ensureCategoryFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, categoryFilters_); + onChanged(); + } else { + categoryFiltersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCategoryFilters() { + if (categoryFiltersBuilder_ == null) { + categoryFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + categoryFiltersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeCategoryFilters(int index) { + if (categoryFiltersBuilder_ == null) { + ensureCategoryFiltersIsMutable(); + categoryFilters_.remove(index); + onChanged(); + } else { + categoryFiltersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder + getCategoryFiltersBuilder(int index) { + return getCategoryFiltersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilterOrBuilder + getCategoryFiltersOrBuilder(int index) { + if (categoryFiltersBuilder_ == null) { + return categoryFilters_.get(index); + } else { + return categoryFiltersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + .CategoryFilterOrBuilder> + getCategoryFiltersOrBuilderList() { + if (categoryFiltersBuilder_ != null) { + return categoryFiltersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(categoryFilters_); + } + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder + addCategoryFiltersBuilder() { + return getCategoryFiltersFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + .getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder + addCategoryFiltersBuilder(int index) { + return getCategoryFiltersFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + .getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. RAI blocking configurations.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter category_filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder> + getCategoryFiltersBuilderList() { + return getCategoryFiltersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilterOrBuilder> + getCategoryFiltersFieldBuilder() { + if (categoryFiltersBuilder_ == null) { + categoryFiltersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + .Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + .CategoryFilterOrBuilder>( + categoryFilters_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + categoryFilters_ = null; + } + return categoryFiltersBuilder_; + } + + @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.v3.SafetySettings.RaiSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings) + private static final com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RaiSettings 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.v3.SafetySettings.RaiSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PromptSecuritySettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Enable prompt security checks.
+     * 
+ * + * bool enable_prompt_security = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePromptSecurity. + */ + boolean getEnablePromptSecurity(); + } + + /** + * + * + *
+   * Settings for prompt security checks.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings} + */ + public static final class PromptSecuritySettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings) + PromptSecuritySettingsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PromptSecuritySettings.newBuilder() to construct. + private PromptSecuritySettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PromptSecuritySettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PromptSecuritySettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.Builder + .class); + } + + public static final int ENABLE_PROMPT_SECURITY_FIELD_NUMBER = 1; + private boolean enablePromptSecurity_ = false; + + /** + * + * + *
+     * Optional. Enable prompt security checks.
+     * 
+ * + * bool enable_prompt_security = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePromptSecurity. + */ + @java.lang.Override + public boolean getEnablePromptSecurity() { + return enablePromptSecurity_; + } + + 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 (enablePromptSecurity_ != false) { + output.writeBool(1, enablePromptSecurity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePromptSecurity_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePromptSecurity_); + } + 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.v3.SafetySettings.PromptSecuritySettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings other = + (com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings) obj; + + if (getEnablePromptSecurity() != other.getEnablePromptSecurity()) 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) + ENABLE_PROMPT_SECURITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePromptSecurity()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings 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.v3.SafetySettings.PromptSecuritySettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings 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.v3.SafetySettings.PromptSecuritySettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings 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.v3.SafetySettings.PromptSecuritySettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings 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.v3.SafetySettings.PromptSecuritySettings + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + 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.v3.SafetySettings.PromptSecuritySettings 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.v3.SafetySettings.PromptSecuritySettings 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.v3.SafetySettings.PromptSecuritySettings 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; + } + + /** + * + * + *
+     * Settings for prompt security checks.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings) + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enablePromptSecurity_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings build() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + buildPartial() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings result = + new com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enablePromptSecurity_ = enablePromptSecurity_; + } + } + + @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.v3.SafetySettings.PromptSecuritySettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + .getDefaultInstance()) return this; + if (other.getEnablePromptSecurity() != false) { + setEnablePromptSecurity(other.getEnablePromptSecurity()); + } + 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: + { + enablePromptSecurity_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 enablePromptSecurity_; + + /** + * + * + *
+       * Optional. Enable prompt security checks.
+       * 
+ * + * bool enable_prompt_security = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePromptSecurity. + */ + @java.lang.Override + public boolean getEnablePromptSecurity() { + return enablePromptSecurity_; + } + + /** + * + * + *
+       * Optional. Enable prompt security checks.
+       * 
+ * + * bool enable_prompt_security = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enablePromptSecurity to set. + * @return This builder for chaining. + */ + public Builder setEnablePromptSecurity(boolean value) { + + enablePromptSecurity_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Enable prompt security checks.
+       * 
+ * + * bool enable_prompt_security = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnablePromptSecurity() { + bitField0_ = (bitField0_ & ~0x00000001); + enablePromptSecurity_ = false; + 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.v3.SafetySettings.PromptSecuritySettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings) + private static final com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PromptSecuritySettings 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.v3.SafetySettings.PromptSecuritySettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DEFAULT_BANNED_PHRASE_MATCH_STRATEGY_FIELD_NUMBER = 4; + private int defaultBannedPhraseMatchStrategy_ = 0; + + /** + * + * + *
+   * Optional. Default phrase match strategy for banned phrases.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for defaultBannedPhraseMatchStrategy. + */ + @java.lang.Override + public int getDefaultBannedPhraseMatchStrategyValue() { + return defaultBannedPhraseMatchStrategy_; + } + + /** + * + * + *
+   * Optional. Default phrase match strategy for banned phrases.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultBannedPhraseMatchStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy + getDefaultBannedPhraseMatchStrategy() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy result = + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy.forNumber( + defaultBannedPhraseMatchStrategy_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy.UNRECOGNIZED + : result; + } + + public static final int BANNED_PHRASES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List bannedPhrases_; + + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public java.util.List + getBannedPhrasesList() { + return bannedPhrases_; + } + + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public java.util.List + getBannedPhrasesOrBuilderList() { + return bannedPhrases_; + } + + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public int getBannedPhrasesCount() { + return bannedPhrases_.size(); + } + + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getBannedPhrases(int index) { + return bannedPhrases_.get(index); + } + + /** + * + * + *
+   * Banned phrases for generated text.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder getBannedPhrasesOrBuilder( + int index) { + return bannedPhrases_.get(index); + } + + public static final int RAI_SETTINGS_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings raiSettings_; + + /** + * + * + *
+   * Optional. Settings for Responsible AI checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the raiSettings field is set. + */ + @java.lang.Override + public boolean hasRaiSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Settings for Responsible AI checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The raiSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings getRaiSettings() { + return raiSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance() + : raiSettings_; + } + + /** + * + * + *
+   * Optional. Settings for Responsible AI checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder + getRaiSettingsOrBuilder() { + return raiSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance() + : raiSettings_; + } + + public static final int DEFAULT_RAI_SETTINGS_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings defaultRaiSettings_; + + /** + * + * + *
+   * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+   * that users will be able to restore their RAI configurations to the default
+   * settings. Read-only field for the API proto only.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the defaultRaiSettings field is set. + */ + @java.lang.Override + public boolean hasDefaultRaiSettings() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+   * that users will be able to restore their RAI configurations to the default
+   * settings. Read-only field for the API proto only.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The defaultRaiSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings getDefaultRaiSettings() { + return defaultRaiSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance() + : defaultRaiSettings_; + } + + /** + * + * + *
+   * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+   * that users will be able to restore their RAI configurations to the default
+   * settings. Read-only field for the API proto only.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder + getDefaultRaiSettingsOrBuilder() { + return defaultRaiSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance() + : defaultRaiSettings_; + } + + public static final int PROMPT_SECURITY_SETTINGS_FIELD_NUMBER = 8; + private com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + promptSecuritySettings_; + + /** + * + * + *
+   * Optional. Settings for prompt security checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the promptSecuritySettings field is set. + */ + @java.lang.Override + public boolean hasPromptSecuritySettings() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Settings for prompt security checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The promptSecuritySettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + getPromptSecuritySettings() { + return promptSecuritySettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + .getDefaultInstance() + : promptSecuritySettings_; + } + + /** + * + * + *
+   * Optional. Settings for prompt security checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettingsOrBuilder + getPromptSecuritySettingsOrBuilder() { + return promptSecuritySettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + .getDefaultInstance() + : promptSecuritySettings_; + } + + 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 < bannedPhrases_.size(); i++) { + output.writeMessage(1, bannedPhrases_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRaiSettings()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getDefaultRaiSettings()); + } + if (defaultBannedPhraseMatchStrategy_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy + .PHRASE_MATCH_STRATEGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, defaultBannedPhraseMatchStrategy_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getPromptSecuritySettings()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < bannedPhrases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bannedPhrases_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRaiSettings()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDefaultRaiSettings()); + } + if (defaultBannedPhraseMatchStrategy_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy + .PHRASE_MATCH_STRATEGY_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 4, defaultBannedPhraseMatchStrategy_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPromptSecuritySettings()); + } + 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.v3.SafetySettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SafetySettings other = + (com.google.cloud.dialogflow.cx.v3.SafetySettings) obj; + + if (defaultBannedPhraseMatchStrategy_ != other.defaultBannedPhraseMatchStrategy_) return false; + if (!getBannedPhrasesList().equals(other.getBannedPhrasesList())) return false; + if (hasRaiSettings() != other.hasRaiSettings()) return false; + if (hasRaiSettings()) { + if (!getRaiSettings().equals(other.getRaiSettings())) return false; + } + if (hasDefaultRaiSettings() != other.hasDefaultRaiSettings()) return false; + if (hasDefaultRaiSettings()) { + if (!getDefaultRaiSettings().equals(other.getDefaultRaiSettings())) return false; + } + if (hasPromptSecuritySettings() != other.hasPromptSecuritySettings()) return false; + if (hasPromptSecuritySettings()) { + if (!getPromptSecuritySettings().equals(other.getPromptSecuritySettings())) 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) + DEFAULT_BANNED_PHRASE_MATCH_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + defaultBannedPhraseMatchStrategy_; + if (getBannedPhrasesCount() > 0) { + hash = (37 * hash) + BANNED_PHRASES_FIELD_NUMBER; + hash = (53 * hash) + getBannedPhrasesList().hashCode(); + } + if (hasRaiSettings()) { + hash = (37 * hash) + RAI_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getRaiSettings().hashCode(); + } + if (hasDefaultRaiSettings()) { + hash = (37 * hash) + DEFAULT_RAI_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getDefaultRaiSettings().hashCode(); + } + if (hasPromptSecuritySettings()) { + hash = (37 * hash) + PROMPT_SECURITY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getPromptSecuritySettings().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings 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.v3.SafetySettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings 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.v3.SafetySettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings 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.v3.SafetySettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings 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.v3.SafetySettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SafetySettings 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.v3.SafetySettings 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.v3.SafetySettings 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.v3.SafetySettings 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; + } + + /** + * + * + *
+   * Settings for Generative Safety.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SafetySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SafetySettings) + com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SafetySettings.class, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.SafetySettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBannedPhrasesFieldBuilder(); + getRaiSettingsFieldBuilder(); + getDefaultRaiSettingsFieldBuilder(); + getPromptSecuritySettingsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + defaultBannedPhraseMatchStrategy_ = 0; + if (bannedPhrasesBuilder_ == null) { + bannedPhrases_ = java.util.Collections.emptyList(); + } else { + bannedPhrases_ = null; + bannedPhrasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + raiSettings_ = null; + if (raiSettingsBuilder_ != null) { + raiSettingsBuilder_.dispose(); + raiSettingsBuilder_ = null; + } + defaultRaiSettings_ = null; + if (defaultRaiSettingsBuilder_ != null) { + defaultRaiSettingsBuilder_.dispose(); + defaultRaiSettingsBuilder_ = null; + } + promptSecuritySettings_ = null; + if (promptSecuritySettingsBuilder_ != null) { + promptSecuritySettingsBuilder_.dispose(); + promptSecuritySettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings build() { + com.google.cloud.dialogflow.cx.v3.SafetySettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.SafetySettings result = + new com.google.cloud.dialogflow.cx.v3.SafetySettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.SafetySettings result) { + if (bannedPhrasesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + bannedPhrases_ = java.util.Collections.unmodifiableList(bannedPhrases_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.bannedPhrases_ = bannedPhrases_; + } else { + result.bannedPhrases_ = bannedPhrasesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.SafetySettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.defaultBannedPhraseMatchStrategy_ = defaultBannedPhraseMatchStrategy_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.raiSettings_ = + raiSettingsBuilder_ == null ? raiSettings_ : raiSettingsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.defaultRaiSettings_ = + defaultRaiSettingsBuilder_ == null + ? defaultRaiSettings_ + : defaultRaiSettingsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.promptSecuritySettings_ = + promptSecuritySettingsBuilder_ == null + ? promptSecuritySettings_ + : promptSecuritySettingsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.SafetySettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.SafetySettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SafetySettings other) { + if (other == com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()) + return this; + if (other.defaultBannedPhraseMatchStrategy_ != 0) { + setDefaultBannedPhraseMatchStrategyValue(other.getDefaultBannedPhraseMatchStrategyValue()); + } + if (bannedPhrasesBuilder_ == null) { + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrases_.isEmpty()) { + bannedPhrases_ = other.bannedPhrases_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.addAll(other.bannedPhrases_); + } + onChanged(); + } + } else { + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrasesBuilder_.isEmpty()) { + bannedPhrasesBuilder_.dispose(); + bannedPhrasesBuilder_ = null; + bannedPhrases_ = other.bannedPhrases_; + bitField0_ = (bitField0_ & ~0x00000002); + bannedPhrasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBannedPhrasesFieldBuilder() + : null; + } else { + bannedPhrasesBuilder_.addAllMessages(other.bannedPhrases_); + } + } + } + if (other.hasRaiSettings()) { + mergeRaiSettings(other.getRaiSettings()); + } + if (other.hasDefaultRaiSettings()) { + mergeDefaultRaiSettings(other.getDefaultRaiSettings()); + } + if (other.hasPromptSecuritySettings()) { + mergePromptSecuritySettings(other.getPromptSecuritySettings()); + } + 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: + { + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.parser(), + extensionRegistry); + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(m); + } else { + bannedPhrasesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getRaiSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage( + getDefaultRaiSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 32: + { + defaultBannedPhraseMatchStrategy_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 32 + case 66: + { + input.readMessage( + getPromptSecuritySettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 66 + 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 int defaultBannedPhraseMatchStrategy_ = 0; + + /** + * + * + *
+     * Optional. Default phrase match strategy for banned phrases.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for defaultBannedPhraseMatchStrategy. + */ + @java.lang.Override + public int getDefaultBannedPhraseMatchStrategyValue() { + return defaultBannedPhraseMatchStrategy_; + } + + /** + * + * + *
+     * Optional. Default phrase match strategy for banned phrases.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for defaultBannedPhraseMatchStrategy to set. + * @return This builder for chaining. + */ + public Builder setDefaultBannedPhraseMatchStrategyValue(int value) { + defaultBannedPhraseMatchStrategy_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Default phrase match strategy for banned phrases.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultBannedPhraseMatchStrategy. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy + getDefaultBannedPhraseMatchStrategy() { + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy result = + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy.forNumber( + defaultBannedPhraseMatchStrategy_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Default phrase match strategy for banned phrases.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The defaultBannedPhraseMatchStrategy to set. + * @return This builder for chaining. + */ + public Builder setDefaultBannedPhraseMatchStrategy( + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + defaultBannedPhraseMatchStrategy_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Default phrase match strategy for banned phrases.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDefaultBannedPhraseMatchStrategy() { + bitField0_ = (bitField0_ & ~0x00000001); + defaultBannedPhraseMatchStrategy_ = 0; + onChanged(); + return this; + } + + private java.util.List bannedPhrases_ = + java.util.Collections.emptyList(); + + private void ensureBannedPhrasesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + bannedPhrases_ = + new java.util.ArrayList( + bannedPhrases_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> + bannedPhrasesBuilder_; + + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List + getBannedPhrasesList() { + if (bannedPhrasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bannedPhrases_); + } else { + return bannedPhrasesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public int getBannedPhrasesCount() { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.size(); + } else { + return bannedPhrasesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getBannedPhrases(int index) { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.get(index); + } else { + return bannedPhrasesBuilder_.getMessage(index); + } } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto - .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.SafetySettings.class, - com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder.class); + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder setBannedPhrases( + int index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, value); + onChanged(); + } else { + bannedPhrasesBuilder_.setMessage(index, value); + } + return this; } - // Construct using com.google.cloud.dialogflow.cx.v3.SafetySettings.newBuilder() - private Builder() {} + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder setBannedPhrases( + int index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases(com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(value); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(value); + } + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + int index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { if (bannedPhrasesBuilder_ == null) { - bannedPhrases_ = java.util.Collections.emptyList(); + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(index, value); + onChanged(); } else { - bannedPhrases_ = null; - bannedPhrasesBuilder_.clear(); + bannedPhrasesBuilder_.addMessage(index, value); } - bitField0_ = (bitField0_ & ~0x00000001); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3.SafetySettingsProto - .internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor; + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(builderForValue.build()); + } + return this; } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.SafetySettings getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance(); + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addBannedPhrases( + int index, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(index, builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.SafetySettings build() { - com.google.cloud.dialogflow.cx.v3.SafetySettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder addAllBannedPhrases( + java.lang.Iterable + values) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bannedPhrases_); + onChanged(); + } else { + bannedPhrasesBuilder_.addAllMessages(values); } - return result; + return this; } - @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.SafetySettings buildPartial() { - com.google.cloud.dialogflow.cx.v3.SafetySettings result = - new com.google.cloud.dialogflow.cx.v3.SafetySettings(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder clearBannedPhrases() { + if (bannedPhrasesBuilder_ == null) { + bannedPhrases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + bannedPhrasesBuilder_.clear(); } - onBuilt(); - return result; + return this; } - private void buildPartialRepeatedFields( - com.google.cloud.dialogflow.cx.v3.SafetySettings result) { + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public Builder removeBannedPhrases(int index) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.remove(index); + onChanged(); + } else { + bannedPhrasesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder getBannedPhrasesBuilder( + int index) { + return getBannedPhrasesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder + getBannedPhrasesOrBuilder(int index) { if (bannedPhrasesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - bannedPhrases_ = java.util.Collections.unmodifiableList(bannedPhrases_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bannedPhrases_ = bannedPhrases_; + return bannedPhrases_.get(index); } else { - result.bannedPhrases_ = bannedPhrasesBuilder_.build(); + return bannedPhrasesBuilder_.getMessageOrBuilder(index); } } - private void buildPartial0(com.google.cloud.dialogflow.cx.v3.SafetySettings result) { - int from_bitField0_ = bitField0_; + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> + getBannedPhrasesOrBuilderList() { + if (bannedPhrasesBuilder_ != null) { + return bannedPhrasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bannedPhrases_); + } } - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder + addBannedPhrasesBuilder() { + return getBannedPhrasesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.getDefaultInstance()); } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder addBannedPhrasesBuilder( + int index) { + return getBannedPhrasesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.getDefaultInstance()); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + /** + * + * + *
+     * Banned phrases for generated text.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + */ + public java.util.List + getBannedPhrasesBuilderList() { + return getBannedPhrasesFieldBuilder().getBuilderList(); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> + getBannedPhrasesFieldBuilder() { + if (bannedPhrasesBuilder_ == null) { + bannedPhrasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, + com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder>( + bannedPhrases_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + bannedPhrases_ = null; + } + return bannedPhrasesBuilder_; } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + private com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings raiSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder> + raiSettingsBuilder_; - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * Optional. Settings for Responsible AI checks.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the raiSettings field is set. + */ + public boolean hasRaiSettings() { + return ((bitField0_ & 0x00000004) != 0); } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3.SafetySettings) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3.SafetySettings) other); + /** + * + * + *
+     * Optional. Settings for Responsible AI checks.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The raiSettings. + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings getRaiSettings() { + if (raiSettingsBuilder_ == null) { + return raiSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance() + : raiSettings_; } else { - super.mergeFrom(other); - return this; + return raiSettingsBuilder_.getMessage(); } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SafetySettings other) { - if (other == com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()) - return this; - if (bannedPhrasesBuilder_ == null) { - if (!other.bannedPhrases_.isEmpty()) { - if (bannedPhrases_.isEmpty()) { - bannedPhrases_ = other.bannedPhrases_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBannedPhrasesIsMutable(); - bannedPhrases_.addAll(other.bannedPhrases_); - } - onChanged(); + /** + * + * + *
+     * Optional. Settings for Responsible AI checks.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRaiSettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings value) { + if (raiSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + raiSettings_ = value; } else { - if (!other.bannedPhrases_.isEmpty()) { - if (bannedPhrasesBuilder_.isEmpty()) { - bannedPhrasesBuilder_.dispose(); - bannedPhrasesBuilder_ = null; - bannedPhrases_ = other.bannedPhrases_; - bitField0_ = (bitField0_ & ~0x00000001); - bannedPhrasesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBannedPhrasesFieldBuilder() - : null; - } else { - bannedPhrasesBuilder_.addAllMessages(other.bannedPhrases_); - } - } + raiSettingsBuilder_.setMessage(value); } - this.mergeUnknownFields(other.getUnknownFields()); + bitField0_ |= 0x00000004; 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(); + /** + * + * + *
+     * Optional. Settings for Responsible AI checks.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRaiSettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder builderForValue) { + if (raiSettingsBuilder_ == null) { + raiSettings_ = builderForValue.build(); + } else { + raiSettingsBuilder_.setMessage(builderForValue.build()); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase m = - input.readMessage( - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.parser(), - extensionRegistry); - if (bannedPhrasesBuilder_ == null) { - ensureBannedPhrasesIsMutable(); - bannedPhrases_.add(m); - } else { - bannedPhrasesBuilder_.addMessage(m); - } - 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 + bitField0_ |= 0x00000004; + onChanged(); return this; } - private int bitField0_; - - private java.util.List bannedPhrases_ = - java.util.Collections.emptyList(); + /** + * + * + *
+     * Optional. Settings for Responsible AI checks.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRaiSettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings value) { + if (raiSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && raiSettings_ != null + && raiSettings_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + .getDefaultInstance()) { + getRaiSettingsBuilder().mergeFrom(value); + } else { + raiSettings_ = value; + } + } else { + raiSettingsBuilder_.mergeFrom(value); + } + if (raiSettings_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } - private void ensureBannedPhrasesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bannedPhrases_ = - new java.util.ArrayList( - bannedPhrases_); - bitField0_ |= 0x00000001; + /** + * + * + *
+     * Optional. Settings for Responsible AI checks.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRaiSettings() { + bitField0_ = (bitField0_ & ~0x00000004); + raiSettings_ = null; + if (raiSettingsBuilder_ != null) { + raiSettingsBuilder_.dispose(); + raiSettingsBuilder_ = null; } + onChanged(); + return this; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, - com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> - bannedPhrasesBuilder_; + /** + * + * + *
+     * Optional. Settings for Responsible AI checks.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder + getRaiSettingsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRaiSettingsFieldBuilder().getBuilder(); + } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for Responsible AI checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getBannedPhrasesList() { - if (bannedPhrasesBuilder_ == null) { - return java.util.Collections.unmodifiableList(bannedPhrases_); + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder + getRaiSettingsOrBuilder() { + if (raiSettingsBuilder_ != null) { + return raiSettingsBuilder_.getMessageOrBuilder(); } else { - return bannedPhrasesBuilder_.getMessageList(); + return raiSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance() + : raiSettings_; } } @@ -1443,35 +5676,78 @@ private void ensureBannedPhrasesIsMutable() { * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for Responsible AI checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ - public int getBannedPhrasesCount() { - if (bannedPhrasesBuilder_ == null) { - return bannedPhrases_.size(); - } else { - return bannedPhrasesBuilder_.getCount(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder> + getRaiSettingsFieldBuilder() { + if (raiSettingsBuilder_ == null) { + raiSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder>( + getRaiSettings(), getParentForChildren(), isClean()); + raiSettings_ = null; } + return raiSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings defaultRaiSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder> + defaultRaiSettingsBuilder_; + /** * * *
-     * Banned phrases for generated text.
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * + * + * @return Whether the defaultRaiSettings field is set. */ - public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getBannedPhrases(int index) { - if (bannedPhrasesBuilder_ == null) { - return bannedPhrases_.get(index); + public boolean hasDefaultRaiSettings() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The defaultRaiSettings. + */ + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings getDefaultRaiSettings() { + if (defaultRaiSettingsBuilder_ == null) { + return defaultRaiSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance() + : defaultRaiSettings_; } else { - return bannedPhrasesBuilder_.getMessage(index); + return defaultRaiSettingsBuilder_.getMessage(); } } @@ -1479,24 +5755,27 @@ public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase getBannedPhrases( * * *
-     * Banned phrases for generated text.
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * */ - public Builder setBannedPhrases( - int index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { - if (bannedPhrasesBuilder_ == null) { + public Builder setDefaultRaiSettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings value) { + if (defaultRaiSettingsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureBannedPhrasesIsMutable(); - bannedPhrases_.set(index, value); - onChanged(); + defaultRaiSettings_ = value; } else { - bannedPhrasesBuilder_.setMessage(index, value); + defaultRaiSettingsBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -1504,22 +5783,24 @@ public Builder setBannedPhrases( * * *
-     * Banned phrases for generated text.
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * */ - public Builder setBannedPhrases( - int index, - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { - if (bannedPhrasesBuilder_ == null) { - ensureBannedPhrasesIsMutable(); - bannedPhrases_.set(index, builderForValue.build()); - onChanged(); + public Builder setDefaultRaiSettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder builderForValue) { + if (defaultRaiSettingsBuilder_ == null) { + defaultRaiSettings_ = builderForValue.build(); } else { - bannedPhrasesBuilder_.setMessage(index, builderForValue.build()); + defaultRaiSettingsBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -1527,22 +5808,33 @@ public Builder setBannedPhrases( * * *
-     * Banned phrases for generated text.
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * */ - public Builder addBannedPhrases(com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { - if (bannedPhrasesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeDefaultRaiSettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings value) { + if (defaultRaiSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && defaultRaiSettings_ != null + && defaultRaiSettings_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + .getDefaultInstance()) { + getDefaultRaiSettingsBuilder().mergeFrom(value); + } else { + defaultRaiSettings_ = value; } - ensureBannedPhrasesIsMutable(); - bannedPhrases_.add(value); - onChanged(); } else { - bannedPhrasesBuilder_.addMessage(value); + defaultRaiSettingsBuilder_.mergeFrom(value); + } + if (defaultRaiSettings_ != null) { + bitField0_ |= 0x00000008; + onChanged(); } return this; } @@ -1551,24 +5843,23 @@ public Builder addBannedPhrases(com.google.cloud.dialogflow.cx.v3.SafetySettings * * *
-     * Banned phrases for generated text.
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * */ - public Builder addBannedPhrases( - int index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase value) { - if (bannedPhrasesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBannedPhrasesIsMutable(); - bannedPhrases_.add(index, value); - onChanged(); - } else { - bannedPhrasesBuilder_.addMessage(index, value); + public Builder clearDefaultRaiSettings() { + bitField0_ = (bitField0_ & ~0x00000008); + defaultRaiSettings_ = null; + if (defaultRaiSettingsBuilder_ != null) { + defaultRaiSettingsBuilder_.dispose(); + defaultRaiSettingsBuilder_ = null; } + onChanged(); return this; } @@ -1576,232 +5867,298 @@ public Builder addBannedPhrases( * * *
-     * Banned phrases for generated text.
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * */ - public Builder addBannedPhrases( - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { - if (bannedPhrasesBuilder_ == null) { - ensureBannedPhrasesIsMutable(); - bannedPhrases_.add(builderForValue.build()); - onChanged(); - } else { - bannedPhrasesBuilder_.addMessage(builderForValue.build()); - } - return this; + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder + getDefaultRaiSettingsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDefaultRaiSettingsFieldBuilder().getBuilder(); } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * */ - public Builder addBannedPhrases( - int index, - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder builderForValue) { - if (bannedPhrasesBuilder_ == null) { - ensureBannedPhrasesIsMutable(); - bannedPhrases_.add(index, builderForValue.build()); - onChanged(); + public com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder + getDefaultRaiSettingsOrBuilder() { + if (defaultRaiSettingsBuilder_ != null) { + return defaultRaiSettingsBuilder_.getMessageOrBuilder(); } else { - bannedPhrasesBuilder_.addMessage(index, builderForValue.build()); + return defaultRaiSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.getDefaultInstance() + : defaultRaiSettings_; } - return this; } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+     * that users will be able to restore their RAI configurations to the default
+     * settings. Read-only field for the API proto only.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * */ - public Builder addAllBannedPhrases( - java.lang.Iterable - values) { - if (bannedPhrasesBuilder_ == null) { - ensureBannedPhrasesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bannedPhrases_); - onChanged(); - } else { - bannedPhrasesBuilder_.addAllMessages(values); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder> + getDefaultRaiSettingsFieldBuilder() { + if (defaultRaiSettingsBuilder_ == null) { + defaultRaiSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder>( + getDefaultRaiSettings(), getParentForChildren(), isClean()); + defaultRaiSettings_ = null; } - return this; + return defaultRaiSettingsBuilder_; } + private com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + promptSecuritySettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettingsOrBuilder> + promptSecuritySettingsBuilder_; + /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for prompt security checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return Whether the promptSecuritySettings field is set. */ - public Builder clearBannedPhrases() { - if (bannedPhrasesBuilder_ == null) { - bannedPhrases_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bannedPhrasesBuilder_.clear(); - } - return this; + public boolean hasPromptSecuritySettings() { + return ((bitField0_ & 0x00000010) != 0); } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for prompt security checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The promptSecuritySettings. */ - public Builder removeBannedPhrases(int index) { - if (bannedPhrasesBuilder_ == null) { - ensureBannedPhrasesIsMutable(); - bannedPhrases_.remove(index); - onChanged(); + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + getPromptSecuritySettings() { + if (promptSecuritySettingsBuilder_ == null) { + return promptSecuritySettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + .getDefaultInstance() + : promptSecuritySettings_; } else { - bannedPhrasesBuilder_.remove(index); + return promptSecuritySettingsBuilder_.getMessage(); } - return this; } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for prompt security checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder getBannedPhrasesBuilder( - int index) { - return getBannedPhrasesFieldBuilder().getBuilder(index); + public Builder setPromptSecuritySettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings value) { + if (promptSecuritySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + promptSecuritySettings_ = value; + } else { + promptSecuritySettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for prompt security checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder - getBannedPhrasesOrBuilder(int index) { - if (bannedPhrasesBuilder_ == null) { - return bannedPhrases_.get(index); + public Builder setPromptSecuritySettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.Builder + builderForValue) { + if (promptSecuritySettingsBuilder_ == null) { + promptSecuritySettings_ = builderForValue.build(); } else { - return bannedPhrasesBuilder_.getMessageOrBuilder(index); + promptSecuritySettingsBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for prompt security checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List< - ? extends com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> - getBannedPhrasesOrBuilderList() { - if (bannedPhrasesBuilder_ != null) { - return bannedPhrasesBuilder_.getMessageOrBuilderList(); + public Builder mergePromptSecuritySettings( + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings value) { + if (promptSecuritySettingsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && promptSecuritySettings_ != null + && promptSecuritySettings_ + != com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + .getDefaultInstance()) { + getPromptSecuritySettingsBuilder().mergeFrom(value); + } else { + promptSecuritySettings_ = value; + } } else { - return java.util.Collections.unmodifiableList(bannedPhrases_); + promptSecuritySettingsBuilder_.mergeFrom(value); + } + if (promptSecuritySettings_ != null) { + bitField0_ |= 0x00000010; + onChanged(); } + return this; } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for prompt security checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder - addBannedPhrasesBuilder() { - return getBannedPhrasesFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.getDefaultInstance()); + public Builder clearPromptSecuritySettings() { + bitField0_ = (bitField0_ & ~0x00000010); + promptSecuritySettings_ = null; + if (promptSecuritySettingsBuilder_ != null) { + promptSecuritySettingsBuilder_.dispose(); + promptSecuritySettingsBuilder_ = null; + } + onChanged(); + return this; } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for prompt security checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder addBannedPhrasesBuilder( - int index) { - return getBannedPhrasesFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.getDefaultInstance()); + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.Builder + getPromptSecuritySettingsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPromptSecuritySettingsFieldBuilder().getBuilder(); } /** * * *
-     * Banned phrases for generated text.
+     * Optional. Settings for prompt security checks.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.SafetySettings.Phrase banned_phrases = 1; + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getBannedPhrasesBuilderList() { - return getBannedPhrasesFieldBuilder().getBuilderList(); + public com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettingsOrBuilder + getPromptSecuritySettingsOrBuilder() { + if (promptSecuritySettingsBuilder_ != null) { + return promptSecuritySettingsBuilder_.getMessageOrBuilder(); + } else { + return promptSecuritySettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + .getDefaultInstance() + : promptSecuritySettings_; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, - com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder> - getBannedPhrasesFieldBuilder() { - if (bannedPhrasesBuilder_ == null) { - bannedPhrasesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, - com.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.Builder, - com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder>( - bannedPhrases_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - bannedPhrases_ = null; + /** + * + * + *
+     * Optional. Settings for prompt security checks.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettingsOrBuilder> + getPromptSecuritySettingsFieldBuilder() { + if (promptSecuritySettingsBuilder_ == null) { + promptSecuritySettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.Builder, + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettingsOrBuilder>( + getPromptSecuritySettings(), getParentForChildren(), isClean()); + promptSecuritySettings_ = null; } - return bannedPhrasesBuilder_; + return promptSecuritySettingsBuilder_; } @java.lang.Override diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsOrBuilder.java index 0efe0b005d24..b7627166d6b2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsOrBuilder.java @@ -24,6 +24,37 @@ public interface SafetySettingsOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SafetySettings) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+   * Optional. Default phrase match strategy for banned phrases.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for defaultBannedPhraseMatchStrategy. + */ + int getDefaultBannedPhraseMatchStrategyValue(); + + /** + * + * + *
+   * Optional. Default phrase match strategy for banned phrases.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultBannedPhraseMatchStrategy. + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy + getDefaultBannedPhraseMatchStrategy(); + /** * * @@ -80,4 +111,142 @@ public interface SafetySettingsOrBuilder */ com.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseOrBuilder getBannedPhrasesOrBuilder( int index); + + /** + * + * + *
+   * Optional. Settings for Responsible AI checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the raiSettings field is set. + */ + boolean hasRaiSettings(); + + /** + * + * + *
+   * Optional. Settings for Responsible AI checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The raiSettings. + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings getRaiSettings(); + + /** + * + * + *
+   * Optional. Settings for Responsible AI checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings rai_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder getRaiSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+   * that users will be able to restore their RAI configurations to the default
+   * settings. Read-only field for the API proto only.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the defaultRaiSettings field is set. + */ + boolean hasDefaultRaiSettings(); + + /** + * + * + *
+   * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+   * that users will be able to restore their RAI configurations to the default
+   * settings. Read-only field for the API proto only.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The defaultRaiSettings. + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings getDefaultRaiSettings(); + + /** + * + * + *
+   * Optional. Immutable. Default RAI settings to be annotated on the agent, so
+   * that users will be able to restore their RAI configurations to the default
+   * settings. Read-only field for the API proto only.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings default_rai_settings = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettingsOrBuilder + getDefaultRaiSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. Settings for prompt security checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the promptSecuritySettings field is set. + */ + boolean hasPromptSecuritySettings(); + + /** + * + * + *
+   * Optional. Settings for prompt security checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The promptSecuritySettings. + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + getPromptSecuritySettings(); + + /** + * + * + *
+   * Optional. Settings for prompt security checks.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings prompt_security_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettingsOrBuilder + getPromptSecuritySettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsProto.java index 3ca4fa2f458c..40ec9949b8d8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SafetySettingsProto.java @@ -36,6 +36,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -47,16 +59,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n3google/cloud/dialogflow/cx/v3/safety_s" + "ettings.proto\022\035google.cloud.dialogflow.c" - + "x.v3\032\037google/api/field_behavior.proto\"\227\001" - + "\n\016SafetySettings\022L\n\016banned_phrases\030\001 \003(\013" - + "24.google.cloud.dialogflow.cx.v3.SafetyS" - + "ettings.Phrase\0327\n\006Phrase\022\021\n\004text\030\001 \001(\tB\003" - + "\340A\002\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A\002B\266\001\n!com." - + "google.cloud.dialogflow.cx.v3B\023SafetySet" - + "tingsProtoP\001Z1cloud.google.com/go/dialog" - + "flow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cl" - + "oud.Dialogflow.Cx.V3\352\002!Google::Cloud::Di" - + "alogflow::CX::V3b\006proto3" + + "x.v3\032\037google/api/field_behavior.proto\"\240\n" + + "\n\016SafetySettings\022t\n$default_banned_phras" + + "e_match_strategy\030\004 \001(\0162A.google.cloud.di" + + "alogflow.cx.v3.SafetySettings.PhraseMatc" + + "hStrategyB\003\340A\001\022L\n\016banned_phrases\030\001 \003(\01324" + + ".google.cloud.dialogflow.cx.v3.SafetySet" + + "tings.Phrase\022T\n\014rai_settings\030\002 \001(\01329.goo" + + "gle.cloud.dialogflow.cx.v3.SafetySetting" + + "s.RaiSettingsB\003\340A\001\022_\n\024default_rai_settin" + + "gs\030\003 \001(\01329.google.cloud.dialogflow.cx.v3" + + ".SafetySettings.RaiSettingsB\006\340A\001\340A\005\022k\n\030p" + + "rompt_security_settings\030\010 \001(\0132D.google.c" + + "loud.dialogflow.cx.v3.SafetySettings.Pro" + + "mptSecuritySettingsB\003\340A\001\0327\n\006Phrase\022\021\n\004te" + + "xt\030\001 \001(\tB\003\340A\002\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A" + + "\002\032\314\004\n\013RaiSettings\022g\n\020category_filters\030\003 " + + "\003(\0132H.google.cloud.dialogflow.cx.v3.Safe" + + "tySettings.RaiSettings.CategoryFilterB\003\340" + + "A\001\032\317\001\n\016CategoryFilter\022Z\n\010category\030\001 \001(\0162" + + "H.google.cloud.dialogflow.cx.v3.SafetySe" + + "ttings.RaiSettings.SafetyCategory\022a\n\014fil" + + "ter_level\030\002 \001(\0162K.google.cloud.dialogflo" + + "w.cx.v3.SafetySettings.RaiSettings.Safet" + + "yFilterLevel\"w\n\021SafetyFilterLevel\022#\n\037SAF" + + "ETY_FILTER_LEVEL_UNSPECIFIED\020\000\022\016\n\nBLOCK_" + + "NONE\020\001\022\r\n\tBLOCK_FEW\020\002\022\016\n\nBLOCK_SOME\020\003\022\016\n" + + "\nBLOCK_MOST\020\004\"\210\001\n\016SafetyCategory\022\037\n\033SAFE" + + "TY_CATEGORY_UNSPECIFIED\020\000\022\025\n\021DANGEROUS_C" + + "ONTENT\020\001\022\017\n\013HATE_SPEECH\020\002\022\016\n\nHARASSMENT\020" + + "\003\022\035\n\031SEXUALLY_EXPLICIT_CONTENT\020\004\032=\n\026Prom" + + "ptSecuritySettings\022#\n\026enable_prompt_secu" + + "rity\030\001 \001(\010B\003\340A\001\"_\n\023PhraseMatchStrategy\022%" + + "\n!PHRASE_MATCH_STRATEGY_UNSPECIFIED\020\000\022\021\n" + + "\rPARTIAL_MATCH\020\001\022\016\n\nWORD_MATCH\020\002B\266\001\n!com" + + ".google.cloud.dialogflow.cx.v3B\023SafetySe" + + "ttingsProtoP\001Z1cloud.google.com/go/dialo" + + "gflow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Google.C" + + "loud.Dialogflow.Cx.V3\352\002!Google::Cloud::D" + + "ialogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -70,7 +111,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor, new java.lang.String[] { + "DefaultBannedPhraseMatchStrategy", "BannedPhrases", + "RaiSettings", + "DefaultRaiSettings", + "PromptSecuritySettings", }); internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_Phrase_descriptor = internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor @@ -82,6 +127,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Text", "LanguageCode", }); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_descriptor, + new java.lang.String[] { + "CategoryFilters", + }); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_RaiSettings_CategoryFilter_descriptor, + new java.lang.String[] { + "Category", "FilterLevel", + }); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_SafetySettings_PromptSecuritySettings_descriptor, + new java.lang.String[] { + "EnablePromptSecurity", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java index 7cb82702433a..1db2765082d7 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java @@ -684,6 +684,9 @@ public interface AudioExportSettingsOrBuilder * *
      * Filename pattern for exported audio.
+     * {conversation} and {timestamp} are placeholders that will be replaced
+     * with the conversation ID and epoch micros of the conversation.
+     * For example, "{conversation}/recording_{timestamp}.mulaw".
      * 
* * string audio_export_pattern = 2; @@ -697,6 +700,9 @@ public interface AudioExportSettingsOrBuilder * *
      * Filename pattern for exported audio.
+     * {conversation} and {timestamp} are placeholders that will be replaced
+     * with the conversation ID and epoch micros of the conversation.
+     * For example, "{conversation}/recording_{timestamp}.mulaw".
      * 
* * string audio_export_pattern = 2; @@ -1073,6 +1079,9 @@ public com.google.protobuf.ByteString getGcsBucketBytes() { * *
      * Filename pattern for exported audio.
+     * {conversation} and {timestamp} are placeholders that will be replaced
+     * with the conversation ID and epoch micros of the conversation.
+     * For example, "{conversation}/recording_{timestamp}.mulaw".
      * 
* * string audio_export_pattern = 2; @@ -1097,6 +1106,9 @@ public java.lang.String getAudioExportPattern() { * *
      * Filename pattern for exported audio.
+     * {conversation} and {timestamp} are placeholders that will be replaced
+     * with the conversation ID and epoch micros of the conversation.
+     * For example, "{conversation}/recording_{timestamp}.mulaw".
      * 
* * string audio_export_pattern = 2; @@ -1799,6 +1811,9 @@ public Builder setGcsBucketBytes(com.google.protobuf.ByteString value) { * *
        * Filename pattern for exported audio.
+       * {conversation} and {timestamp} are placeholders that will be replaced
+       * with the conversation ID and epoch micros of the conversation.
+       * For example, "{conversation}/recording_{timestamp}.mulaw".
        * 
* * string audio_export_pattern = 2; @@ -1822,6 +1837,9 @@ public java.lang.String getAudioExportPattern() { * *
        * Filename pattern for exported audio.
+       * {conversation} and {timestamp} are placeholders that will be replaced
+       * with the conversation ID and epoch micros of the conversation.
+       * For example, "{conversation}/recording_{timestamp}.mulaw".
        * 
* * string audio_export_pattern = 2; @@ -1845,6 +1863,9 @@ public com.google.protobuf.ByteString getAudioExportPatternBytes() { * *
        * Filename pattern for exported audio.
+       * {conversation} and {timestamp} are placeholders that will be replaced
+       * with the conversation ID and epoch micros of the conversation.
+       * For example, "{conversation}/recording_{timestamp}.mulaw".
        * 
* * string audio_export_pattern = 2; @@ -1867,6 +1888,9 @@ public Builder setAudioExportPattern(java.lang.String value) { * *
        * Filename pattern for exported audio.
+       * {conversation} and {timestamp} are placeholders that will be replaced
+       * with the conversation ID and epoch micros of the conversation.
+       * For example, "{conversation}/recording_{timestamp}.mulaw".
        * 
* * string audio_export_pattern = 2; @@ -1885,6 +1909,9 @@ public Builder clearAudioExportPattern() { * *
        * Filename pattern for exported audio.
+       * {conversation} and {timestamp} are placeholders that will be replaced
+       * with the conversation ID and epoch micros of the conversation.
+       * For example, "{conversation}/recording_{timestamp}.mulaw".
        * 
* * string audio_export_pattern = 2; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java index 45385e9fb451..0b8ef22db7e8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java @@ -169,17 +169,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "roto\032\031google/api/resource.proto\0325google/" + "cloud/dialogflow/cx/v3/advanced_settings.proto\0320google/cloud/dialogflow/cx/v3/au" + "dio_config.proto\0329google/cloud/dialogflow/cx/v3/data_store_connection.proto\032(goo" - + "gle/cloud/dialogflow/cx/v3/flow.proto\032*google/cloud/dialogflow/cx/v3/intent.prot" - + "o\032(google/cloud/dialogflow/cx/v3/page.proto\0324google/cloud/dialogflow/cx/v3/respo" - + "nse_message.proto\0327google/cloud/dialogfl" - + "ow/cx/v3/session_entity_type.proto\032\036google/protobuf/duration.proto\032" - + " google/protobuf/field_mask.proto\032\034google/protobuf/st" - + "ruct.proto\032\027google/rpc/status.proto\032\030google/type/latlng.proto\"\324\002\n" + + "gle/cloud/dialogflow/cx/v3/flow.proto\0327google/cloud/dialogflow/cx/v3/generative_" + + "settings.proto\032*google/cloud/dialogflow/cx/v3/intent.proto\032(google/cloud/dialogf" + + "low/cx/v3/page.proto\0324google/cloud/dialogflow/cx/v3/response_message.proto\0327goog" + + "le/cloud/dialogflow/cx/v3/session_entity_type.proto\032-google/cloud/dialogflow/cx/" + + "v3/tool_call.proto\032\036google/protobuf/duration.proto\032" + + " google/protobuf/field_mask.proto\032\034google/protobuf/struct.proto\032\027goog" + + "le/rpc/status.proto\032\030google/type/latlng.proto\"\324\002\n" + "\016AnswerFeedback\022I\n" - + "\006rating\030\001" - + " \001(\01624.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingB\003\340A\001\022V\n\r" - + "rating_reason\030\002 \001(\0132:.google.cloud.dialog" - + "flow.cx.v3.AnswerFeedback.RatingReasonB\003\340A\001\022\032\n\r" + + "\006rating\030\001 \001(\016" + + "24.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingB\003\340A\001\022V\n\r" + + "rating_reason\030\002 \001" + + "(\0132:.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReasonB\003\340A\001\022\032\n\r" + "custom_rating\030\003 \001(\tB\003\340A\001\032A\n" + "\014RatingReason\022\032\n\r" + "reason_labels\030\003 \003(\tB\003\340A\001\022\025\n" @@ -192,33 +193,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\007session\030\001 \001(\tB)\340A\002\372A#\n" + "!dialogflow.googleapis.com/Session\022\030\n" + "\013response_id\030\002 \001(\tB\003\340A\002\022K\n" - + "\017answer_feedback\030\003 \001(\0132-.google.clo" - + "ud.dialogflow.cx.v3.AnswerFeedbackB\003\340A\002\0224\n" + + "\017answer_feedback\030\003" + + " \001(\0132-.google.cloud.dialogflow.cx.v3.AnswerFeedbackB\003\340A\002\0224\n" + "\013update_mask\030\004" - + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\253\002\n" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\200\003\n" + "\023DetectIntentRequest\022:\n" + "\007session\030\001 \001(\tB)\340A\002\372A#\n" + "!dialogflow.googleapis.com/Session\022D\n" - + "\014query_params\030\002 \001(\0132" - + "..google.cloud.dialogflow.cx.v3.QueryParameters\022C\n" + + "\014query_params\030\002" + + " \001(\0132..google.cloud.dialogflow.cx.v3.QueryParameters\022C\n" + "\013query_input\030\003" + " \001(\0132).google.cloud.dialogflow.cx.v3.QueryInputB\003\340A\002\022M\n" + "\023output_audio_config\030\004" - + " \001(\01320.google.cloud.dialogflow.cx.v3.OutputAudioConfig\"\216\003\n" + + " \001(\01320.google.cloud.dialogflow.cx.v3.OutputAudioConfig\022S\n\r" + + "response_view\030\t \001" + + "(\01627.google.cloud.dialogflow.cx.v3.DetectIntentResponseViewB\003\340A\001\"\216\003\n" + "\024DetectIntentResponse\022\023\n" + "\013response_id\030\001 \001(\t\022@\n" + "\014query_result\030\002" + " \001(\0132*.google.cloud.dialogflow.cx.v3.QueryResult\022\024\n" + "\014output_audio\030\004 \001(\014\022M\n" - + "\023output_audio_config\030\005 \001(\01320" - + ".google.cloud.dialogflow.cx.v3.OutputAudioConfig\022W\n\r" - + "response_type\030\006 \001(\0162@.google" - + ".cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType\022\032\n" + + "\023output_audio_config\030\005" + + " \001(\01320.google.cloud.dialogflow.cx.v3.OutputAudioConfig\022W\n" + + "\r" + + "response_type\030\006 \001(\0162@.google.cloud.dial" + + "ogflow.cx.v3.DetectIntentResponse.ResponseType\022\032\n" + "\022allow_cancellation\030\007 \001(\010\"E\n" + "\014ResponseType\022\035\n" + "\031RESPONSE_TYPE_UNSPECIFIED\020\000\022\013\n" + "\007PARTIAL\020\001\022\t\n" - + "\005FINAL\020\002\"\361\002\n" + + "\005FINAL\020\002\"\306\003\n" + "\034StreamingDetectIntentRequest\0227\n" + "\007session\030\001 \001(\tB&\372A#\n" + "!dialogflow.googleapis.com/Session\022D\n" @@ -226,10 +230,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132..google.cloud.dialogflow.cx.v3.QueryParameters\022C\n" + "\013query_input\030\003" + " \001(\0132).google.cloud.dialogflow.cx.v3.QueryInputB\003\340A\002\022M\n" - + "\023output_audio_config\030\004" - + " \001(\01320.google.cloud.dialogflow.cx.v3.OutputAudioConfig\022\037\n" + + "\023output_audio_config\030\004 " + + "\001(\01320.google.cloud.dialogflow.cx.v3.OutputAudioConfig\022\037\n" + "\027enable_partial_response\030\005 \001(\010\022\035\n" - + "\025enable_debugging_info\030\010 \001(\010\"\260\007\n" + + "\025enable_debugging_info\030\010 \001(\010\022S\n" + + "\r" + + "response_view\030\020 \001(\01627.google.cloud.dial" + + "ogflow.cx.v3.DetectIntentResponseViewB\003\340A\001\"\260\007\n" + "\036CloudConversationDebuggingInfo\022\031\n" + "\021audio_data_chunks\030\001 \001(\005\0229\n" + "\026result_end_time_offset\030\002 \001(\0132\031.google.protobuf.Duration\0227\n" @@ -257,16 +264,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\'client_half_close_streaming_time_offset\030\022" + " \001(\0132\031.google.protobuf.Duration\"\262\002\n" + "\035StreamingDetectIntentResponse\022W\n" - + "\022recognition_result\030\001 \001(\01329.google.cloud.dialogf" - + "low.cx.v3.StreamingRecognitionResultH\000\022U\n" - + "\026detect_intent_response\030\002 \001(\01323.google." - + "cloud.dialogflow.cx.v3.DetectIntentResponseH\000\022U\n" - + "\016debugging_info\030\004 \001(\0132=.google.c" - + "loud.dialogflow.cx.v3.CloudConversationDebuggingInfoB\n\n" + + "\022recognition_result\030\001" + + " \001(\01329.google.cloud.dialogflow.cx.v3.StreamingRecognitionResultH\000\022U\n" + + "\026detect_intent_response\030\002 \001(\01323.google.cloud." + + "dialogflow.cx.v3.DetectIntentResponseH\000\022U\n" + + "\016debugging_info\030\004 \001(\0132=.google.cloud.d" + + "ialogflow.cx.v3.CloudConversationDebuggingInfoB\n\n" + "\010response\"\266\003\n" + "\032StreamingRecognitionResult\022[\n" - + "\014message_type\030\001 \001(\0162E." - + "google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType\022\022\n\n" + + "\014message_type\030\001 \001(\0162E.google" + + ".cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType\022\022\n\n" + "transcript\030\002 \001(\t\022\020\n" + "\010is_final\030\003 \001(\010\022\022\n\n" + "confidence\030\004 \001(\002\022\021\n" @@ -279,67 +286,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013MessageType\022\034\n" + "\030MESSAGE_TYPE_UNSPECIFIED\020\000\022\016\n\n" + "TRANSCRIPT\020\001\022\033\n" - + "\027END_OF_SINGLE_UTTERANCE\020\002\"\302\006\n" + + "\027END_OF_SINGLE_UTTERANCE\020\002\"\363\007\n" + "\017QueryParameters\022\021\n" + "\ttime_zone\030\001 \001(\t\022)\n" + "\014geo_location\030\002 \001(\0132\023.google.type.LatLng\022N\n" + "\024session_entity_types\030\003" + " \003(\01320.google.cloud.dialogflow.cx.v3.SessionEntityType\022(\n" + "\007payload\030\004 \001(\0132\027.google.protobuf.Struct\022+\n\n" - + "parameters\030\005 \001(\0132\027.google.protobuf.Struct\0229\n" + + "parameters\030\005 \001(\0132\027.google.protobuf.Struct\022\027\n" + + "\017parameter_scope\030\014 \001(\t\0229\n" + "\014current_page\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_headers\030\n" - + " \003(\0132B.google.cloud.dia" - + "logflow.cx.v3.QueryParameters.WebhookHeadersEntry\022=\n\r" + + " \003(\013" + + "2B.google.cloud.dialogflow.cx.v3.QueryParameters.WebhookHeadersEntry\022=\n\r" + "flow_versions\030\016 \003(\tB&\372A#\n" - + "!dialogflow.googleapis.com/Version\022\017\n" + + "!dialogflow.googleapis.com/Version\022D\n" + + "\020current_playbook\030\023 \001(\tB*\340A\001\372A$\n" + + "\"dialogflow.googleapis.com/Playbook\022P\n" + + "\022llm_model_settings\030\025 \001(\0132/.google.c" + + "loud.dialogflow.cx.v3.LlmModelSettingsB\003\340A\001\022\017\n" + "\007channel\030\017 \001(\t\0223\n" + "\013session_ttl\030\020 \001(\0132\031.google.protobuf.DurationB\003\340A\001\0227\n" + "\021end_user_metadata\030\022" + " \001(\0132\027.google.protobuf.StructB\003\340A\001\022G\n\r" - + "search_config\030\024" - + " \001(\0132+.google.cloud.dialogflow.cx.v3.SearchConfigB\003\340A\001\0225\n" + + "search_config\030\024 \001(\0132+.goog" + + "le.cloud.dialogflow.cx.v3.SearchConfigB\003\340A\001\0225\n" + "&populate_data_store_connection_signals\030\031 \001(\010B\005\030\001\340A\001\0325\n" + "\023WebhookHeadersEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"\232\001\n" + "\014SearchConfig\022C\n" - + "\013boost_specs\030\001" - + " \003(\0132).google.cloud.dialogflow.cx.v3.BoostSpecsB\003\340A\001\022E\n" + + "\013boost_specs\030\001 \003(\0132).google" + + ".cloud.dialogflow.cx.v3.BoostSpecsB\003\340A\001\022E\n" + "\014filter_specs\030\002" + " \003(\0132*.google.cloud.dialogflow.cx.v3.FilterSpecsB\003\340A\001\"\233\007\n" + "\tBoostSpec\022_\n" - + "\025condition_boost_specs\030\001 \003(\0132;.google.cloud." - + "dialogflow.cx.v3.BoostSpec.ConditionBoostSpecB\003\340A\001\032\254\006\n" + + "\025condition_boost_specs\030\001 \003(\0132;.go" + + "ogle.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpecB\003\340A\001\032\254\006\n" + "\022ConditionBoostSpec\022\026\n" + "\tcondition\030\001 \001(\tB\003\340A\001\022\022\n" + "\005boost\030\002 \001(\002B\003\340A\001\022m\n" - + "\022boost_control_spec\030\004 \001(\0132L.google.cloud" - + ".dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpecB\003\340A\001\032\372\004\n" + + "\022boost_control_spec\030\004 \001(\0132L.google.cloud.dialogflow.cx.v3.BoostSpec.C" + + "onditionBoostSpec.BoostControlSpecB\003\340A\001\032\372\004\n" + "\020BoostControlSpec\022\027\n\n" + "field_name\030\001 \001(\tB\003\340A\001\022w\n" - + "\016attribute_type\030\002 \001(\0162Z.google.cloud.dialog" - + "flow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeTypeB\003\340A\001\022\177\n" - + "\022interpolation_type\030\003 \001(\0162^.google.cloud.d" - + "ialogflow.cx.v3.BoostSpec.ConditionBoost" - + "Spec.BoostControlSpec.InterpolationTypeB\003\340A\001\022v\n" - + "\016control_points\030\004 \003(\0132Y.google.cl" - + "oud.dialogflow.cx.v3.BoostSpec.Condition" - + "BoostSpec.BoostControlSpec.ControlPointB\003\340A\001\032G\n" + + "\016attribute_type\030\002 \001(\0162Z.google.c" + + "loud.dialogflow.cx.v3.BoostSpec.Conditio" + + "nBoostSpec.BoostControlSpec.AttributeTypeB\003\340A\001\022\177\n" + + "\022interpolation_type\030\003 \001(\0162^.google.cloud.dialogflow.cx.v3.BoostSpec.Con" + + "ditionBoostSpec.BoostControlSpec.InterpolationTypeB\003\340A\001\022v\n" + + "\016control_points\030\004 \003(\0132Y.google.cloud.dialogflow.cx.v3.BoostSpe" + + "c.ConditionBoostSpec.BoostControlSpec.ControlPointB\003\340A\001\032G\n" + "\014ControlPoint\022\034\n" + "\017attribute_value\030\001 \001(\tB\003\340A\001\022\031\n" - + "\014boost_amount\030\002 \001(\002B\003\340A\001\"M\n" - + "\r" + + "\014boost_amount\030\002 \001(\002B\003\340A\001\"M\n\r" + "AttributeType\022\036\n" + "\032ATTRIBUTE_TYPE_UNSPECIFIED\020\000\022\r\n" + "\tNUMERICAL\020\001\022\r\n" + "\tFRESHNESS\020\002\"C\n" + "\021InterpolationType\022\"\n" + "\036INTERPOLATION_TYPE_UNSPECIFIED\020\000\022\n\n" - + "\006LINEAR\020\001\"\220\001\n\n" + + "\006LINEAR\020\001\"\220\001\n" + + "\n" + "BoostSpecs\022E\n" + "\013data_stores\030\001 \003(\tB0\340A\001\372A*\n" + "(discoveryengine.googleapis.com/DataStore\022;\n" @@ -348,30 +359,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013FilterSpecs\022E\n" + "\013data_stores\030\001 \003(\tB0\340A\001\372A*\n" + "(discoveryengine.googleapis.com/DataStore\022\023\n" - + "\006filter\030\002 \001(\tB\003\340A\001\"\333\002\n\n" + + "\006filter\030\002 \001(\tB\003\340A\001\"\246\003\n\n" + "QueryInput\0228\n" + "\004text\030\002 \001(\0132(.google.cloud.dialogflow.cx.v3.TextInputH\000\022<\n" + "\006intent\030\003 \001(\0132*.google.cloud.dialogflow.cx.v3.IntentInputH\000\022:\n" + "\005audio\030\005 \001(\0132).google.cloud.dialogflow.cx.v3.AudioInputH\000\022:\n" + "\005event\030\006 \001(\0132).google.cloud.dialogflow.cx.v3.EventInputH\000\0228\n" - + "\004dtmf\030\007 \001(\0132(.google.cloud.dialogflow.cx.v3.DtmfInputH\000\022\032\n\r" + + "\004dtmf\030\007 \001(\0132(.google.cloud.dialogflow.cx.v3.DtmfInputH\000\022I\n" + + "\020tool_call_result\030\013 \001(\0132-.google.c" + + "loud.dialogflow.cx.v3.ToolCallResultH\000\022\032\n\r" + "language_code\030\004 \001(\tB\003\340A\002B\007\n" - + "\005input\"\256\t\n" + + "\005input\"\256\010\n" + "\013QueryResult\022\016\n" + "\004text\030\001 \001(\tH\000\022?\n" + "\016trigger_intent\030\013 \001(\tB%\372A\"\n" + " dialogflow.googleapis.com/IntentH\000\022\024\n\n" + "transcript\030\014 \001(\tH\000\022\027\n\r" + "trigger_event\030\016 \001(\tH\000\0228\n" - + "\004dtmf\030\027 \001(\0132(.google.cloud.dialogflow.cx.v3.DtmfInputH\000\022\025\n\r" + + "\004dtmf\030\027 \001(\0132(.google.cloud.dialogflow.cx.v3.DtmfInputH\000\022\025\n" + + "\r" + "language_code\030\002 \001(\t\022+\n\n" + "parameters\030\003 \001(\0132\027.google.protobuf.Struct\022I\n" + "\021response_messages\030\004" - + " \003(\0132..google.cloud.dialogflow.cx.v3.ResponseMessage\022\023\n" - + "\013webhook_ids\030\031 \003(\t\022\035\n" - + "\025webhook_display_names\030\032 \003(\t\0224\n" - + "\021webhook_latencies\030\033 \003(\0132\031.google.protobuf.Duration\022\024\n" - + "\014webhook_tags\030\035 \003(\t\022,\n" + + " \003(\0132..google.cloud.dialogflow.cx.v3.ResponseMessage\022,\n" + "\020webhook_statuses\030\r" + " \003(\0132\022.google.rpc.Status\0221\n" + "\020webhook_payloads\030\006 \003(\0132\027.google.protobuf.Struct\0229\n" @@ -383,13 +393,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005match\030\017 \001(\0132$.google.cloud.dialogflow.cx.v3.Match\0220\n" + "\017diagnostic_info\030\n" + " \001(\0132\027.google.protobuf.Struct\022Y\n" - + "\031sentiment_analysis_result\030\021 \001(\01326.go" - + "ogle.cloud.dialogflow.cx.v3.SentimentAnalysisResult\022J\n" - + "\021advanced_settings\030\025 \001(\0132/" - + ".google.cloud.dialogflow.cx.v3.AdvancedSettings\022\035\n" + + "\031sentiment_analysis_result\030\021 \001(\01326.goog" + + "le.cloud.dialogflow.cx.v3.SentimentAnalysisResult\022J\n" + + "\021advanced_settings\030\025 \001(\0132/.g" + + "oogle.cloud.dialogflow.cx.v3.AdvancedSettings\022\035\n" + "\025allow_answer_feedback\030 \001(\010\022e\n" - + "\035data_store_connection_signals\030# \001(\01329." - + "google.cloud.dialogflow.cx.v3.DataStoreConnectionSignalsB\003\340A\001B\007\n" + + "\035data_store_connection_signals\030# \001(\01329.go" + + "ogle.cloud.dialogflow.cx.v3.DataStoreConnectionSignalsB\003\340A\001B\007\n" + "\005query\"\036\n" + "\tTextInput\022\021\n" + "\004text\030\001 \001(\tB\003\340A\002\"G\n" @@ -397,8 +407,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006intent\030\001 \001(\tB(\340A\002\372A\"\n" + " dialogflow.googleapis.com/Intent\"a\n\n" + "AudioInput\022D\n" - + "\006config\030\001" - + " \001(\0132/.google.cloud.dialogflow.cx.v3.InputAudioConfigB\003\340A\002\022\r\n" + + "\006config\030\001 " + + "\001(\0132/.google.cloud.dialogflow.cx.v3.InputAudioConfigB\003\340A\002\022\r\n" + "\005audio\030\002 \001(\014\"\033\n\n" + "EventInput\022\r\n" + "\005event\030\001 \001(\t\"1\n" @@ -410,8 +420,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005event\030\006 \001(\t\022+\n\n" + "parameters\030\002 \001(\0132\027.google.protobuf.Struct\022\026\n" + "\016resolved_input\030\003 \001(\t\022B\n\n" - + "match_type\030\004 " - + "\001(\0162..google.cloud.dialogflow.cx.v3.Match.MatchType\022\022\n\n" + + "match_type\030\004 \001(" + + "\0162..google.cloud.dialogflow.cx.v3.Match.MatchType\022\022\n\n" + "confidence\030\005 \001(\002\"\253\001\n" + "\tMatchType\022\032\n" + "\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n" @@ -426,8 +436,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022MatchIntentRequest\022:\n" + "\007session\030\001 \001(\tB)\340A\002\372A#\n" + "!dialogflow.googleapis.com/Session\022D\n" - + "\014query_params\030\002 \001(\0132..google." - + "cloud.dialogflow.cx.v3.QueryParameters\022C\n" + + "\014query_params\030\002" + + " \001(\0132..google.cloud.dialogflow.cx.v3.QueryParameters\022C\n" + "\013query_input\030\003" + " \001(\0132).google.cloud.dialogflow.cx.v3.QueryInputB\003\340A\002\022!\n" + "\031persist_parameter_changes\030\005 \001(\010\"\220\002\n" @@ -441,65 +451,69 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014current_page\030\005 \001(\0132#.google.cloud.dialogflow.cx.v3.PageB\007\n" + "\005query\"\353\001\n" + "\024FulfillIntentRequest\022O\n" - + "\024match_intent_request\030\001 \001(\01321.googl" - + "e.cloud.dialogflow.cx.v3.MatchIntentRequest\0223\n" + + "\024match_intent_request\030\001 \001(\01321.google." + + "cloud.dialogflow.cx.v3.MatchIntentRequest\0223\n" + "\005match\030\002 \001(\0132$.google.cloud.dialogflow.cx.v3.Match\022M\n" - + "\023output_audio_config\030\003" - + " \001(\01320.google.cloud.dialogflow.cx.v3.OutputAudioConfig\"\323\001\n" + + "\023output_audio_config\030\003 " + + "\001(\01320.google.cloud.dialogflow.cx.v3.OutputAudioConfig\"\323\001\n" + "\025FulfillIntentResponse\022\023\n" + "\013response_id\030\001 \001(\t\022@\n" - + "\014query_result\030\002" - + " \001(\0132*.google.cloud.dialogflow.cx.v3.QueryResult\022\024\n" + + "\014query_result\030\002 \001" + + "(\0132*.google.cloud.dialogflow.cx.v3.QueryResult\022\024\n" + "\014output_audio\030\003 \001(\014\022M\n" + "\023output_audio_config\030\004" + " \001(\01320.google.cloud.dialogflow.cx.v3.OutputAudioConfig\";\n" + "\027SentimentAnalysisResult\022\r\n" + "\005score\030\001 \001(\002\022\021\n" - + "\tmagnitude\030\002 \001(\0022\372\r\n" + + "\tmagnitude\030\002 \001(\002*\275\001\n" + + "\030DetectIntentResponseView\022+\n" + + "\'DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED\020\000\022$\n" + + " DETECT_INTENT_RESPONSE_VIEW_FULL\020\001\022%\n" + + "!DETECT_INTENT_RESPONSE_VIEW_BASIC\020\002\022\'\n" + + "#DETECT_INTENT_RESPONSE_VIEW_DEFAULT\020\0032\372\r\n" + "\010Sessions\022\246\002\n" - + "\014DetectIntent\0222.google.cloud.dialogflow.cx.v3.DetectI" - + "ntentRequest\0323.google.cloud.dialogflow.c" - + "x.v3.DetectIntentResponse\"\254\001\202\323\344\223\002\245\001\"E/v3" - + "/{session=projects/*/locations/*/agents/*/sessions/*}:detectIntent:\001*ZY\"T/v3/{se" - + "ssion=projects/*/locations/*/agents/*/en" - + "vironments/*/sessions/*}:detectIntent:\001*\022\325\002\n" - + "\033ServerStreamingDetectIntent\0222.google.cloud.dialogflow.cx.v3.DetectIntentReq" - + "uest\0323.google.cloud.dialogflow.cx.v3.Det" - + "ectIntentResponse\"\312\001\202\323\344\223\002\303\001\"T/v3/{sessio" - + "n=projects/*/locations/*/agents/*/sessions/*}:serverStreamingDetectIntent:\001*Zh\"c" - + "/v3/{session=projects/*/locations/*/agen" - + "ts/*/environments/*/sessions/*}:serverStreamingDetectIntent:\001*0\001\022\230\001\n" - + "\025StreamingDetectIntent\022;.google.cloud.dialogflow.cx." - + "v3.StreamingDetectIntentRequest\032<.google" - + ".cloud.dialogflow.cx.v3.StreamingDetectIntentResponse\"\000(\0010\001\022\241\002\n" - + "\013MatchIntent\0221.google.cloud.dialogflow.cx.v3.MatchIntentR" - + "equest\0322.google.cloud.dialogflow.cx.v3.M" - + "atchIntentResponse\"\252\001\202\323\344\223\002\243\001\"D/v3/{sessi" - + "on=projects/*/locations/*/agents/*/sessions/*}:matchIntent:\001*ZX\"S/v3/{session=pr" - + "ojects/*/locations/*/agents/*/environments/*/sessions/*}:matchIntent:\001*\022\325\002\n\r" - + "FulfillIntent\0223.google.cloud.dialogflow.cx.v" - + "3.FulfillIntentRequest\0324.google.cloud.di" - + "alogflow.cx.v3.FulfillIntentResponse\"\330\001\202" - + "\323\344\223\002\321\001\"[/v3/{match_intent_request.sessio" - + "n=projects/*/locations/*/agents/*/sessions/*}:fulfillIntent:\001*Zo\"j/v3/{match_int" - + "ent_request.session=projects/*/locations" - + "/*/agents/*/environments/*/sessions/*}:fulfillIntent:\001*\022\333\001\n" - + "\024SubmitAnswerFeedback\022:.google.cloud.dialogflow.cx.v3.SubmitA" - + "nswerFeedbackRequest\032-.google.cloud.dial" - + "ogflow.cx.v3.AnswerFeedback\"X\202\323\344\223\002R\"M/v3" - + "/{session=projects/*/locations/*/agents/" - + "*/sessions/*}:submitAnswerFeedback:\001*\032x\312" - + "A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,htt" - + "ps://www.googleapis.com/auth/dialogflowB\320\004\n" - + "!com.google.cloud.dialogflow.cx.v3B\014SessionProtoP\001Z1cloud.google.com/go/dialo" - + "gflow/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Google.C" - + "loud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3\352A\324\001\n" - + "!dialogflow.googleapis.com/Session\022Iprojects/{project}/loc" - + "ations/{location}/agents/{agent}/sessions/{session}\022dprojects/{project}/location" - + "s/{location}/agents/{agent}/environments/{environment}/sessions/{session}\352A\305\001\n" - + "(discoveryengine.googleapis.com/DataStore\022?projects/{project}/locations/{location}" - + "/dataStores/{data_store}\022Xprojects/{project}/locations/{location}/collections/{c" - + "ollection}/dataStores/{data_store}b\006proto3" + + "\014DetectIntent\0222.google.cloud.dialogflow.cx.v3.DetectIntentReque" + + "st\0323.google.cloud.dialogflow.cx.v3.Detec" + + "tIntentResponse\"\254\001\202\323\344\223\002\245\001\"E/v3/{session=" + + "projects/*/locations/*/agents/*/sessions/*}:detectIntent:\001*ZY\"T/v3/{session=proj" + + "ects/*/locations/*/agents/*/environments/*/sessions/*}:detectIntent:\001*\022\325\002\n" + + "\033ServerStreamingDetectIntent\0222.google.cloud.di" + + "alogflow.cx.v3.DetectIntentRequest\0323.google.cloud.dialogflow.cx.v3.DetectIntentR" + + "esponse\"\312\001\202\323\344\223\002\303\001\"T/v3/{session=projects" + + "/*/locations/*/agents/*/sessions/*}:serverStreamingDetectIntent:\001*Zh\"c/v3/{sessi" + + "on=projects/*/locations/*/agents/*/envir" + + "onments/*/sessions/*}:serverStreamingDetectIntent:\001*0\001\022\230\001\n" + + "\025StreamingDetectIntent\022;.google.cloud.dialogflow.cx.v3.Streami" + + "ngDetectIntentRequest\032<.google.cloud.dia" + + "logflow.cx.v3.StreamingDetectIntentResponse\"\000(\0010\001\022\241\002\n" + + "\013MatchIntent\0221.google.cloud.dialogflow.cx.v3.MatchIntentRequest\0322.g" + + "oogle.cloud.dialogflow.cx.v3.MatchIntent" + + "Response\"\252\001\202\323\344\223\002\243\001\"D/v3/{session=project" + + "s/*/locations/*/agents/*/sessions/*}:matchIntent:\001*ZX\"S/v3/{session=projects/*/l" + + "ocations/*/agents/*/environments/*/sessions/*}:matchIntent:\001*\022\325\002\n\r" + + "FulfillIntent\0223.google.cloud.dialogflow.cx.v3.FulfillI" + + "ntentRequest\0324.google.cloud.dialogflow.c" + + "x.v3.FulfillIntentResponse\"\330\001\202\323\344\223\002\321\001\"[/v" + + "3/{match_intent_request.session=projects/*/locations/*/agents/*/sessions/*}:fulf" + + "illIntent:\001*Zo\"j/v3/{match_intent_request.session=projects/*/locations/*/agents/" + + "*/environments/*/sessions/*}:fulfillIntent:\001*\022\333\001\n" + + "\024SubmitAnswerFeedback\022:.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedb" + + "ackRequest\032-.google.cloud.dialogflow.cx." + + "v3.AnswerFeedback\"X\202\323\344\223\002R\"M/v3/{session=" + + "projects/*/locations/*/agents/*/sessions" + + "/*}:submitAnswerFeedback:\001*\032x\312A\031dialogfl" + + "ow.googleapis.com\322AYhttps://www.googleap" + + "is.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\320\004\n" + + "!com.google.cloud.dialogflow.cx.v3B\014SessionProt" + + "oP\001Z1cloud.google.com/go/dialogflow/cx/a" + + "piv3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud.Dialo" + + "gflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3\352A\324\001\n" + + "!dialogflow.googleapis.com/Session\022Iprojects/{project}/locations/{lo" + + "cation}/agents/{agent}/sessions/{session}\022dprojects/{project}/locations/{locatio" + + "n}/agents/{agent}/environments/{environment}/sessions/{session}\352A\305\001\n" + + "(discoveryengine.googleapis.com/DataStore\022?projects/" + + "{project}/locations/{location}/dataStores/{data_store}\022Xprojects/{project}/locat" + + "ions/{location}/collections/{collection}/dataStores/{data_store}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -513,10 +527,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.AudioConfigProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.SessionEntityTypeProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.ToolCallProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), @@ -555,7 +571,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_DetectIntentRequest_descriptor, new java.lang.String[] { - "Session", "QueryParams", "QueryInput", "OutputAudioConfig", + "Session", "QueryParams", "QueryInput", "OutputAudioConfig", "ResponseView", }); internal_static_google_cloud_dialogflow_cx_v3_DetectIntentResponse_descriptor = getDescriptor().getMessageTypes().get(3); @@ -582,6 +598,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OutputAudioConfig", "EnablePartialResponse", "EnableDebuggingInfo", + "ResponseView", }); internal_static_google_cloud_dialogflow_cx_v3_CloudConversationDebuggingInfo_descriptor = getDescriptor().getMessageTypes().get(5); @@ -642,11 +659,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SessionEntityTypes", "Payload", "Parameters", + "ParameterScope", "CurrentPage", "DisableWebhook", "AnalyzeQueryTextSentiment", "WebhookHeaders", "FlowVersions", + "CurrentPlaybook", + "LlmModelSettings", "Channel", "SessionTtl", "EndUserMetadata", @@ -729,7 +749,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_QueryInput_descriptor, new java.lang.String[] { - "Text", "Intent", "Audio", "Event", "Dtmf", "LanguageCode", "Input", + "Text", "Intent", "Audio", "Event", "Dtmf", "ToolCallResult", "LanguageCode", "Input", }); internal_static_google_cloud_dialogflow_cx_v3_QueryResult_descriptor = getDescriptor().getMessageTypes().get(14); @@ -745,10 +765,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCode", "Parameters", "ResponseMessages", - "WebhookIds", - "WebhookDisplayNames", - "WebhookLatencies", - "WebhookTags", "WebhookStatuses", "WebhookPayloads", "CurrentPage", @@ -875,10 +891,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3.AudioConfigProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.DataStoreConnectionProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.SessionEntityTypeProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.ToolCallProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequest.java index fe9bd3c31a77..e31ae6b345cd 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequest.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequest.java @@ -73,6 +73,7 @@ private StreamingDetectIntentRequest(com.google.protobuf.GeneratedMessageV3.Buil private StreamingDetectIntentRequest() { session_ = ""; + responseView_ = 0; } @java.lang.Override @@ -391,6 +392,53 @@ public boolean getEnableDebuggingInfo() { return enableDebuggingInfo_; } + public static final int RESPONSE_VIEW_FIELD_NUMBER = 16; + private int responseView_ = 0; + + /** + * + * + *
+   * Optional. Specifies which fields in the
+   * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+   * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseView. + */ + @java.lang.Override + public int getResponseViewValue() { + return responseView_; + } + + /** + * + * + *
+   * Optional. Specifies which fields in the
+   * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+   * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseView. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView getResponseView() { + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView result = + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView.forNumber(responseView_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -423,6 +471,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableDebuggingInfo_ != false) { output.writeBool(8, enableDebuggingInfo_); } + if (responseView_ + != com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView + .DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(16, responseView_); + } getUnknownFields().writeTo(output); } @@ -450,6 +504,12 @@ public int getSerializedSize() { if (enableDebuggingInfo_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, enableDebuggingInfo_); } + if (responseView_ + != com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView + .DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, responseView_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -481,6 +541,7 @@ public boolean equals(final java.lang.Object obj) { } if (getEnablePartialResponse() != other.getEnablePartialResponse()) return false; if (getEnableDebuggingInfo() != other.getEnableDebuggingInfo()) return false; + if (responseView_ != other.responseView_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -510,6 +571,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePartialResponse()); hash = (37 * hash) + ENABLE_DEBUGGING_INFO_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDebuggingInfo()); + hash = (37 * hash) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -712,6 +775,7 @@ public Builder clear() { } enablePartialResponse_ = false; enableDebuggingInfo_ = false; + responseView_ = 0; return this; } @@ -776,6 +840,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000020) != 0)) { result.enableDebuggingInfo_ = enableDebuggingInfo_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.responseView_ = responseView_; + } result.bitField0_ |= to_bitField0_; } @@ -846,6 +913,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.StreamingDetectIntent if (other.getEnableDebuggingInfo() != false) { setEnableDebuggingInfo(other.getEnableDebuggingInfo()); } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -909,6 +979,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 64 + case 128: + { + responseView_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 128 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1853,6 +1929,124 @@ public Builder clearEnableDebuggingInfo() { return this; } + private int responseView_ = 0; + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseView. + */ + @java.lang.Override + public int getResponseViewValue() { + return responseView_; + } + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for responseView to set. + * @return This builder for chaining. + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseView. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView getResponseView() { + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView result = + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView.forNumber(responseView_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The responseView to set. + * @return This builder for chaining. + */ + public Builder setResponseView( + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + responseView_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies which fields in the
+     * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+     * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearResponseView() { + bitField0_ = (bitField0_ & ~0x00000040); + responseView_ = 0; + 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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequestOrBuilder.java index 309a95e5fe27..ad974daf03fa 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequestOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingDetectIntentRequestOrBuilder.java @@ -229,4 +229,38 @@ public interface StreamingDetectIntentRequestOrBuilder * @return The enableDebuggingInfo. */ boolean getEnableDebuggingInfo(); + + /** + * + * + *
+   * Optional. Specifies which fields in the
+   * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+   * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseView. + */ + int getResponseViewValue(); + + /** + * + * + *
+   * Optional. Specifies which fields in the
+   * [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not
+   * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.DetectIntentResponseView response_view = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseView. + */ + com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView getResponseView(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Tool.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Tool.java new file mode 100644 index 000000000000..3785c1311441 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Tool.java @@ -0,0 +1,18845 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * A tool provides a list of actions which are available to the
+ * [Playbook][google.cloud.dialogflow.cx.v3.Playbook] to attain its goal. A Tool
+ * consists of a description of the tool's usage and a specification of the tool
+ * which contains the schema and authentication information.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool} + */ +public final class Tool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool) + ToolOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Tool.newBuilder() to construct. + private Tool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Tool() { + name_ = ""; + displayName_ = ""; + description_ = ""; + toolType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Tool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.class, + com.google.cloud.dialogflow.cx.v3.Tool.Builder.class); + } + + /** + * + * + *
+   * Represents the type of the tool.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Tool.ToolType} + */ + public enum ToolType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * TOOL_TYPE_UNSPECIFIED = 0; + */ + TOOL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Customer provided tool.
+     * 
+ * + * CUSTOMIZED_TOOL = 1; + */ + CUSTOMIZED_TOOL(1), + /** + * + * + *
+     * First party built-in tool created by Dialogflow which cannot be modified.
+     * 
+ * + * BUILTIN_TOOL = 2; + */ + BUILTIN_TOOL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * TOOL_TYPE_UNSPECIFIED = 0; + */ + public static final int TOOL_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Customer provided tool.
+     * 
+ * + * CUSTOMIZED_TOOL = 1; + */ + public static final int CUSTOMIZED_TOOL_VALUE = 1; + + /** + * + * + *
+     * First party built-in tool created by Dialogflow which cannot be modified.
+     * 
+ * + * BUILTIN_TOOL = 2; + */ + public static final int BUILTIN_TOOL_VALUE = 2; + + 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 ToolType 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 ToolType forNumber(int value) { + switch (value) { + case 0: + return TOOL_TYPE_UNSPECIFIED; + case 1: + return CUSTOMIZED_TOOL; + case 2: + return BUILTIN_TOOL; + 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 ToolType findValueByNumber(int number) { + return ToolType.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.v3.Tool.getDescriptor().getEnumTypes().get(0); + } + + private static final ToolType[] VALUES = values(); + + public static ToolType 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 ToolType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Tool.ToolType) + } + + public interface OpenApiToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the textSchema field is set. + */ + boolean hasTextSchema(); + + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textSchema. + */ + java.lang.String getTextSchema(); + + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textSchema. + */ + com.google.protobuf.ByteString getTextSchemaBytes(); + + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the authentication field is set. + */ + boolean hasAuthentication(); + + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authentication. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication getAuthentication(); + + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.AuthenticationOrBuilder getAuthenticationOrBuilder(); + + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tlsConfig field is set. + */ + boolean hasTlsConfig(); + + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tlsConfig. + */ + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig getTlsConfig(); + + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfigOrBuilder getTlsConfigOrBuilder(); + + /** + * + * + *
+     * Optional. Service Directory configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceDirectoryConfig field is set. + */ + boolean hasServiceDirectoryConfig(); + + /** + * + * + *
+     * Optional. Service Directory configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceDirectoryConfig. + */ + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig getServiceDirectoryConfig(); + + /** + * + * + *
+     * Optional. Service Directory configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfigOrBuilder + getServiceDirectoryConfigOrBuilder(); + + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.SchemaCase getSchemaCase(); + } + + /** + * + * + *
+   * An OpenAPI tool is a way to provide the Tool specifications in the Open API
+   * schema format.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.OpenApiTool} + */ + public static final class OpenApiTool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) + OpenApiToolOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OpenApiTool.newBuilder() to construct. + private OpenApiTool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpenApiTool() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpenApiTool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.class, + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.Builder.class); + } + + private int bitField0_; + private int schemaCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object schema_; + + public enum SchemaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT_SCHEMA(1), + SCHEMA_NOT_SET(0); + private final int value; + + private SchemaCase(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 SchemaCase valueOf(int value) { + return forNumber(value); + } + + public static SchemaCase forNumber(int value) { + switch (value) { + case 1: + return TEXT_SCHEMA; + case 0: + return SCHEMA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public static final int TEXT_SCHEMA_FIELD_NUMBER = 1; + + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the textSchema field is set. + */ + public boolean hasTextSchema() { + return schemaCase_ == 1; + } + + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textSchema. + */ + public java.lang.String getTextSchema() { + java.lang.Object ref = ""; + if (schemaCase_ == 1) { + ref = schema_; + } + 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 (schemaCase_ == 1) { + schema_ = s; + } + return s; + } + } + + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textSchema. + */ + public com.google.protobuf.ByteString getTextSchemaBytes() { + java.lang.Object ref = ""; + if (schemaCase_ == 1) { + ref = schema_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (schemaCase_ == 1) { + schema_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHENTICATION_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.Tool.Authentication authentication_; + + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the authentication field is set. + */ + @java.lang.Override + public boolean hasAuthentication() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authentication. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication getAuthentication() { + return authentication_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.getDefaultInstance() + : authentication_; + } + + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.AuthenticationOrBuilder + getAuthenticationOrBuilder() { + return authentication_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.getDefaultInstance() + : authentication_; + } + + public static final int TLS_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig tlsConfig_; + + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tlsConfig field is set. + */ + @java.lang.Override + public boolean hasTlsConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tlsConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig getTlsConfig() { + return tlsConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.getDefaultInstance() + : tlsConfig_; + } + + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfigOrBuilder getTlsConfigOrBuilder() { + return tlsConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.getDefaultInstance() + : tlsConfig_; + } + + public static final int SERVICE_DIRECTORY_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig serviceDirectoryConfig_; + + /** + * + * + *
+     * Optional. Service Directory configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceDirectoryConfig field is set. + */ + @java.lang.Override + public boolean hasServiceDirectoryConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Service Directory configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceDirectoryConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + getServiceDirectoryConfig() { + return serviceDirectoryConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.getDefaultInstance() + : serviceDirectoryConfig_; + } + + /** + * + * + *
+     * Optional. Service Directory configuration.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfigOrBuilder + getServiceDirectoryConfigOrBuilder() { + return serviceDirectoryConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.getDefaultInstance() + : serviceDirectoryConfig_; + } + + 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 (schemaCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAuthentication()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getTlsConfig()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getServiceDirectoryConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (schemaCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAuthentication()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTlsConfig()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getServiceDirectoryConfig()); + } + 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.v3.Tool.OpenApiTool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool other = + (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) obj; + + if (hasAuthentication() != other.hasAuthentication()) return false; + if (hasAuthentication()) { + if (!getAuthentication().equals(other.getAuthentication())) return false; + } + if (hasTlsConfig() != other.hasTlsConfig()) return false; + if (hasTlsConfig()) { + if (!getTlsConfig().equals(other.getTlsConfig())) return false; + } + if (hasServiceDirectoryConfig() != other.hasServiceDirectoryConfig()) return false; + if (hasServiceDirectoryConfig()) { + if (!getServiceDirectoryConfig().equals(other.getServiceDirectoryConfig())) return false; + } + if (!getSchemaCase().equals(other.getSchemaCase())) return false; + switch (schemaCase_) { + case 1: + if (!getTextSchema().equals(other.getTextSchema())) 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(); + if (hasAuthentication()) { + hash = (37 * hash) + AUTHENTICATION_FIELD_NUMBER; + hash = (53 * hash) + getAuthentication().hashCode(); + } + if (hasTlsConfig()) { + hash = (37 * hash) + TLS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTlsConfig().hashCode(); + } + if (hasServiceDirectoryConfig()) { + hash = (37 * hash) + SERVICE_DIRECTORY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceDirectoryConfig().hashCode(); + } + switch (schemaCase_) { + case 1: + hash = (37 * hash) + TEXT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getTextSchema().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool 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.v3.Tool.OpenApiTool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool 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.v3.Tool.OpenApiTool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool 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.v3.Tool.OpenApiTool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool 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.v3.Tool.OpenApiTool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool 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.v3.Tool.OpenApiTool 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.v3.Tool.OpenApiTool 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.v3.Tool.OpenApiTool 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; + } + + /** + * + * + *
+     * An OpenAPI tool is a way to provide the Tool specifications in the Open API
+     * schema format.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.OpenApiTool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.class, + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAuthenticationFieldBuilder(); + getTlsConfigFieldBuilder(); + getServiceDirectoryConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + authentication_ = null; + if (authenticationBuilder_ != null) { + authenticationBuilder_.dispose(); + authenticationBuilder_ = null; + } + tlsConfig_ = null; + if (tlsConfigBuilder_ != null) { + tlsConfigBuilder_.dispose(); + tlsConfigBuilder_ = null; + } + serviceDirectoryConfig_ = null; + if (serviceDirectoryConfigBuilder_ != null) { + serviceDirectoryConfigBuilder_.dispose(); + serviceDirectoryConfigBuilder_ = null; + } + schemaCase_ = 0; + schema_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool build() { + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool result = + new com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authentication_ = + authenticationBuilder_ == null ? authentication_ : authenticationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tlsConfig_ = tlsConfigBuilder_ == null ? tlsConfig_ : tlsConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.serviceDirectoryConfig_ = + serviceDirectoryConfigBuilder_ == null + ? serviceDirectoryConfig_ + : serviceDirectoryConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool result) { + result.schemaCase_ = schemaCase_; + result.schema_ = this.schema_; + } + + @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.v3.Tool.OpenApiTool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool other) { + if (other == com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance()) + return this; + if (other.hasAuthentication()) { + mergeAuthentication(other.getAuthentication()); + } + if (other.hasTlsConfig()) { + mergeTlsConfig(other.getTlsConfig()); + } + if (other.hasServiceDirectoryConfig()) { + mergeServiceDirectoryConfig(other.getServiceDirectoryConfig()); + } + switch (other.getSchemaCase()) { + case TEXT_SCHEMA: + { + schemaCase_ = 1; + schema_ = other.schema_; + onChanged(); + break; + } + case SCHEMA_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(); + schemaCase_ = 1; + schema_ = s; + break; + } // case 10 + case 18: + { + input.readMessage( + getAuthenticationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getTlsConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getServiceDirectoryConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 schemaCase_ = 0; + private java.lang.Object schema_; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public Builder clearSchema() { + schemaCase_ = 0; + schema_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the textSchema field is set. + */ + @java.lang.Override + public boolean hasTextSchema() { + return schemaCase_ == 1; + } + + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textSchema. + */ + @java.lang.Override + public java.lang.String getTextSchema() { + java.lang.Object ref = ""; + if (schemaCase_ == 1) { + ref = schema_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (schemaCase_ == 1) { + schema_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextSchemaBytes() { + java.lang.Object ref = ""; + if (schemaCase_ == 1) { + ref = schema_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (schemaCase_ == 1) { + schema_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The textSchema to set. + * @return This builder for chaining. + */ + public Builder setTextSchema(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + schemaCase_ = 1; + schema_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTextSchema() { + if (schemaCase_ == 1) { + schemaCase_ = 0; + schema_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for textSchema to set. + * @return This builder for chaining. + */ + public Builder setTextSchemaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaCase_ = 1; + schema_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Tool.Authentication authentication_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.AuthenticationOrBuilder> + authenticationBuilder_; + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the authentication field is set. + */ + public boolean hasAuthentication() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authentication. + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication getAuthentication() { + if (authenticationBuilder_ == null) { + return authentication_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.getDefaultInstance() + : authentication_; + } else { + return authenticationBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuthentication( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication value) { + if (authenticationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authentication_ = value; + } else { + authenticationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuthentication( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.Builder builderForValue) { + if (authenticationBuilder_ == null) { + authentication_ = builderForValue.build(); + } else { + authenticationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAuthentication( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication value) { + if (authenticationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && authentication_ != null + && authentication_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.getDefaultInstance()) { + getAuthenticationBuilder().mergeFrom(value); + } else { + authentication_ = value; + } + } else { + authenticationBuilder_.mergeFrom(value); + } + if (authentication_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAuthentication() { + bitField0_ = (bitField0_ & ~0x00000002); + authentication_ = null; + if (authenticationBuilder_ != null) { + authenticationBuilder_.dispose(); + authenticationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.Builder + getAuthenticationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAuthenticationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.AuthenticationOrBuilder + getAuthenticationOrBuilder() { + if (authenticationBuilder_ != null) { + return authenticationBuilder_.getMessageOrBuilder(); + } else { + return authentication_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.getDefaultInstance() + : authentication_; + } + } + + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.AuthenticationOrBuilder> + getAuthenticationFieldBuilder() { + if (authenticationBuilder_ == null) { + authenticationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.AuthenticationOrBuilder>( + getAuthentication(), getParentForChildren(), isClean()); + authentication_ = null; + } + return authenticationBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig tlsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfigOrBuilder> + tlsConfigBuilder_; + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tlsConfig field is set. + */ + public boolean hasTlsConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tlsConfig. + */ + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig getTlsConfig() { + if (tlsConfigBuilder_ == null) { + return tlsConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.getDefaultInstance() + : tlsConfig_; + } else { + return tlsConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTlsConfig(com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig value) { + if (tlsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tlsConfig_ = value; + } else { + tlsConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTlsConfig( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.Builder builderForValue) { + if (tlsConfigBuilder_ == null) { + tlsConfig_ = builderForValue.build(); + } else { + tlsConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTlsConfig(com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig value) { + if (tlsConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && tlsConfig_ != null + && tlsConfig_ + != com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.getDefaultInstance()) { + getTlsConfigBuilder().mergeFrom(value); + } else { + tlsConfig_ = value; + } + } else { + tlsConfigBuilder_.mergeFrom(value); + } + if (tlsConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTlsConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + tlsConfig_ = null; + if (tlsConfigBuilder_ != null) { + tlsConfigBuilder_.dispose(); + tlsConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.Builder getTlsConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTlsConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfigOrBuilder getTlsConfigOrBuilder() { + if (tlsConfigBuilder_ != null) { + return tlsConfigBuilder_.getMessageOrBuilder(); + } else { + return tlsConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.getDefaultInstance() + : tlsConfig_; + } + } + + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfigOrBuilder> + getTlsConfigFieldBuilder() { + if (tlsConfigBuilder_ == null) { + tlsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfigOrBuilder>( + getTlsConfig(), getParentForChildren(), isClean()); + tlsConfig_ = null; + } + return tlsConfigBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig serviceDirectoryConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig, + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfigOrBuilder> + serviceDirectoryConfigBuilder_; + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceDirectoryConfig field is set. + */ + public boolean hasServiceDirectoryConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceDirectoryConfig. + */ + public com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + getServiceDirectoryConfig() { + if (serviceDirectoryConfigBuilder_ == null) { + return serviceDirectoryConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.getDefaultInstance() + : serviceDirectoryConfig_; + } else { + return serviceDirectoryConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceDirectoryConfig( + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig value) { + if (serviceDirectoryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceDirectoryConfig_ = value; + } else { + serviceDirectoryConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceDirectoryConfig( + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.Builder builderForValue) { + if (serviceDirectoryConfigBuilder_ == null) { + serviceDirectoryConfig_ = builderForValue.build(); + } else { + serviceDirectoryConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeServiceDirectoryConfig( + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig value) { + if (serviceDirectoryConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && serviceDirectoryConfig_ != null + && serviceDirectoryConfig_ + != com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + .getDefaultInstance()) { + getServiceDirectoryConfigBuilder().mergeFrom(value); + } else { + serviceDirectoryConfig_ = value; + } + } else { + serviceDirectoryConfigBuilder_.mergeFrom(value); + } + if (serviceDirectoryConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearServiceDirectoryConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + serviceDirectoryConfig_ = null; + if (serviceDirectoryConfigBuilder_ != null) { + serviceDirectoryConfigBuilder_.dispose(); + serviceDirectoryConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.Builder + getServiceDirectoryConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getServiceDirectoryConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfigOrBuilder + getServiceDirectoryConfigOrBuilder() { + if (serviceDirectoryConfigBuilder_ != null) { + return serviceDirectoryConfigBuilder_.getMessageOrBuilder(); + } else { + return serviceDirectoryConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.getDefaultInstance() + : serviceDirectoryConfig_; + } + } + + /** + * + * + *
+       * Optional. Service Directory configuration.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig, + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfigOrBuilder> + getServiceDirectoryConfigFieldBuilder() { + if (serviceDirectoryConfigBuilder_ == null) { + serviceDirectoryConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig, + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfigOrBuilder>( + getServiceDirectoryConfig(), getParentForChildren(), isClean()); + serviceDirectoryConfig_ = null; + } + return serviceDirectoryConfigBuilder_; + } + + @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.v3.Tool.OpenApiTool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) + private static final com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenApiTool 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.v3.Tool.OpenApiTool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataStoreToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getDataStoreConnectionsList(); + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.DataStoreConnection getDataStoreConnections(int index); + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getDataStoreConnectionsCount(); + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getDataStoreConnectionsOrBuilderList(); + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder getDataStoreConnectionsOrBuilder( + int index); + + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fallbackPrompt field is set. + */ + boolean hasFallbackPrompt(); + + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fallbackPrompt. + */ + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt getFallbackPrompt(); + + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPromptOrBuilder + getFallbackPromptOrBuilder(); + } + + /** + * + * + *
+   * A DataStoreTool is a way to provide specifications needed to search a
+   * list of data stores.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.DataStoreTool} + */ + public static final class DataStoreTool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) + DataStoreToolOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DataStoreTool.newBuilder() to construct. + private DataStoreTool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataStoreTool() { + dataStoreConnections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataStoreTool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.class, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.Builder.class); + } + + public interface FallbackPromptOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
+     * A FallbackPrompt is a way to provide specifications for the Data Store
+     * fallback prompt when generating responses.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt} + */ + public static final class FallbackPrompt extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt) + FallbackPromptOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FallbackPrompt.newBuilder() to construct. + private FallbackPrompt(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FallbackPrompt() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FallbackPrompt(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.class, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.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.v3.Tool.DataStoreTool.FallbackPrompt)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt other = + (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt) 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.v3.Tool.DataStoreTool.FallbackPrompt parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt 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.v3.Tool.DataStoreTool.FallbackPrompt parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt 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.v3.Tool.DataStoreTool.FallbackPrompt parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt 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.v3.Tool.DataStoreTool.FallbackPrompt parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt 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.v3.Tool.DataStoreTool.FallbackPrompt + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + 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.v3.Tool.DataStoreTool.FallbackPrompt 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.v3.Tool.DataStoreTool.FallbackPrompt 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.v3.Tool.DataStoreTool.FallbackPrompt 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; + } + + /** + * + * + *
+       * A FallbackPrompt is a way to provide specifications for the Data Store
+       * fallback prompt when generating responses.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt) + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPromptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.class, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.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.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt build() { + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt result = + new com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt(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.v3.Tool.DataStoreTool.FallbackPrompt) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + .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.v3.Tool.DataStoreTool.FallbackPrompt) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt) + private static final com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FallbackPrompt 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.v3.Tool.DataStoreTool.FallbackPrompt + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DATA_STORE_CONNECTIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + dataStoreConnections_; + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getDataStoreConnectionsList() { + return dataStoreConnections_; + } + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getDataStoreConnectionsOrBuilderList() { + return dataStoreConnections_; + } + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getDataStoreConnectionsCount() { + return dataStoreConnections_.size(); + } + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection getDataStoreConnections( + int index) { + return dataStoreConnections_.get(index); + } + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index) { + return dataStoreConnections_.get(index); + } + + public static final int FALLBACK_PROMPT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallbackPrompt_; + + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fallbackPrompt field is set. + */ + @java.lang.Override + public boolean hasFallbackPrompt() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fallbackPrompt. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt getFallbackPrompt() { + return fallbackPrompt_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.getDefaultInstance() + : fallbackPrompt_; + } + + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPromptOrBuilder + getFallbackPromptOrBuilder() { + return fallbackPrompt_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.getDefaultInstance() + : fallbackPrompt_; + } + + 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 < dataStoreConnections_.size(); i++) { + output.writeMessage(1, dataStoreConnections_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getFallbackPrompt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataStoreConnections_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, dataStoreConnections_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFallbackPrompt()); + } + 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.v3.Tool.DataStoreTool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool other = + (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) obj; + + if (!getDataStoreConnectionsList().equals(other.getDataStoreConnectionsList())) return false; + if (hasFallbackPrompt() != other.hasFallbackPrompt()) return false; + if (hasFallbackPrompt()) { + if (!getFallbackPrompt().equals(other.getFallbackPrompt())) 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 (getDataStoreConnectionsCount() > 0) { + hash = (37 * hash) + DATA_STORE_CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreConnectionsList().hashCode(); + } + if (hasFallbackPrompt()) { + hash = (37 * hash) + FALLBACK_PROMPT_FIELD_NUMBER; + hash = (53 * hash) + getFallbackPrompt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool 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.v3.Tool.DataStoreTool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool 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.v3.Tool.DataStoreTool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool 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.v3.Tool.DataStoreTool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool 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.v3.Tool.DataStoreTool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool 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.v3.Tool.DataStoreTool 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.v3.Tool.DataStoreTool 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.v3.Tool.DataStoreTool 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; + } + + /** + * + * + *
+     * A DataStoreTool is a way to provide specifications needed to search a
+     * list of data stores.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.DataStoreTool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.class, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataStoreConnectionsFieldBuilder(); + getFallbackPromptFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnections_ = java.util.Collections.emptyList(); + } else { + dataStoreConnections_ = null; + dataStoreConnectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + fallbackPrompt_ = null; + if (fallbackPromptBuilder_ != null) { + fallbackPromptBuilder_.dispose(); + fallbackPromptBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool build() { + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool result = + new com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool result) { + if (dataStoreConnectionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataStoreConnections_ = java.util.Collections.unmodifiableList(dataStoreConnections_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataStoreConnections_ = dataStoreConnections_; + } else { + result.dataStoreConnections_ = dataStoreConnectionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fallbackPrompt_ = + fallbackPromptBuilder_ == null ? fallbackPrompt_ : fallbackPromptBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.Tool.DataStoreTool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool other) { + if (other == com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance()) + return this; + if (dataStoreConnectionsBuilder_ == null) { + if (!other.dataStoreConnections_.isEmpty()) { + if (dataStoreConnections_.isEmpty()) { + dataStoreConnections_ = other.dataStoreConnections_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.addAll(other.dataStoreConnections_); + } + onChanged(); + } + } else { + if (!other.dataStoreConnections_.isEmpty()) { + if (dataStoreConnectionsBuilder_.isEmpty()) { + dataStoreConnectionsBuilder_.dispose(); + dataStoreConnectionsBuilder_ = null; + dataStoreConnections_ = other.dataStoreConnections_; + bitField0_ = (bitField0_ & ~0x00000001); + dataStoreConnectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataStoreConnectionsFieldBuilder() + : null; + } else { + dataStoreConnectionsBuilder_.addAllMessages(other.dataStoreConnections_); + } + } + } + if (other.hasFallbackPrompt()) { + mergeFallbackPrompt(other.getFallbackPrompt()); + } + 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: + { + com.google.cloud.dialogflow.cx.v3.DataStoreConnection m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.parser(), + extensionRegistry); + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(m); + } else { + dataStoreConnectionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 26: + { + input.readMessage( + getFallbackPromptFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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 java.util.List + dataStoreConnections_ = java.util.Collections.emptyList(); + + private void ensureDataStoreConnectionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataStoreConnections_ = + new java.util.ArrayList( + dataStoreConnections_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder> + dataStoreConnectionsBuilder_; + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDataStoreConnectionsList() { + if (dataStoreConnectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataStoreConnections_); + } else { + return dataStoreConnectionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getDataStoreConnectionsCount() { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.size(); + } else { + return dataStoreConnectionsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection getDataStoreConnections( + int index) { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.get(index); + } else { + return dataStoreConnectionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.set(index, value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataStoreConnections( + int index, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.set(index, builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDataStoreConnections( + com.google.cloud.dialogflow.cx.v3.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(index, value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDataStoreConnections( + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDataStoreConnections( + int index, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(index, builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllDataStoreConnections( + java.lang.Iterable + values) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreConnections_); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataStoreConnections() { + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataStoreConnectionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeDataStoreConnections(int index) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.remove(index); + onChanged(); + } else { + dataStoreConnectionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder + getDataStoreConnectionsBuilder(int index) { + return getDataStoreConnectionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index) { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.get(index); + } else { + return dataStoreConnectionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder> + getDataStoreConnectionsOrBuilderList() { + if (dataStoreConnectionsBuilder_ != null) { + return dataStoreConnectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataStoreConnections_); + } + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder + addDataStoreConnectionsBuilder() { + return getDataStoreConnectionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.DataStoreConnection.getDefaultInstance()); + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder + addDataStoreConnectionsBuilder(int index) { + return getDataStoreConnectionsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.DataStoreConnection.getDefaultInstance()); + } + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDataStoreConnectionsBuilderList() { + return getDataStoreConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder> + getDataStoreConnectionsFieldBuilder() { + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3.DataStoreConnectionOrBuilder>( + dataStoreConnections_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataStoreConnections_ = null; + } + return dataStoreConnectionsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallbackPrompt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPromptOrBuilder> + fallbackPromptBuilder_; + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fallbackPrompt field is set. + */ + public boolean hasFallbackPrompt() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fallbackPrompt. + */ + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + getFallbackPrompt() { + if (fallbackPromptBuilder_ == null) { + return fallbackPrompt_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance() + : fallbackPrompt_; + } else { + return fallbackPromptBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFallbackPrompt( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt value) { + if (fallbackPromptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fallbackPrompt_ = value; + } else { + fallbackPromptBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFallbackPrompt( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.Builder + builderForValue) { + if (fallbackPromptBuilder_ == null) { + fallbackPrompt_ = builderForValue.build(); + } else { + fallbackPromptBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFallbackPrompt( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt value) { + if (fallbackPromptBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && fallbackPrompt_ != null + && fallbackPrompt_ + != com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance()) { + getFallbackPromptBuilder().mergeFrom(value); + } else { + fallbackPrompt_ = value; + } + } else { + fallbackPromptBuilder_.mergeFrom(value); + } + if (fallbackPrompt_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFallbackPrompt() { + bitField0_ = (bitField0_ & ~0x00000002); + fallbackPrompt_ = null; + if (fallbackPromptBuilder_ != null) { + fallbackPromptBuilder_.dispose(); + fallbackPromptBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.Builder + getFallbackPromptBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFallbackPromptFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPromptOrBuilder + getFallbackPromptOrBuilder() { + if (fallbackPromptBuilder_ != null) { + return fallbackPromptBuilder_.getMessageOrBuilder(); + } else { + return fallbackPrompt_ == null + ? com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance() + : fallbackPrompt_; + } + } + + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPromptOrBuilder> + getFallbackPromptFieldBuilder() { + if (fallbackPromptBuilder_ == null) { + fallbackPromptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPromptOrBuilder>( + getFallbackPrompt(), getParentForChildren(), isClean()); + fallbackPrompt_ = null; + } + return fallbackPromptBuilder_; + } + + @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.v3.Tool.DataStoreTool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) + private static final com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataStoreTool 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.v3.Tool.DataStoreTool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FunctionToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.FunctionTool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputSchema field is set. + */ + boolean hasInputSchema(); + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputSchema. + */ + com.google.protobuf.Struct getInputSchema(); + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder(); + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputSchema field is set. + */ + boolean hasOutputSchema(); + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputSchema. + */ + com.google.protobuf.Struct getOutputSchema(); + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder(); + } + + /** + * + * + *
+   * A Function tool describes the functions to be invoked on the client side.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.FunctionTool} + */ + public static final class FunctionTool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.FunctionTool) + FunctionToolOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FunctionTool.newBuilder() to construct. + private FunctionTool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FunctionTool() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FunctionTool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.class, + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.Builder.class); + } + + private int bitField0_; + public static final int INPUT_SCHEMA_FIELD_NUMBER = 1; + private com.google.protobuf.Struct inputSchema_; + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputSchema field is set. + */ + @java.lang.Override + public boolean hasInputSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputSchema. + */ + @java.lang.Override + public com.google.protobuf.Struct getInputSchema() { + return inputSchema_ == null ? com.google.protobuf.Struct.getDefaultInstance() : inputSchema_; + } + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder() { + return inputSchema_ == null ? com.google.protobuf.Struct.getDefaultInstance() : inputSchema_; + } + + public static final int OUTPUT_SCHEMA_FIELD_NUMBER = 2; + private com.google.protobuf.Struct outputSchema_; + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputSchema field is set. + */ + @java.lang.Override + public boolean hasOutputSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputSchema. + */ + @java.lang.Override + public com.google.protobuf.Struct getOutputSchema() { + return outputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputSchema_; + } + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder() { + return outputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputSchema_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInputSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getOutputSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutputSchema()); + } + 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.v3.Tool.FunctionTool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool other = + (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) obj; + + if (hasInputSchema() != other.hasInputSchema()) return false; + if (hasInputSchema()) { + if (!getInputSchema().equals(other.getInputSchema())) return false; + } + if (hasOutputSchema() != other.hasOutputSchema()) return false; + if (hasOutputSchema()) { + if (!getOutputSchema().equals(other.getOutputSchema())) 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 (hasInputSchema()) { + hash = (37 * hash) + INPUT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getInputSchema().hashCode(); + } + if (hasOutputSchema()) { + hash = (37 * hash) + OUTPUT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getOutputSchema().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool 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.v3.Tool.FunctionTool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool 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.v3.Tool.FunctionTool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool 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.v3.Tool.FunctionTool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool 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.v3.Tool.FunctionTool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool 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.v3.Tool.FunctionTool 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.v3.Tool.FunctionTool 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.v3.Tool.FunctionTool 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; + } + + /** + * + * + *
+     * A Function tool describes the functions to be invoked on the client side.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.FunctionTool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.FunctionTool) + com.google.cloud.dialogflow.cx.v3.Tool.FunctionToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.class, + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputSchemaFieldBuilder(); + getOutputSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inputSchema_ = null; + if (inputSchemaBuilder_ != null) { + inputSchemaBuilder_.dispose(); + inputSchemaBuilder_ = null; + } + outputSchema_ = null; + if (outputSchemaBuilder_ != null) { + outputSchemaBuilder_.dispose(); + outputSchemaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool build() { + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool result = + new com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inputSchema_ = + inputSchemaBuilder_ == null ? inputSchema_ : inputSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.outputSchema_ = + outputSchemaBuilder_ == null ? outputSchema_ : outputSchemaBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.Tool.FunctionTool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool other) { + if (other == com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance()) + return this; + if (other.hasInputSchema()) { + mergeInputSchema(other.getInputSchema()); + } + if (other.hasOutputSchema()) { + mergeOutputSchema(other.getOutputSchema()); + } + 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: + { + input.readMessage(getInputSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getOutputSchemaFieldBuilder().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.Struct inputSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + inputSchemaBuilder_; + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputSchema field is set. + */ + public boolean hasInputSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputSchema. + */ + public com.google.protobuf.Struct getInputSchema() { + if (inputSchemaBuilder_ == null) { + return inputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputSchema_; + } else { + return inputSchemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputSchema(com.google.protobuf.Struct value) { + if (inputSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputSchema_ = value; + } else { + inputSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputSchema(com.google.protobuf.Struct.Builder builderForValue) { + if (inputSchemaBuilder_ == null) { + inputSchema_ = builderForValue.build(); + } else { + inputSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInputSchema(com.google.protobuf.Struct value) { + if (inputSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && inputSchema_ != null + && inputSchema_ != com.google.protobuf.Struct.getDefaultInstance()) { + getInputSchemaBuilder().mergeFrom(value); + } else { + inputSchema_ = value; + } + } else { + inputSchemaBuilder_.mergeFrom(value); + } + if (inputSchema_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + inputSchema_ = null; + if (inputSchemaBuilder_ != null) { + inputSchemaBuilder_.dispose(); + inputSchemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getInputSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInputSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder() { + if (inputSchemaBuilder_ != null) { + return inputSchemaBuilder_.getMessageOrBuilder(); + } else { + return inputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputSchema_; + } + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInputSchemaFieldBuilder() { + if (inputSchemaBuilder_ == null) { + inputSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInputSchema(), getParentForChildren(), isClean()); + inputSchema_ = null; + } + return inputSchemaBuilder_; + } + + private com.google.protobuf.Struct outputSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + outputSchemaBuilder_; + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputSchema field is set. + */ + public boolean hasOutputSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputSchema. + */ + public com.google.protobuf.Struct getOutputSchema() { + if (outputSchemaBuilder_ == null) { + return outputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputSchema_; + } else { + return outputSchemaBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputSchema(com.google.protobuf.Struct value) { + if (outputSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputSchema_ = value; + } else { + outputSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputSchema(com.google.protobuf.Struct.Builder builderForValue) { + if (outputSchemaBuilder_ == null) { + outputSchema_ = builderForValue.build(); + } else { + outputSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOutputSchema(com.google.protobuf.Struct value) { + if (outputSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && outputSchema_ != null + && outputSchema_ != com.google.protobuf.Struct.getDefaultInstance()) { + getOutputSchemaBuilder().mergeFrom(value); + } else { + outputSchema_ = value; + } + } else { + outputSchemaBuilder_.mergeFrom(value); + } + if (outputSchema_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOutputSchema() { + bitField0_ = (bitField0_ & ~0x00000002); + outputSchema_ = null; + if (outputSchemaBuilder_ != null) { + outputSchemaBuilder_.dispose(); + outputSchemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getOutputSchemaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOutputSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder() { + if (outputSchemaBuilder_ != null) { + return outputSchemaBuilder_.getMessageOrBuilder(); + } else { + return outputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputSchema_; + } + } + + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getOutputSchemaFieldBuilder() { + if (outputSchemaBuilder_ == null) { + outputSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getOutputSchema(), getParentForChildren(), isClean()); + outputSchema_ = null; + } + return outputSchemaBuilder_; + } + + @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.v3.Tool.FunctionTool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.FunctionTool) + private static final com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionTool 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.v3.Tool.FunctionTool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AuthenticationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.Authentication) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return Whether the apiKeyConfig field is set. + */ + boolean hasApiKeyConfig(); + + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return The apiKeyConfig. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig getApiKeyConfig(); + + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfigOrBuilder + getApiKeyConfigOrBuilder(); + + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * @return Whether the oauthConfig field is set. + */ + boolean hasOauthConfig(); + + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * @return The oauthConfig. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig getOauthConfig(); + + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfigOrBuilder + getOauthConfigOrBuilder(); + + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return Whether the serviceAgentAuthConfig field is set. + */ + boolean hasServiceAgentAuthConfig(); + + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return The serviceAgentAuthConfig. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + getServiceAgentAuthConfig(); + + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfigOrBuilder + getServiceAgentAuthConfigOrBuilder(); + + /** + * + * + *
+     * Config for bearer token auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + * + * @return Whether the bearerTokenConfig field is set. + */ + boolean hasBearerTokenConfig(); + + /** + * + * + *
+     * Config for bearer token auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + * + * @return The bearerTokenConfig. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig getBearerTokenConfig(); + + /** + * + * + *
+     * Config for bearer token auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfigOrBuilder + getBearerTokenConfigOrBuilder(); + + /** + * + * + *
+     * Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + * + * @return Whether the serviceAccountAuthConfig field is set. + */ + boolean hasServiceAccountAuthConfig(); + + /** + * + * + *
+     * Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + * + * @return The serviceAccountAuthConfig. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + getServiceAccountAuthConfig(); + + /** + * + * + *
+     * Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfigOrBuilder + getServiceAccountAuthConfigOrBuilder(); + + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.AuthConfigCase getAuthConfigCase(); + } + + /** + * + * + *
+   * Authentication information required for API calls
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.Authentication} + */ + public static final class Authentication extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication) + AuthenticationOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Authentication.newBuilder() to construct. + private Authentication(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Authentication() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Authentication(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.Builder.class); + } + + /** + * + * + *
+     * The location of the API key in the request.
+     * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation} + */ + public enum RequestLocation implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value. This value is unused.
+       * 
+ * + * REQUEST_LOCATION_UNSPECIFIED = 0; + */ + REQUEST_LOCATION_UNSPECIFIED(0), + /** + * + * + *
+       * Represents the key in http header.
+       * 
+ * + * HEADER = 1; + */ + HEADER(1), + /** + * + * + *
+       * Represents the key in query string.
+       * 
+ * + * QUERY_STRING = 2; + */ + QUERY_STRING(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Default value. This value is unused.
+       * 
+ * + * REQUEST_LOCATION_UNSPECIFIED = 0; + */ + public static final int REQUEST_LOCATION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Represents the key in http header.
+       * 
+ * + * HEADER = 1; + */ + public static final int HEADER_VALUE = 1; + + /** + * + * + *
+       * Represents the key in query string.
+       * 
+ * + * QUERY_STRING = 2; + */ + public static final int QUERY_STRING_VALUE = 2; + + 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 RequestLocation 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 RequestLocation forNumber(int value) { + switch (value) { + case 0: + return REQUEST_LOCATION_UNSPECIFIED; + case 1: + return HEADER; + case 2: + return QUERY_STRING; + 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 RequestLocation findValueByNumber(int number) { + return RequestLocation.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.v3.Tool.Authentication.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RequestLocation[] VALUES = values(); + + public static RequestLocation 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 RequestLocation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation) + } + + public interface ApiKeyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The parameter name or the header name of the API key.
+       * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+       * KEY>", "X-Api-Key" would be the parameter name.
+       * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyName. + */ + java.lang.String getKeyName(); + + /** + * + * + *
+       * Required. The parameter name or the header name of the API key.
+       * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+       * KEY>", "X-Api-Key" would be the parameter name.
+       * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyName. + */ + com.google.protobuf.ByteString getKeyNameBytes(); + + /** + * + * + *
+       * Optional. The API key. If the `secret_version_for_api_key` field is
+       * set, this field will be ignored.
+       * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The apiKey. + */ + java.lang.String getApiKey(); + + /** + * + * + *
+       * Optional. The API key. If the `secret_version_for_api_key` field is
+       * set, this field will be ignored.
+       * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for apiKey. + */ + com.google.protobuf.ByteString getApiKeyBytes(); + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the API key. If this field is set, the `api_key` field will be ignored.
+       * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForApiKey. + */ + java.lang.String getSecretVersionForApiKey(); + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the API key. If this field is set, the `api_key` field will be ignored.
+       * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForApiKey. + */ + com.google.protobuf.ByteString getSecretVersionForApiKeyBytes(); + + /** + * + * + *
+       * Required. Key location in the request.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for requestLocation. + */ + int getRequestLocationValue(); + + /** + * + * + *
+       * Required. Key location in the request.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestLocation. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation getRequestLocation(); + } + + /** + * + * + *
+     * Config for authentication with API key.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig} + */ + public static final class ApiKeyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) + ApiKeyConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ApiKeyConfig.newBuilder() to construct. + private ApiKeyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApiKeyConfig() { + keyName_ = ""; + apiKey_ = ""; + secretVersionForApiKey_ = ""; + requestLocation_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApiKeyConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.Builder.class); + } + + public static final int KEY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object keyName_ = ""; + + /** + * + * + *
+       * Required. The parameter name or the header name of the API key.
+       * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+       * KEY>", "X-Api-Key" would be the parameter name.
+       * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyName. + */ + @java.lang.Override + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + 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(); + keyName_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. The parameter name or the header name of the API key.
+       * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+       * KEY>", "X-Api-Key" would be the parameter name.
+       * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_KEY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiKey_ = ""; + + /** + * + * + *
+       * Optional. The API key. If the `secret_version_for_api_key` field is
+       * set, this field will be ignored.
+       * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The apiKey. + */ + @java.lang.Override + public java.lang.String getApiKey() { + java.lang.Object ref = apiKey_; + 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(); + apiKey_ = s; + return s; + } + } + + /** + * + * + *
+       * Optional. The API key. If the `secret_version_for_api_key` field is
+       * set, this field will be ignored.
+       * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for apiKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiKeyBytes() { + java.lang.Object ref = apiKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_VERSION_FOR_API_KEY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object secretVersionForApiKey_ = ""; + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the API key. If this field is set, the `api_key` field will be ignored.
+       * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForApiKey. + */ + @java.lang.Override + public java.lang.String getSecretVersionForApiKey() { + java.lang.Object ref = secretVersionForApiKey_; + 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(); + secretVersionForApiKey_ = s; + return s; + } + } + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the API key. If this field is set, the `api_key` field will be ignored.
+       * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForApiKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretVersionForApiKeyBytes() { + java.lang.Object ref = secretVersionForApiKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForApiKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_LOCATION_FIELD_NUMBER = 3; + private int requestLocation_ = 0; + + /** + * + * + *
+       * Required. Key location in the request.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for requestLocation. + */ + @java.lang.Override + public int getRequestLocationValue() { + return requestLocation_; + } + + /** + * + * + *
+       * Required. Key location in the request.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestLocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation + getRequestLocation() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation result = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation.forNumber( + requestLocation_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation.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(keyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, apiKey_); + } + if (requestLocation_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation + .REQUEST_LOCATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, requestLocation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersionForApiKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, secretVersionForApiKey_); + } + 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(keyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, apiKey_); + } + if (requestLocation_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation + .REQUEST_LOCATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, requestLocation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersionForApiKey_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(4, secretVersionForApiKey_); + } + 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.v3.Tool.Authentication.ApiKeyConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig other = + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) obj; + + if (!getKeyName().equals(other.getKeyName())) return false; + if (!getApiKey().equals(other.getApiKey())) return false; + if (!getSecretVersionForApiKey().equals(other.getSecretVersionForApiKey())) return false; + if (requestLocation_ != other.requestLocation_) 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) + KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKeyName().hashCode(); + hash = (37 * hash) + API_KEY_FIELD_NUMBER; + hash = (53 * hash) + getApiKey().hashCode(); + hash = (37 * hash) + SECRET_VERSION_FOR_API_KEY_FIELD_NUMBER; + hash = (53 * hash) + getSecretVersionForApiKey().hashCode(); + hash = (37 * hash) + REQUEST_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + requestLocation_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig 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.v3.Tool.Authentication.ApiKeyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig 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.v3.Tool.Authentication.ApiKeyConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig 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.v3.Tool.Authentication.ApiKeyConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig 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.v3.Tool.Authentication.ApiKeyConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + 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.v3.Tool.Authentication.ApiKeyConfig 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.v3.Tool.Authentication.ApiKeyConfig 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.v3.Tool.Authentication.ApiKeyConfig 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; + } + + /** + * + * + *
+       * Config for authentication with API key.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyName_ = ""; + apiKey_ = ""; + secretVersionForApiKey_ = ""; + requestLocation_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig build() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig result = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyName_ = keyName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.apiKey_ = apiKey_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.secretVersionForApiKey_ = secretVersionForApiKey_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestLocation_ = requestLocation_; + } + } + + @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.v3.Tool.Authentication.ApiKeyConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance()) return this; + if (!other.getKeyName().isEmpty()) { + keyName_ = other.keyName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getApiKey().isEmpty()) { + apiKey_ = other.apiKey_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSecretVersionForApiKey().isEmpty()) { + secretVersionForApiKey_ = other.secretVersionForApiKey_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.requestLocation_ != 0) { + setRequestLocationValue(other.getRequestLocationValue()); + } + 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: + { + keyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + apiKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + requestLocation_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + secretVersionForApiKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + 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 java.lang.Object keyName_ = ""; + + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyName. + */ + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyName. + */ + public com.google.protobuf.ByteString getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKeyName() { + keyName_ = getDefaultInstance().getKeyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object apiKey_ = ""; + + /** + * + * + *
+         * Optional. The API key. If the `secret_version_for_api_key` field is
+         * set, this field will be ignored.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The apiKey. + */ + public java.lang.String getApiKey() { + java.lang.Object ref = apiKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Optional. The API key. If the `secret_version_for_api_key` field is
+         * set, this field will be ignored.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for apiKey. + */ + public com.google.protobuf.ByteString getApiKeyBytes() { + java.lang.Object ref = apiKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Optional. The API key. If the `secret_version_for_api_key` field is
+         * set, this field will be ignored.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The apiKey to set. + * @return This builder for chaining. + */ + public Builder setApiKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The API key. If the `secret_version_for_api_key` field is
+         * set, this field will be ignored.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearApiKey() { + apiKey_ = getDefaultInstance().getApiKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The API key. If the `secret_version_for_api_key` field is
+         * set, this field will be ignored.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for apiKey to set. + * @return This builder for chaining. + */ + public Builder setApiKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object secretVersionForApiKey_ = ""; + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the API key. If this field is set, the `api_key` field will be ignored.
+         * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForApiKey. + */ + public java.lang.String getSecretVersionForApiKey() { + java.lang.Object ref = secretVersionForApiKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretVersionForApiKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the API key. If this field is set, the `api_key` field will be ignored.
+         * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForApiKey. + */ + public com.google.protobuf.ByteString getSecretVersionForApiKeyBytes() { + java.lang.Object ref = secretVersionForApiKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForApiKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the API key. If this field is set, the `api_key` field will be ignored.
+         * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The secretVersionForApiKey to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionForApiKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + secretVersionForApiKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the API key. If this field is set, the `api_key` field will be ignored.
+         * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSecretVersionForApiKey() { + secretVersionForApiKey_ = getDefaultInstance().getSecretVersionForApiKey(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the API key. If this field is set, the `api_key` field will be ignored.
+         * Format: `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for secretVersionForApiKey to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionForApiKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + secretVersionForApiKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int requestLocation_ = 0; + + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for requestLocation. + */ + @java.lang.Override + public int getRequestLocationValue() { + return requestLocation_; + } + + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for requestLocation to set. + * @return This builder for chaining. + */ + public Builder setRequestLocationValue(int value) { + requestLocation_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestLocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation + getRequestLocation() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation result = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation.forNumber( + requestLocation_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation.UNRECOGNIZED + : result; + } + + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The requestLocation to set. + * @return This builder for chaining. + */ + public Builder setRequestLocation( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + requestLocation_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearRequestLocation() { + bitField0_ = (bitField0_ & ~0x00000008); + requestLocation_ = 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.v3.Tool.Authentication.ApiKeyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) + private static final com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiKeyConfig 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.v3.Tool.Authentication.ApiKeyConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OAuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. OAuth grant types.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for oauthGrantType. + */ + int getOauthGrantTypeValue(); + + /** + * + * + *
+       * Required. OAuth grant types.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oauthGrantType. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + getOauthGrantType(); + + /** + * + * + *
+       * Required. The client ID from the OAuth provider.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + java.lang.String getClientId(); + + /** + * + * + *
+       * Required. The client ID from the OAuth provider.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString getClientIdBytes(); + + /** + * + * + *
+       * Optional. The client secret from the OAuth provider. If the
+       * `secret_version_for_client_secret` field is set, this field will be
+       * ignored.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientSecret. + */ + java.lang.String getClientSecret(); + + /** + * + * + *
+       * Optional. The client secret from the OAuth provider. If the
+       * `secret_version_for_client_secret` field is set, this field will be
+       * ignored.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientSecret. + */ + com.google.protobuf.ByteString getClientSecretBytes(); + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the client secret. If this field is set, the `client_secret` field will
+       * be ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForClientSecret. + */ + java.lang.String getSecretVersionForClientSecret(); + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the client secret. If this field is set, the `client_secret` field will
+       * be ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForClientSecret. + */ + com.google.protobuf.ByteString getSecretVersionForClientSecretBytes(); + + /** + * + * + *
+       * Required. The token endpoint in the OAuth provider to exchange for an
+       * access token.
+       * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + java.lang.String getTokenEndpoint(); + + /** + * + * + *
+       * Required. The token endpoint in the OAuth provider to exchange for an
+       * access token.
+       * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + com.google.protobuf.ByteString getTokenEndpointBytes(); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + int getScopesCount(); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); + } + + /** + * + * + *
+     * Config for authentication with OAuth.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig} + */ + public static final class OAuthConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) + OAuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OAuthConfig.newBuilder() to construct. + private OAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OAuthConfig() { + oauthGrantType_ = 0; + clientId_ = ""; + clientSecret_ = ""; + secretVersionForClientSecret_ = ""; + tokenEndpoint_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OAuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.Builder.class); + } + + /** + * + * + *
+       * OAuth grant types. Only [client credential
+       * grant](https://oauth.net/2/grant-types/client-credentials) is
+       * supported.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType} + */ + public enum OauthGrantType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Default value. This value is unused.
+         * 
+ * + * OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + */ + OAUTH_GRANT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * Represents the [client credential
+         * flow](https://oauth.net/2/grant-types/client-credentials).
+         * 
+ * + * CLIENT_CREDENTIAL = 1; + */ + CLIENT_CREDENTIAL(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Default value. This value is unused.
+         * 
+ * + * OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + */ + public static final int OAUTH_GRANT_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+         * Represents the [client credential
+         * flow](https://oauth.net/2/grant-types/client-credentials).
+         * 
+ * + * CLIENT_CREDENTIAL = 1; + */ + public static final int CLIENT_CREDENTIAL_VALUE = 1; + + 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 OauthGrantType 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 OauthGrantType forNumber(int value) { + switch (value) { + case 0: + return OAUTH_GRANT_TYPE_UNSPECIFIED; + case 1: + return CLIENT_CREDENTIAL; + 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 OauthGrantType findValueByNumber(int number) { + return OauthGrantType.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.v3.Tool.Authentication.OAuthConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final OauthGrantType[] VALUES = values(); + + public static OauthGrantType 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 OauthGrantType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType) + } + + public static final int OAUTH_GRANT_TYPE_FIELD_NUMBER = 1; + private int oauthGrantType_ = 0; + + /** + * + * + *
+       * Required. OAuth grant types.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for oauthGrantType. + */ + @java.lang.Override + public int getOauthGrantTypeValue() { + return oauthGrantType_; + } + + /** + * + * + *
+       * Required. OAuth grant types.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oauthGrantType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + getOauthGrantType() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType result = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + .forNumber(oauthGrantType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + .UNRECOGNIZED + : result; + } + + public static final int CLIENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; + + /** + * + * + *
+       * Required. The client ID from the OAuth provider.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + 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(); + clientId_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. The client ID from the OAuth provider.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_SECRET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientSecret_ = ""; + + /** + * + * + *
+       * Optional. The client secret from the OAuth provider. If the
+       * `secret_version_for_client_secret` field is set, this field will be
+       * ignored.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientSecret. + */ + @java.lang.Override + public java.lang.String getClientSecret() { + java.lang.Object ref = clientSecret_; + 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(); + clientSecret_ = s; + return s; + } + } + + /** + * + * + *
+       * Optional. The client secret from the OAuth provider. If the
+       * `secret_version_for_client_secret` field is set, this field will be
+       * ignored.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientSecretBytes() { + java.lang.Object ref = clientSecret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_VERSION_FOR_CLIENT_SECRET_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object secretVersionForClientSecret_ = ""; + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the client secret. If this field is set, the `client_secret` field will
+       * be ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForClientSecret. + */ + @java.lang.Override + public java.lang.String getSecretVersionForClientSecret() { + java.lang.Object ref = secretVersionForClientSecret_; + 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(); + secretVersionForClientSecret_ = s; + return s; + } + } + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the client secret. If this field is set, the `client_secret` field will
+       * be ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForClientSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretVersionForClientSecretBytes() { + java.lang.Object ref = secretVersionForClientSecret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForClientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_ENDPOINT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object tokenEndpoint_ = ""; + + /** + * + * + *
+       * Required. The token endpoint in the OAuth provider to exchange for an
+       * access token.
+       * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + @java.lang.Override + public java.lang.String getTokenEndpoint() { + java.lang.Object ref = tokenEndpoint_; + 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(); + tokenEndpoint_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. The token endpoint in the OAuth provider to exchange for an
+       * access token.
+       * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTokenEndpointBytes() { + java.lang.Object ref = tokenEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tokenEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.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 { + if (oauthGrantType_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + .OAUTH_GRANT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, oauthGrantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clientSecret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tokenEndpoint_); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, scopes_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersionForClientSecret_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 6, secretVersionForClientSecret_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oauthGrantType_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + .OAUTH_GRANT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, oauthGrantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clientSecret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tokenEndpoint_); + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersionForClientSecret_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 6, secretVersionForClientSecret_); + } + 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.v3.Tool.Authentication.OAuthConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig other = + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) obj; + + if (oauthGrantType_ != other.oauthGrantType_) return false; + if (!getClientId().equals(other.getClientId())) return false; + if (!getClientSecret().equals(other.getClientSecret())) return false; + if (!getSecretVersionForClientSecret().equals(other.getSecretVersionForClientSecret())) + return false; + if (!getTokenEndpoint().equals(other.getTokenEndpoint())) return false; + if (!getScopesList().equals(other.getScopesList())) 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) + OAUTH_GRANT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + oauthGrantType_; + hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getClientId().hashCode(); + hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getClientSecret().hashCode(); + hash = (37 * hash) + SECRET_VERSION_FOR_CLIENT_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getSecretVersionForClientSecret().hashCode(); + hash = (37 * hash) + TOKEN_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getTokenEndpoint().hashCode(); + if (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig 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.v3.Tool.Authentication.OAuthConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig 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.v3.Tool.Authentication.OAuthConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig 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.v3.Tool.Authentication.OAuthConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig 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.v3.Tool.Authentication.OAuthConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + 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.v3.Tool.Authentication.OAuthConfig 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.v3.Tool.Authentication.OAuthConfig 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.v3.Tool.Authentication.OAuthConfig 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; + } + + /** + * + * + *
+       * Config for authentication with OAuth.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + oauthGrantType_ = 0; + clientId_ = ""; + clientSecret_ = ""; + secretVersionForClientSecret_ = ""; + tokenEndpoint_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig build() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig result = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.oauthGrantType_ = oauthGrantType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.clientSecret_ = clientSecret_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.secretVersionForClientSecret_ = secretVersionForClientSecret_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.tokenEndpoint_ = tokenEndpoint_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + scopes_.makeImmutable(); + result.scopes_ = scopes_; + } + } + + @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.v3.Tool.Authentication.OAuthConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + .getDefaultInstance()) return this; + if (other.oauthGrantType_ != 0) { + setOauthGrantTypeValue(other.getOauthGrantTypeValue()); + } + if (!other.getClientId().isEmpty()) { + clientId_ = other.clientId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getClientSecret().isEmpty()) { + clientSecret_ = other.clientSecret_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getSecretVersionForClientSecret().isEmpty()) { + secretVersionForClientSecret_ = other.secretVersionForClientSecret_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getTokenEndpoint().isEmpty()) { + tokenEndpoint_ = other.tokenEndpoint_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ |= 0x00000020; + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + 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: + { + oauthGrantType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + clientSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + tokenEndpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + break; + } // case 42 + case 50: + { + secretVersionForClientSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 50 + 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 int oauthGrantType_ = 0; + + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for oauthGrantType. + */ + @java.lang.Override + public int getOauthGrantTypeValue() { + return oauthGrantType_; + } + + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for oauthGrantType to set. + * @return This builder for chaining. + */ + public Builder setOauthGrantTypeValue(int value) { + oauthGrantType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oauthGrantType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + getOauthGrantType() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType result = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + .forNumber(oauthGrantType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The oauthGrantType to set. + * @return This builder for chaining. + */ + public Builder setOauthGrantType( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + oauthGrantType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearOauthGrantType() { + bitField0_ = (bitField0_ & ~0x00000001); + oauthGrantType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object clientId_ = ""; + + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClientId() { + clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object clientSecret_ = ""; + + /** + * + * + *
+         * Optional. The client secret from the OAuth provider. If the
+         * `secret_version_for_client_secret` field is set, this field will be
+         * ignored.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientSecret. + */ + public java.lang.String getClientSecret() { + java.lang.Object ref = clientSecret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientSecret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Optional. The client secret from the OAuth provider. If the
+         * `secret_version_for_client_secret` field is set, this field will be
+         * ignored.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientSecret. + */ + public com.google.protobuf.ByteString getClientSecretBytes() { + java.lang.Object ref = clientSecret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Optional. The client secret from the OAuth provider. If the
+         * `secret_version_for_client_secret` field is set, this field will be
+         * ignored.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The clientSecret to set. + * @return This builder for chaining. + */ + public Builder setClientSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientSecret_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The client secret from the OAuth provider. If the
+         * `secret_version_for_client_secret` field is set, this field will be
+         * ignored.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClientSecret() { + clientSecret_ = getDefaultInstance().getClientSecret(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The client secret from the OAuth provider. If the
+         * `secret_version_for_client_secret` field is set, this field will be
+         * ignored.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for clientSecret to set. + * @return This builder for chaining. + */ + public Builder setClientSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientSecret_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object secretVersionForClientSecret_ = ""; + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForClientSecret. + */ + public java.lang.String getSecretVersionForClientSecret() { + java.lang.Object ref = secretVersionForClientSecret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretVersionForClientSecret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForClientSecret. + */ + public com.google.protobuf.ByteString getSecretVersionForClientSecretBytes() { + java.lang.Object ref = secretVersionForClientSecret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForClientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The secretVersionForClientSecret to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionForClientSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + secretVersionForClientSecret_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSecretVersionForClientSecret() { + secretVersionForClientSecret_ = getDefaultInstance().getSecretVersionForClientSecret(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for secretVersionForClientSecret to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionForClientSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + secretVersionForClientSecret_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object tokenEndpoint_ = ""; + + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + public java.lang.String getTokenEndpoint() { + java.lang.Object ref = tokenEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + public com.google.protobuf.ByteString getTokenEndpointBytes() { + java.lang.Object ref = tokenEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tokenEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tokenEndpoint to set. + * @return This builder for chaining. + */ + public Builder setTokenEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tokenEndpoint_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTokenEndpoint() { + tokenEndpoint_ = getDefaultInstance().getTokenEndpoint(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tokenEndpoint to set. + * @return This builder for chaining. + */ + public Builder setTokenEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tokenEndpoint_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureScopesIsMutable() { + if (!scopes_.isModifiable()) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + scopes_.makeImmutable(); + return scopes_; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000020; + 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.v3.Tool.Authentication.OAuthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) + private static final com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OAuthConfig 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.v3.Tool.Authentication.OAuthConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceAgentAuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. Indicate the auth token type generated from the [Diglogflow
+       * service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * The generated token is sent in the Authorization header.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for serviceAgentAuth. + */ + int getServiceAgentAuthValue(); + + /** + * + * + *
+       * Optional. Indicate the auth token type generated from the [Diglogflow
+       * service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * The generated token is sent in the Authorization header.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAgentAuth. + */ + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth + getServiceAgentAuth(); + } + + /** + * + * + *
+     * Config for auth using [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig} + */ + public static final class ServiceAgentAuthConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + ServiceAgentAuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ServiceAgentAuthConfig.newBuilder() to construct. + private ServiceAgentAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceAgentAuthConfig() { + serviceAgentAuth_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServiceAgentAuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.Builder + .class); + } + + /** + * + * + *
+       * Indicate the auth token type generated from the [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * Protobuf enum {@code + * google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth} + */ + public enum ServiceAgentAuth implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Service agent auth type unspecified. Default to ID_TOKEN.
+         * 
+ * + * SERVICE_AGENT_AUTH_UNSPECIFIED = 0; + */ + SERVICE_AGENT_AUTH_UNSPECIFIED(0), + /** + * + * + *
+         * Use [ID
+         * token](https://cloud.google.com/docs/authentication/token-types#id)
+         * generated from service agent. This can be used to access Cloud
+         * Function and Cloud Run after you grant Invoker role to
+         * `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
+         * 
+ * + * ID_TOKEN = 1; + */ + ID_TOKEN(1), + /** + * + * + *
+         * Use [access
+         * token](https://cloud.google.com/docs/authentication/token-types#access)
+         * generated from service agent. This can be used to access other Google
+         * Cloud APIs after you grant required roles to
+         * `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
+         * 
+ * + * ACCESS_TOKEN = 2; + */ + ACCESS_TOKEN(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Service agent auth type unspecified. Default to ID_TOKEN.
+         * 
+ * + * SERVICE_AGENT_AUTH_UNSPECIFIED = 0; + */ + public static final int SERVICE_AGENT_AUTH_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+         * Use [ID
+         * token](https://cloud.google.com/docs/authentication/token-types#id)
+         * generated from service agent. This can be used to access Cloud
+         * Function and Cloud Run after you grant Invoker role to
+         * `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
+         * 
+ * + * ID_TOKEN = 1; + */ + public static final int ID_TOKEN_VALUE = 1; + + /** + * + * + *
+         * Use [access
+         * token](https://cloud.google.com/docs/authentication/token-types#access)
+         * generated from service agent. This can be used to access other Google
+         * Cloud APIs after you grant required roles to
+         * `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
+         * 
+ * + * ACCESS_TOKEN = 2; + */ + public static final int ACCESS_TOKEN_VALUE = 2; + + 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 ServiceAgentAuth 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 ServiceAgentAuth forNumber(int value) { + switch (value) { + case 0: + return SERVICE_AGENT_AUTH_UNSPECIFIED; + case 1: + return ID_TOKEN; + case 2: + return ACCESS_TOKEN; + 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 ServiceAgentAuth findValueByNumber(int number) { + return ServiceAgentAuth.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.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ServiceAgentAuth[] VALUES = values(); + + public static ServiceAgentAuth 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 ServiceAgentAuth(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth) + } + + public static final int SERVICE_AGENT_AUTH_FIELD_NUMBER = 1; + private int serviceAgentAuth_ = 0; + + /** + * + * + *
+       * Optional. Indicate the auth token type generated from the [Diglogflow
+       * service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * The generated token is sent in the Authorization header.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for serviceAgentAuth. + */ + @java.lang.Override + public int getServiceAgentAuthValue() { + return serviceAgentAuth_; + } + + /** + * + * + *
+       * Optional. Indicate the auth token type generated from the [Diglogflow
+       * service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * The generated token is sent in the Authorization header.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAgentAuth. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth + getServiceAgentAuth() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth + result = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth.forNumber(serviceAgentAuth_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth.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 (serviceAgentAuth_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth.SERVICE_AGENT_AUTH_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, serviceAgentAuth_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (serviceAgentAuth_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth.SERVICE_AGENT_AUTH_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, serviceAgentAuth_); + } + 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.v3.Tool.Authentication.ServiceAgentAuthConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig other = + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) obj; + + if (serviceAgentAuth_ != other.serviceAgentAuth_) 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) + SERVICE_AGENT_AUTH_FIELD_NUMBER; + hash = (53 * hash) + serviceAgentAuth_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + 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.v3.Tool.Authentication.ServiceAgentAuthConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + 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.v3.Tool.Authentication.ServiceAgentAuthConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + 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.v3.Tool.Authentication.ServiceAgentAuthConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + 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.v3.Tool.Authentication.ServiceAgentAuthConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + 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.v3.Tool.Authentication.ServiceAgentAuthConfig + 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.v3.Tool.Authentication.ServiceAgentAuthConfig + 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.v3.Tool.Authentication.ServiceAgentAuthConfig 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; + } + + /** + * + * + *
+       * Config for auth using [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceAgentAuth_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + build() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig result = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceAgentAuth_ = serviceAgentAuth_; + } + } + + @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.v3.Tool.Authentication.ServiceAgentAuthConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance()) return this; + if (other.serviceAgentAuth_ != 0) { + setServiceAgentAuthValue(other.getServiceAgentAuthValue()); + } + 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: + { + serviceAgentAuth_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 int serviceAgentAuth_ = 0; + + /** + * + * + *
+         * Optional. Indicate the auth token type generated from the [Diglogflow
+         * service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * The generated token is sent in the Authorization header.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for serviceAgentAuth. + */ + @java.lang.Override + public int getServiceAgentAuthValue() { + return serviceAgentAuth_; + } + + /** + * + * + *
+         * Optional. Indicate the auth token type generated from the [Diglogflow
+         * service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * The generated token is sent in the Authorization header.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for serviceAgentAuth to set. + * @return This builder for chaining. + */ + public Builder setServiceAgentAuthValue(int value) { + serviceAgentAuth_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. Indicate the auth token type generated from the [Diglogflow
+         * service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * The generated token is sent in the Authorization header.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAgentAuth. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth + getServiceAgentAuth() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth + result = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth.forNumber(serviceAgentAuth_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth.UNRECOGNIZED + : result; + } + + /** + * + * + *
+         * Optional. Indicate the auth token type generated from the [Diglogflow
+         * service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * The generated token is sent in the Authorization header.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The serviceAgentAuth to set. + * @return This builder for chaining. + */ + public Builder setServiceAgentAuth( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .ServiceAgentAuth + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + serviceAgentAuth_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. Indicate the auth token type generated from the [Diglogflow
+         * service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * The generated token is sent in the Authorization header.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServiceAgentAuth() { + bitField0_ = (bitField0_ & ~0x00000001); + serviceAgentAuth_ = 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.v3.Tool.Authentication.ServiceAgentAuthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + private static final com.google.cloud.dialogflow.cx.v3.Tool.Authentication + .ServiceAgentAuthConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceAgentAuthConfig 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.v3.Tool.Authentication.ServiceAgentAuthConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BearerTokenConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. The text token appended to the text `Bearer` to the request
+       * Authorization header.
+       * [Session parameters
+       * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+       * can be used to pass the token dynamically, e.g.
+       * `$session.params.parameter-id`.
+       * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The token. + */ + java.lang.String getToken(); + + /** + * + * + *
+       * Optional. The text token appended to the text `Bearer` to the request
+       * Authorization header.
+       * [Session parameters
+       * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+       * can be used to pass the token dynamically, e.g.
+       * `$session.params.parameter-id`.
+       * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for token. + */ + com.google.protobuf.ByteString getTokenBytes(); + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the Bearer token. If this field is set, the `token` field will be
+       * ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForToken. + */ + java.lang.String getSecretVersionForToken(); + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the Bearer token. If this field is set, the `token` field will be
+       * ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForToken. + */ + com.google.protobuf.ByteString getSecretVersionForTokenBytes(); + } + + /** + * + * + *
+     * Config for authentication using bearer token.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig} + */ + public static final class BearerTokenConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + BearerTokenConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use BearerTokenConfig.newBuilder() to construct. + private BearerTokenConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BearerTokenConfig() { + token_ = ""; + secretVersionForToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BearerTokenConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.Builder + .class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + + /** + * + * + *
+       * Optional. The text token appended to the text `Bearer` to the request
+       * Authorization header.
+       * [Session parameters
+       * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+       * can be used to pass the token dynamically, e.g.
+       * `$session.params.parameter-id`.
+       * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + 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(); + token_ = s; + return s; + } + } + + /** + * + * + *
+       * Optional. The text token appended to the text `Bearer` to the request
+       * Authorization header.
+       * [Session parameters
+       * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+       * can be used to pass the token dynamically, e.g.
+       * `$session.params.parameter-id`.
+       * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_VERSION_FOR_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object secretVersionForToken_ = ""; + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the Bearer token. If this field is set, the `token` field will be
+       * ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForToken. + */ + @java.lang.Override + public java.lang.String getSecretVersionForToken() { + java.lang.Object ref = secretVersionForToken_; + 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(); + secretVersionForToken_ = s; + return s; + } + } + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the Bearer token. If this field is set, the `token` field will be
+       * ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretVersionForTokenBytes() { + java.lang.Object ref = secretVersionForToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersionForToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, secretVersionForToken_); + } + 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(token_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersionForToken_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, secretVersionForToken_); + } + 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.v3.Tool.Authentication.BearerTokenConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig other = + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) obj; + + if (!getToken().equals(other.getToken())) return false; + if (!getSecretVersionForToken().equals(other.getSecretVersionForToken())) 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) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (37 * hash) + SECRET_VERSION_FOR_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getSecretVersionForToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + 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.v3.Tool.Authentication.BearerTokenConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + 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.v3.Tool.Authentication.BearerTokenConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + 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.v3.Tool.Authentication.BearerTokenConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + 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.v3.Tool.Authentication.BearerTokenConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + 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.v3.Tool.Authentication.BearerTokenConfig + 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.v3.Tool.Authentication.BearerTokenConfig + 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.v3.Tool.Authentication.BearerTokenConfig 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; + } + + /** + * + * + *
+       * Config for authentication using bearer token.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + secretVersionForToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig build() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig result = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.secretVersionForToken_ = secretVersionForToken_; + } + } + + @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.v3.Tool.Authentication.BearerTokenConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSecretVersionForToken().isEmpty()) { + secretVersionForToken_ = other.secretVersionForToken_; + bitField0_ |= 0x00000002; + 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: + { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + secretVersionForToken_ = input.readStringRequireUtf8(); + 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 java.lang.Object token_ = ""; + + /** + * + * + *
+         * Optional. The text token appended to the text `Bearer` to the request
+         * Authorization header.
+         * [Session parameters
+         * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+         * can be used to pass the token dynamically, e.g.
+         * `$session.params.parameter-id`.
+         * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Optional. The text token appended to the text `Bearer` to the request
+         * Authorization header.
+         * [Session parameters
+         * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+         * can be used to pass the token dynamically, e.g.
+         * `$session.params.parameter-id`.
+         * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for token. + */ + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Optional. The text token appended to the text `Bearer` to the request
+         * Authorization header.
+         * [Session parameters
+         * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+         * can be used to pass the token dynamically, e.g.
+         * `$session.params.parameter-id`.
+         * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The text token appended to the text `Bearer` to the request
+         * Authorization header.
+         * [Session parameters
+         * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+         * can be used to pass the token dynamically, e.g.
+         * `$session.params.parameter-id`.
+         * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The text token appended to the text `Bearer` to the request
+         * Authorization header.
+         * [Session parameters
+         * reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
+         * can be used to pass the token dynamically, e.g.
+         * `$session.params.parameter-id`.
+         * 
+ * + * string token = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object secretVersionForToken_ = ""; + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the Bearer token. If this field is set, the `token` field will be
+         * ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForToken. + */ + public java.lang.String getSecretVersionForToken() { + java.lang.Object ref = secretVersionForToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretVersionForToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the Bearer token. If this field is set, the `token` field will be
+         * ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForToken. + */ + public com.google.protobuf.ByteString getSecretVersionForTokenBytes() { + java.lang.Object ref = secretVersionForToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the Bearer token. If this field is set, the `token` field will be
+         * ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The secretVersionForToken to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionForToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + secretVersionForToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the Bearer token. If this field is set, the `token` field will be
+         * ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSecretVersionForToken() { + secretVersionForToken_ = getDefaultInstance().getSecretVersionForToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the Bearer token. If this field is set, the `token` field will be
+         * ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_token = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for secretVersionForToken to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionForTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + secretVersionForToken_ = 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.v3.Tool.Authentication.BearerTokenConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + private static final com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BearerTokenConfig 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.v3.Tool.Authentication.BearerTokenConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceAccountAuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The email address of the service account used to authenticate
+       * the tool call. Dialogflow uses this service account to exchange an
+       * access token and the access token is then sent in the `Authorization`
+       * header of the tool request.
+       *
+       * The service account must have the
+       * `roles/iam.serviceAccountTokenCreator` role granted to the
+       * [Dialogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + + /** + * + * + *
+       * Required. The email address of the service account used to authenticate
+       * the tool call. Dialogflow uses this service account to exchange an
+       * access token and the access token is then sent in the `Authorization`
+       * header of the tool request.
+       *
+       * The service account must have the
+       * `roles/iam.serviceAccountTokenCreator` role granted to the
+       * [Dialogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + } + + /** + * + * + *
+     * Configuration for authentication using a service account.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig} + */ + public static final class ServiceAccountAuthConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + ServiceAccountAuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ServiceAccountAuthConfig.newBuilder() to construct. + private ServiceAccountAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceAccountAuthConfig() { + serviceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServiceAccountAuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .Builder.class); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + + /** + * + * + *
+       * Required. The email address of the service account used to authenticate
+       * the tool call. Dialogflow uses this service account to exchange an
+       * access token and the access token is then sent in the `Authorization`
+       * header of the tool request.
+       *
+       * The service account must have the
+       * `roles/iam.serviceAccountTokenCreator` role granted to the
+       * [Dialogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. The email address of the service account used to authenticate
+       * the tool call. Dialogflow uses this service account to exchange an
+       * access token and the access token is then sent in the `Authorization`
+       * header of the tool request.
+       *
+       * The service account must have the
+       * `roles/iam.serviceAccountTokenCreator` role granted to the
+       * [Dialogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccount_); + } + 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(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccount_); + } + 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.v3.Tool.Authentication.ServiceAccountAuthConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig other = + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) obj; + + if (!getServiceAccount().equals(other.getServiceAccount())) 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) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + 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.v3.Tool.Authentication.ServiceAccountAuthConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + 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.v3.Tool.Authentication.ServiceAccountAuthConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + 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.v3.Tool.Authentication.ServiceAccountAuthConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + 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.v3.Tool.Authentication.ServiceAccountAuthConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + 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.v3.Tool.Authentication.ServiceAccountAuthConfig + 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.v3.Tool.Authentication.ServiceAccountAuthConfig + 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.v3.Tool.Authentication.ServiceAccountAuthConfig + 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; + } + + /** + * + * + *
+       * Configuration for authentication using a service account.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceAccount_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + build() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig result = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + } + + @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.v3.Tool.Authentication.ServiceAccountAuthConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .getDefaultInstance()) return this; + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000001; + 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: + { + serviceAccount_ = input.readStringRequireUtf8(); + 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 java.lang.Object serviceAccount_ = ""; + + /** + * + * + *
+         * Required. The email address of the service account used to authenticate
+         * the tool call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the tool request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Required. The email address of the service account used to authenticate
+         * the tool call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the tool request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Required. The email address of the service account used to authenticate
+         * the tool call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the tool request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The email address of the service account used to authenticate
+         * the tool call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the tool request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The email address of the service account used to authenticate
+         * the tool call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the tool request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+         * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000001; + 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.v3.Tool.Authentication.ServiceAccountAuthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + private static final com.google.cloud.dialogflow.cx.v3.Tool.Authentication + .ServiceAccountAuthConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceAccountAuthConfig 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.v3.Tool.Authentication.ServiceAccountAuthConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int authConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object authConfig_; + + public enum AuthConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + API_KEY_CONFIG(1), + OAUTH_CONFIG(2), + SERVICE_AGENT_AUTH_CONFIG(3), + BEARER_TOKEN_CONFIG(4), + SERVICE_ACCOUNT_AUTH_CONFIG(5), + AUTHCONFIG_NOT_SET(0); + private final int value; + + private AuthConfigCase(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 AuthConfigCase valueOf(int value) { + return forNumber(value); + } + + public static AuthConfigCase forNumber(int value) { + switch (value) { + case 1: + return API_KEY_CONFIG; + case 2: + return OAUTH_CONFIG; + case 3: + return SERVICE_AGENT_AUTH_CONFIG; + case 4: + return BEARER_TOKEN_CONFIG; + case 5: + return SERVICE_ACCOUNT_AUTH_CONFIG; + case 0: + return AUTHCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AuthConfigCase getAuthConfigCase() { + return AuthConfigCase.forNumber(authConfigCase_); + } + + public static final int API_KEY_CONFIG_FIELD_NUMBER = 1; + + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return Whether the apiKeyConfig field is set. + */ + @java.lang.Override + public boolean hasApiKeyConfig() { + return authConfigCase_ == 1; + } + + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return The apiKeyConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig getApiKeyConfig() { + if (authConfigCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfigOrBuilder + getApiKeyConfigOrBuilder() { + if (authConfigCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + + public static final int OAUTH_CONFIG_FIELD_NUMBER = 2; + + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * @return Whether the oauthConfig field is set. + */ + @java.lang.Override + public boolean hasOauthConfig() { + return authConfigCase_ == 2; + } + + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * @return The oauthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig getOauthConfig() { + if (authConfigCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.getDefaultInstance(); + } + + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfigOrBuilder + getOauthConfigOrBuilder() { + if (authConfigCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.getDefaultInstance(); + } + + public static final int SERVICE_AGENT_AUTH_CONFIG_FIELD_NUMBER = 3; + + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return Whether the serviceAgentAuthConfig field is set. + */ + @java.lang.Override + public boolean hasServiceAgentAuthConfig() { + return authConfigCase_ == 3; + } + + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return The serviceAgentAuthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + getServiceAgentAuthConfig() { + if (authConfigCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfigOrBuilder + getServiceAgentAuthConfigOrBuilder() { + if (authConfigCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + + public static final int BEARER_TOKEN_CONFIG_FIELD_NUMBER = 4; + + /** + * + * + *
+     * Config for bearer token auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + * + * @return Whether the bearerTokenConfig field is set. + */ + @java.lang.Override + public boolean hasBearerTokenConfig() { + return authConfigCase_ == 4; + } + + /** + * + * + *
+     * Config for bearer token auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + * + * @return The bearerTokenConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + getBearerTokenConfig() { + if (authConfigCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance(); + } + + /** + * + * + *
+     * Config for bearer token auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfigOrBuilder + getBearerTokenConfigOrBuilder() { + if (authConfigCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance(); + } + + public static final int SERVICE_ACCOUNT_AUTH_CONFIG_FIELD_NUMBER = 5; + + /** + * + * + *
+     * Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + * + * @return Whether the serviceAccountAuthConfig field is set. + */ + @java.lang.Override + public boolean hasServiceAccountAuthConfig() { + return authConfigCase_ == 5; + } + + /** + * + * + *
+     * Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + * + * @return The serviceAccountAuthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + getServiceAccountAuthConfig() { + if (authConfigCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .getDefaultInstance(); + } + + /** + * + * + *
+     * Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfigOrBuilder + getServiceAccountAuthConfigOrBuilder() { + if (authConfigCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .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 (authConfigCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) authConfig_); + } + if (authConfigCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) authConfig_); + } + if (authConfigCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_); + } + if (authConfigCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) authConfig_); + } + if (authConfigCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + authConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (authConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) authConfig_); + } + if (authConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) authConfig_); + } + if (authConfigCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_); + } + if (authConfigCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + authConfig_); + } + if (authConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + authConfig_); + } + 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.v3.Tool.Authentication)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.Authentication other = + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication) obj; + + if (!getAuthConfigCase().equals(other.getAuthConfigCase())) return false; + switch (authConfigCase_) { + case 1: + if (!getApiKeyConfig().equals(other.getApiKeyConfig())) return false; + break; + case 2: + if (!getOauthConfig().equals(other.getOauthConfig())) return false; + break; + case 3: + if (!getServiceAgentAuthConfig().equals(other.getServiceAgentAuthConfig())) return false; + break; + case 4: + if (!getBearerTokenConfig().equals(other.getBearerTokenConfig())) return false; + break; + case 5: + if (!getServiceAccountAuthConfig().equals(other.getServiceAccountAuthConfig())) + 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 (authConfigCase_) { + case 1: + hash = (37 * hash) + API_KEY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getApiKeyConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + OAUTH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOauthConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + SERVICE_AGENT_AUTH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceAgentAuthConfig().hashCode(); + break; + case 4: + hash = (37 * hash) + BEARER_TOKEN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBearerTokenConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + SERVICE_ACCOUNT_AUTH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountAuthConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication 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.v3.Tool.Authentication parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication 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.v3.Tool.Authentication parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication 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.v3.Tool.Authentication parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication 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.v3.Tool.Authentication parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication 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.v3.Tool.Authentication 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.v3.Tool.Authentication 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.v3.Tool.Authentication 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; + } + + /** + * + * + *
+     * Authentication information required for API calls
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.Authentication} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.Authentication) + com.google.cloud.dialogflow.cx.v3.Tool.AuthenticationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.class, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Tool.Authentication.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (apiKeyConfigBuilder_ != null) { + apiKeyConfigBuilder_.clear(); + } + if (oauthConfigBuilder_ != null) { + oauthConfigBuilder_.clear(); + } + if (serviceAgentAuthConfigBuilder_ != null) { + serviceAgentAuthConfigBuilder_.clear(); + } + if (bearerTokenConfigBuilder_ != null) { + bearerTokenConfigBuilder_.clear(); + } + if (serviceAccountAuthConfigBuilder_ != null) { + serviceAccountAuthConfigBuilder_.clear(); + } + authConfigCase_ = 0; + authConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication build() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.Authentication result = + new com.google.cloud.dialogflow.cx.v3.Tool.Authentication(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Tool.Authentication result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication result) { + result.authConfigCase_ = authConfigCase_; + result.authConfig_ = this.authConfig_; + if (authConfigCase_ == 1 && apiKeyConfigBuilder_ != null) { + result.authConfig_ = apiKeyConfigBuilder_.build(); + } + if (authConfigCase_ == 2 && oauthConfigBuilder_ != null) { + result.authConfig_ = oauthConfigBuilder_.build(); + } + if (authConfigCase_ == 3 && serviceAgentAuthConfigBuilder_ != null) { + result.authConfig_ = serviceAgentAuthConfigBuilder_.build(); + } + if (authConfigCase_ == 4 && bearerTokenConfigBuilder_ != null) { + result.authConfig_ = bearerTokenConfigBuilder_.build(); + } + if (authConfigCase_ == 5 && serviceAccountAuthConfigBuilder_ != null) { + result.authConfig_ = serviceAccountAuthConfigBuilder_.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.v3.Tool.Authentication) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Tool.Authentication) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Tool.Authentication other) { + if (other == com.google.cloud.dialogflow.cx.v3.Tool.Authentication.getDefaultInstance()) + return this; + switch (other.getAuthConfigCase()) { + case API_KEY_CONFIG: + { + mergeApiKeyConfig(other.getApiKeyConfig()); + break; + } + case OAUTH_CONFIG: + { + mergeOauthConfig(other.getOauthConfig()); + break; + } + case SERVICE_AGENT_AUTH_CONFIG: + { + mergeServiceAgentAuthConfig(other.getServiceAgentAuthConfig()); + break; + } + case BEARER_TOKEN_CONFIG: + { + mergeBearerTokenConfig(other.getBearerTokenConfig()); + break; + } + case SERVICE_ACCOUNT_AUTH_CONFIG: + { + mergeServiceAccountAuthConfig(other.getServiceAccountAuthConfig()); + break; + } + case AUTHCONFIG_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: + { + input.readMessage(getApiKeyConfigFieldBuilder().getBuilder(), extensionRegistry); + authConfigCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getOauthConfigFieldBuilder().getBuilder(), extensionRegistry); + authConfigCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getServiceAgentAuthConfigFieldBuilder().getBuilder(), extensionRegistry); + authConfigCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getBearerTokenConfigFieldBuilder().getBuilder(), extensionRegistry); + authConfigCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getServiceAccountAuthConfigFieldBuilder().getBuilder(), extensionRegistry); + authConfigCase_ = 5; + break; + } // case 42 + 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 authConfigCase_ = 0; + private java.lang.Object authConfig_; + + public AuthConfigCase getAuthConfigCase() { + return AuthConfigCase.forNumber(authConfigCase_); + } + + public Builder clearAuthConfig() { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfigOrBuilder> + apiKeyConfigBuilder_; + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return Whether the apiKeyConfig field is set. + */ + @java.lang.Override + public boolean hasApiKeyConfig() { + return authConfigCase_ == 1; + } + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return The apiKeyConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig getApiKeyConfig() { + if (apiKeyConfigBuilder_ == null) { + if (authConfigCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } else { + if (authConfigCase_ == 1) { + return apiKeyConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public Builder setApiKeyConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig value) { + if (apiKeyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authConfig_ = value; + onChanged(); + } else { + apiKeyConfigBuilder_.setMessage(value); + } + authConfigCase_ = 1; + return this; + } + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public Builder setApiKeyConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.Builder + builderForValue) { + if (apiKeyConfigBuilder_ == null) { + authConfig_ = builderForValue.build(); + onChanged(); + } else { + apiKeyConfigBuilder_.setMessage(builderForValue.build()); + } + authConfigCase_ = 1; + return this; + } + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public Builder mergeApiKeyConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig value) { + if (apiKeyConfigBuilder_ == null) { + if (authConfigCase_ == 1 + && authConfig_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance()) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) + authConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + authConfig_ = value; + } + onChanged(); + } else { + if (authConfigCase_ == 1) { + apiKeyConfigBuilder_.mergeFrom(value); + } else { + apiKeyConfigBuilder_.setMessage(value); + } + } + authConfigCase_ = 1; + return this; + } + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public Builder clearApiKeyConfig() { + if (apiKeyConfigBuilder_ == null) { + if (authConfigCase_ == 1) { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + } + } else { + if (authConfigCase_ == 1) { + authConfigCase_ = 0; + authConfig_ = null; + } + apiKeyConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.Builder + getApiKeyConfigBuilder() { + return getApiKeyConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfigOrBuilder + getApiKeyConfigOrBuilder() { + if ((authConfigCase_ == 1) && (apiKeyConfigBuilder_ != null)) { + return apiKeyConfigBuilder_.getMessageOrBuilder(); + } else { + if (authConfigCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfigOrBuilder> + getApiKeyConfigFieldBuilder() { + if (apiKeyConfigBuilder_ == null) { + if (!(authConfigCase_ == 1)) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + apiKeyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfigOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) authConfig_, + getParentForChildren(), + isClean()); + authConfig_ = null; + } + authConfigCase_ = 1; + onChanged(); + return apiKeyConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfigOrBuilder> + oauthConfigBuilder_; + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * + * @return Whether the oauthConfig field is set. + */ + @java.lang.Override + public boolean hasOauthConfig() { + return authConfigCase_ == 2; + } + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * + * @return The oauthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig getOauthConfig() { + if (oauthConfigBuilder_ == null) { + if (authConfigCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } else { + if (authConfigCase_ == 2) { + return oauthConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public Builder setOauthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig value) { + if (oauthConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authConfig_ = value; + onChanged(); + } else { + oauthConfigBuilder_.setMessage(value); + } + authConfigCase_ = 2; + return this; + } + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public Builder setOauthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.Builder + builderForValue) { + if (oauthConfigBuilder_ == null) { + authConfig_ = builderForValue.build(); + onChanged(); + } else { + oauthConfigBuilder_.setMessage(builderForValue.build()); + } + authConfigCase_ = 2; + return this; + } + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public Builder mergeOauthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig value) { + if (oauthConfigBuilder_ == null) { + if (authConfigCase_ == 2 + && authConfig_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + .getDefaultInstance()) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) + authConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + authConfig_ = value; + } + onChanged(); + } else { + if (authConfigCase_ == 2) { + oauthConfigBuilder_.mergeFrom(value); + } else { + oauthConfigBuilder_.setMessage(value); + } + } + authConfigCase_ = 2; + return this; + } + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public Builder clearOauthConfig() { + if (oauthConfigBuilder_ == null) { + if (authConfigCase_ == 2) { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + } + } else { + if (authConfigCase_ == 2) { + authConfigCase_ = 0; + authConfig_ = null; + } + oauthConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.Builder + getOauthConfigBuilder() { + return getOauthConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfigOrBuilder + getOauthConfigOrBuilder() { + if ((authConfigCase_ == 2) && (oauthConfigBuilder_ != null)) { + return oauthConfigBuilder_.getMessageOrBuilder(); + } else { + if (authConfigCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfigOrBuilder> + getOauthConfigFieldBuilder() { + if (oauthConfigBuilder_ == null) { + if (!(authConfigCase_ == 2)) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + oauthConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfigOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) authConfig_, + getParentForChildren(), + isClean()); + authConfig_ = null; + } + authConfigCase_ = 2; + onChanged(); + return oauthConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfigOrBuilder> + serviceAgentAuthConfigBuilder_; + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return Whether the serviceAgentAuthConfig field is set. + */ + @java.lang.Override + public boolean hasServiceAgentAuthConfig() { + return authConfigCase_ == 3; + } + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return The serviceAgentAuthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + getServiceAgentAuthConfig() { + if (serviceAgentAuthConfigBuilder_ == null) { + if (authConfigCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } else { + if (authConfigCase_ == 3) { + return serviceAgentAuthConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public Builder setServiceAgentAuthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig value) { + if (serviceAgentAuthConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authConfig_ = value; + onChanged(); + } else { + serviceAgentAuthConfigBuilder_.setMessage(value); + } + authConfigCase_ = 3; + return this; + } + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public Builder setServiceAgentAuthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.Builder + builderForValue) { + if (serviceAgentAuthConfigBuilder_ == null) { + authConfig_ = builderForValue.build(); + onChanged(); + } else { + serviceAgentAuthConfigBuilder_.setMessage(builderForValue.build()); + } + authConfigCase_ = 3; + return this; + } + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public Builder mergeServiceAgentAuthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig value) { + if (serviceAgentAuthConfigBuilder_ == null) { + if (authConfigCase_ == 3 + && authConfig_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance()) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .newBuilder( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication + .ServiceAgentAuthConfig) + authConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + authConfig_ = value; + } + onChanged(); + } else { + if (authConfigCase_ == 3) { + serviceAgentAuthConfigBuilder_.mergeFrom(value); + } else { + serviceAgentAuthConfigBuilder_.setMessage(value); + } + } + authConfigCase_ = 3; + return this; + } + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public Builder clearServiceAgentAuthConfig() { + if (serviceAgentAuthConfigBuilder_ == null) { + if (authConfigCase_ == 3) { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + } + } else { + if (authConfigCase_ == 3) { + authConfigCase_ = 0; + authConfig_ = null; + } + serviceAgentAuthConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.Builder + getServiceAgentAuthConfigBuilder() { + return getServiceAgentAuthConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfigOrBuilder + getServiceAgentAuthConfigOrBuilder() { + if ((authConfigCase_ == 3) && (serviceAgentAuthConfigBuilder_ != null)) { + return serviceAgentAuthConfigBuilder_.getMessageOrBuilder(); + } else { + if (authConfigCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfigOrBuilder> + getServiceAgentAuthConfigFieldBuilder() { + if (serviceAgentAuthConfigBuilder_ == null) { + if (!(authConfigCase_ == 3)) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + serviceAgentAuthConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication + .ServiceAgentAuthConfigOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_, + getParentForChildren(), + isClean()); + authConfig_ = null; + } + authConfigCase_ = 3; + onChanged(); + return serviceAgentAuthConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfigOrBuilder> + bearerTokenConfigBuilder_; + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + * + * @return Whether the bearerTokenConfig field is set. + */ + @java.lang.Override + public boolean hasBearerTokenConfig() { + return authConfigCase_ == 4; + } + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + * + * @return The bearerTokenConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + getBearerTokenConfig() { + if (bearerTokenConfigBuilder_ == null) { + if (authConfigCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance(); + } else { + if (authConfigCase_ == 4) { + return bearerTokenConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + public Builder setBearerTokenConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig value) { + if (bearerTokenConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authConfig_ = value; + onChanged(); + } else { + bearerTokenConfigBuilder_.setMessage(value); + } + authConfigCase_ = 4; + return this; + } + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + public Builder setBearerTokenConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.Builder + builderForValue) { + if (bearerTokenConfigBuilder_ == null) { + authConfig_ = builderForValue.build(); + onChanged(); + } else { + bearerTokenConfigBuilder_.setMessage(builderForValue.build()); + } + authConfigCase_ = 4; + return this; + } + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + public Builder mergeBearerTokenConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig value) { + if (bearerTokenConfigBuilder_ == null) { + if (authConfigCase_ == 4 + && authConfig_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance()) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + authConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + authConfig_ = value; + } + onChanged(); + } else { + if (authConfigCase_ == 4) { + bearerTokenConfigBuilder_.mergeFrom(value); + } else { + bearerTokenConfigBuilder_.setMessage(value); + } + } + authConfigCase_ = 4; + return this; + } + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + public Builder clearBearerTokenConfig() { + if (bearerTokenConfigBuilder_ == null) { + if (authConfigCase_ == 4) { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + } + } else { + if (authConfigCase_ == 4) { + authConfigCase_ = 0; + authConfig_ = null; + } + bearerTokenConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.Builder + getBearerTokenConfigBuilder() { + return getBearerTokenConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfigOrBuilder + getBearerTokenConfigOrBuilder() { + if ((authConfigCase_ == 4) && (bearerTokenConfigBuilder_ != null)) { + return bearerTokenConfigBuilder_.getMessageOrBuilder(); + } else { + if (authConfigCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Config for bearer token auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig bearer_token_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfigOrBuilder> + getBearerTokenConfigFieldBuilder() { + if (bearerTokenConfigBuilder_ == null) { + if (!(authConfigCase_ == 4)) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + .getDefaultInstance(); + } + bearerTokenConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfigOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + authConfig_, + getParentForChildren(), + isClean()); + authConfig_ = null; + } + authConfigCase_ = 4; + onChanged(); + return bearerTokenConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication + .ServiceAccountAuthConfigOrBuilder> + serviceAccountAuthConfigBuilder_; + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + * + * @return Whether the serviceAccountAuthConfig field is set. + */ + @java.lang.Override + public boolean hasServiceAccountAuthConfig() { + return authConfigCase_ == 5; + } + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + * + * @return The serviceAccountAuthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + getServiceAccountAuthConfig() { + if (serviceAccountAuthConfigBuilder_ == null) { + if (authConfigCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .getDefaultInstance(); + } else { + if (authConfigCase_ == 5) { + return serviceAccountAuthConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + public Builder setServiceAccountAuthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig value) { + if (serviceAccountAuthConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authConfig_ = value; + onChanged(); + } else { + serviceAccountAuthConfigBuilder_.setMessage(value); + } + authConfigCase_ = 5; + return this; + } + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + public Builder setServiceAccountAuthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.Builder + builderForValue) { + if (serviceAccountAuthConfigBuilder_ == null) { + authConfig_ = builderForValue.build(); + onChanged(); + } else { + serviceAccountAuthConfigBuilder_.setMessage(builderForValue.build()); + } + authConfigCase_ = 5; + return this; + } + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + public Builder mergeServiceAccountAuthConfig( + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig value) { + if (serviceAccountAuthConfigBuilder_ == null) { + if (authConfigCase_ == 5 + && authConfig_ + != com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .getDefaultInstance()) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .newBuilder( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication + .ServiceAccountAuthConfig) + authConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + authConfig_ = value; + } + onChanged(); + } else { + if (authConfigCase_ == 5) { + serviceAccountAuthConfigBuilder_.mergeFrom(value); + } else { + serviceAccountAuthConfigBuilder_.setMessage(value); + } + } + authConfigCase_ = 5; + return this; + } + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + public Builder clearServiceAccountAuthConfig() { + if (serviceAccountAuthConfigBuilder_ == null) { + if (authConfigCase_ == 5) { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + } + } else { + if (authConfigCase_ == 5) { + authConfigCase_ = 0; + authConfig_ = null; + } + serviceAccountAuthConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.Builder + getServiceAccountAuthConfigBuilder() { + return getServiceAccountAuthConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfigOrBuilder + getServiceAccountAuthConfigOrBuilder() { + if ((authConfigCase_ == 5) && (serviceAccountAuthConfigBuilder_ != null)) { + return serviceAccountAuthConfigBuilder_.getMessageOrBuilder(); + } else { + if (authConfigCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig service_account_auth_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication + .ServiceAccountAuthConfigOrBuilder> + getServiceAccountAuthConfigFieldBuilder() { + if (serviceAccountAuthConfigBuilder_ == null) { + if (!(authConfigCase_ == 5)) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .getDefaultInstance(); + } + serviceAccountAuthConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3.Tool.Authentication + .ServiceAccountAuthConfigOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + authConfig_, + getParentForChildren(), + isClean()); + authConfig_ = null; + } + authConfigCase_ = 5; + onChanged(); + return serviceAccountAuthConfigBuilder_; + } + + @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.v3.Tool.Authentication) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.Authentication) + private static final com.google.cloud.dialogflow.cx.v3.Tool.Authentication DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.Authentication(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.Authentication getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Authentication 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.v3.Tool.Authentication getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TLSConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.TLSConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getCaCertsList(); + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert getCaCerts(int index); + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getCaCertsCount(); + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getCaCertsOrBuilderList(); + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder getCaCertsOrBuilder(int index); + } + + /** + * + * + *
+   * The TLS configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.TLSConfig} + */ + public static final class TLSConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.TLSConfig) + TLSConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use TLSConfig.newBuilder() to construct. + private TLSConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TLSConfig() { + caCerts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TLSConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.Builder.class); + } + + public interface CACertOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The name of the allowed custom CA certificates. This
+       * can be used to disambiguate the custom CA certificates.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+       * Required. The name of the allowed custom CA certificates. This
+       * can be used to disambiguate the custom CA certificates.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+       * Required. The allowed custom CA certificates (in DER format) for
+       * HTTPS verification. This overrides the default SSL trust store. If this
+       * is empty or unspecified, Dialogflow will use Google's default trust
+       * store to verify certificates. N.B. Make sure the HTTPS server
+       * certificates are signed with "subject alt name". For instance a
+       * certificate can be self-signed using the following command:
+       *
+       * ```
+       *    openssl x509 -req -days 200 -in example.com.csr \
+       *      -signkey example.com.key \
+       *      -out example.com.crt \
+       *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+       * ```
+       * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cert. + */ + com.google.protobuf.ByteString getCert(); + } + + /** + * + * + *
+     * The CA certificate.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert} + */ + public static final class CACert extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert) + CACertOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CACert.newBuilder() to construct. + private CACert(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CACert() { + displayName_ = ""; + cert_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CACert(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.class, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+       * Required. The name of the allowed custom CA certificates. This
+       * can be used to disambiguate the custom CA certificates.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. The name of the allowed custom CA certificates. This
+       * can be used to disambiguate the custom CA certificates.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERT_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+       * Required. The allowed custom CA certificates (in DER format) for
+       * HTTPS verification. This overrides the default SSL trust store. If this
+       * is empty or unspecified, Dialogflow will use Google's default trust
+       * store to verify certificates. N.B. Make sure the HTTPS server
+       * certificates are signed with "subject alt name". For instance a
+       * certificate can be self-signed using the following command:
+       *
+       * ```
+       *    openssl x509 -req -days 200 -in example.com.csr \
+       *      -signkey example.com.key \
+       *      -out example.com.crt \
+       *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+       * ```
+       * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cert. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCert() { + return cert_; + } + + 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(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!cert_.isEmpty()) { + output.writeBytes(2, cert_); + } + 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(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!cert_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, cert_); + } + 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.v3.Tool.TLSConfig.CACert)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert other = + (com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getCert().equals(other.getCert())) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + CERT_FIELD_NUMBER; + hash = (53 * hash) + getCert().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert 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.v3.Tool.TLSConfig.CACert parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert 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.v3.Tool.TLSConfig.CACert parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert 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.v3.Tool.TLSConfig.CACert parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert 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.v3.Tool.TLSConfig.CACert parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert 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.v3.Tool.TLSConfig.CACert 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.v3.Tool.TLSConfig.CACert 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.v3.Tool.TLSConfig.CACert 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 CA certificate.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert) + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.class, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + cert_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert build() { + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert result = + new com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cert_ = cert_; + } + } + + @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.v3.Tool.TLSConfig.CACert) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert other) { + if (other == com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getCert() != com.google.protobuf.ByteString.EMPTY) { + setCert(other.getCert()); + } + 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: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + cert_ = input.readBytes(); + 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 java.lang.Object displayName_ = ""; + + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+         * Required. The allowed custom CA certificates (in DER format) for
+         * HTTPS verification. This overrides the default SSL trust store. If this
+         * is empty or unspecified, Dialogflow will use Google's default trust
+         * store to verify certificates. N.B. Make sure the HTTPS server
+         * certificates are signed with "subject alt name". For instance a
+         * certificate can be self-signed using the following command:
+         *
+         * ```
+         *    openssl x509 -req -days 200 -in example.com.csr \
+         *      -signkey example.com.key \
+         *      -out example.com.crt \
+         *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+         * ```
+         * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cert. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCert() { + return cert_; + } + + /** + * + * + *
+         * Required. The allowed custom CA certificates (in DER format) for
+         * HTTPS verification. This overrides the default SSL trust store. If this
+         * is empty or unspecified, Dialogflow will use Google's default trust
+         * store to verify certificates. N.B. Make sure the HTTPS server
+         * certificates are signed with "subject alt name". For instance a
+         * certificate can be self-signed using the following command:
+         *
+         * ```
+         *    openssl x509 -req -days 200 -in example.com.csr \
+         *      -signkey example.com.key \
+         *      -out example.com.crt \
+         *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+         * ```
+         * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The cert to set. + * @return This builder for chaining. + */ + public Builder setCert(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + cert_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The allowed custom CA certificates (in DER format) for
+         * HTTPS verification. This overrides the default SSL trust store. If this
+         * is empty or unspecified, Dialogflow will use Google's default trust
+         * store to verify certificates. N.B. Make sure the HTTPS server
+         * certificates are signed with "subject alt name". For instance a
+         * certificate can be self-signed using the following command:
+         *
+         * ```
+         *    openssl x509 -req -days 200 -in example.com.csr \
+         *      -signkey example.com.key \
+         *      -out example.com.crt \
+         *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+         * ```
+         * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCert() { + bitField0_ = (bitField0_ & ~0x00000002); + cert_ = getDefaultInstance().getCert(); + 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.v3.Tool.TLSConfig.CACert) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert) + private static final com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CACert 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.v3.Tool.TLSConfig.CACert getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CA_CERTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List caCerts_; + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getCaCertsList() { + return caCerts_; + } + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder> + getCaCertsOrBuilderList() { + return caCerts_; + } + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getCaCertsCount() { + return caCerts_.size(); + } + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert getCaCerts(int index) { + return caCerts_.get(index); + } + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder getCaCertsOrBuilder( + int index) { + return caCerts_.get(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 < caCerts_.size(); i++) { + output.writeMessage(1, caCerts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < caCerts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, caCerts_.get(i)); + } + 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.v3.Tool.TLSConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig other = + (com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig) obj; + + if (!getCaCertsList().equals(other.getCaCertsList())) 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 (getCaCertsCount() > 0) { + hash = (37 * hash) + CA_CERTS_FIELD_NUMBER; + hash = (53 * hash) + getCaCertsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig 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.v3.Tool.TLSConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig 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.v3.Tool.TLSConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig 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.v3.Tool.TLSConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig 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.v3.Tool.TLSConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig 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.v3.Tool.TLSConfig 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.v3.Tool.TLSConfig 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.v3.Tool.TLSConfig 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 TLS configuration.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.TLSConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.TLSConfig) + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (caCertsBuilder_ == null) { + caCerts_ = java.util.Collections.emptyList(); + } else { + caCerts_ = null; + caCertsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig build() { + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig result = + new com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig result) { + if (caCertsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + caCerts_ = java.util.Collections.unmodifiableList(caCerts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.caCerts_ = caCerts_; + } else { + result.caCerts_ = caCertsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig result) { + int from_bitField0_ = bitField0_; + } + + @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.v3.Tool.TLSConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.getDefaultInstance()) + return this; + if (caCertsBuilder_ == null) { + if (!other.caCerts_.isEmpty()) { + if (caCerts_.isEmpty()) { + caCerts_ = other.caCerts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCaCertsIsMutable(); + caCerts_.addAll(other.caCerts_); + } + onChanged(); + } + } else { + if (!other.caCerts_.isEmpty()) { + if (caCertsBuilder_.isEmpty()) { + caCertsBuilder_.dispose(); + caCertsBuilder_ = null; + caCerts_ = other.caCerts_; + bitField0_ = (bitField0_ & ~0x00000001); + caCertsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCaCertsFieldBuilder() + : null; + } else { + caCertsBuilder_.addAllMessages(other.caCerts_); + } + } + } + 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: + { + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.parser(), + extensionRegistry); + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(m); + } else { + caCertsBuilder_.addMessage(m); + } + 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 java.util.List caCerts_ = + java.util.Collections.emptyList(); + + private void ensureCaCertsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + caCerts_ = + new java.util.ArrayList( + caCerts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder> + caCertsBuilder_; + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getCaCertsList() { + if (caCertsBuilder_ == null) { + return java.util.Collections.unmodifiableList(caCerts_); + } else { + return caCertsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getCaCertsCount() { + if (caCertsBuilder_ == null) { + return caCerts_.size(); + } else { + return caCertsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert getCaCerts(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCaCerts( + int index, com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.set(index, value); + onChanged(); + } else { + caCertsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCaCerts( + int index, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.set(index, builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCaCerts(com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.add(value); + onChanged(); + } else { + caCertsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCaCerts( + int index, com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.add(index, value); + onChanged(); + } else { + caCertsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCaCerts( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCaCerts( + int index, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(index, builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllCaCerts( + java.lang.Iterable + values) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, caCerts_); + onChanged(); + } else { + caCertsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCaCerts() { + if (caCertsBuilder_ == null) { + caCerts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + caCertsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeCaCerts(int index) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.remove(index); + onChanged(); + } else { + caCertsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder getCaCertsBuilder( + int index) { + return getCaCertsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder getCaCertsOrBuilder( + int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder> + getCaCertsOrBuilderList() { + if (caCertsBuilder_ != null) { + return caCertsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(caCerts_); + } + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder addCaCertsBuilder() { + return getCaCertsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.getDefaultInstance()); + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder addCaCertsBuilder( + int index) { + return getCaCertsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.getDefaultInstance()); + } + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getCaCertsBuilderList() { + return getCaCertsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder> + getCaCertsFieldBuilder() { + if (caCertsBuilder_ == null) { + caCertsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertOrBuilder>( + caCerts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + caCerts_ = null; + } + return caCertsBuilder_; + } + + @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.v3.Tool.TLSConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.TLSConfig) + private static final com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.TLSConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TLSConfig 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.v3.Tool.TLSConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceDirectoryConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of [Service
+     * Directory](https://cloud.google.com/service-directory) service.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+     * `LocationID` of the service directory must be the same as the location
+     * of the agent.
+     * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The service. + */ + java.lang.String getService(); + + /** + * + * + *
+     * Required. The name of [Service
+     * Directory](https://cloud.google.com/service-directory) service.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+     * `LocationID` of the service directory must be the same as the location
+     * of the agent.
+     * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for service. + */ + com.google.protobuf.ByteString getServiceBytes(); + } + + /** + * + * + *
+   * Configuration for tools using Service Directory.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig} + */ + public static final class ServiceDirectoryConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig) + ServiceDirectoryConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ServiceDirectoryConfig.newBuilder() to construct. + private ServiceDirectoryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceDirectoryConfig() { + service_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServiceDirectoryConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + + /** + * + * + *
+     * Required. The name of [Service
+     * Directory](https://cloud.google.com/service-directory) service.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+     * `LocationID` of the service directory must be the same as the location
+     * of the agent.
+     * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + 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(); + service_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The name of [Service
+     * Directory](https://cloud.google.com/service-directory) service.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+     * `LocationID` of the service directory must be the same as the location
+     * of the agent.
+     * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + 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(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + 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.v3.Tool.ServiceDirectoryConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig other = + (com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig) obj; + + if (!getService().equals(other.getService())) 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) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig 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.v3.Tool.ServiceDirectoryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig 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.v3.Tool.ServiceDirectoryConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig 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.v3.Tool.ServiceDirectoryConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig 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.v3.Tool.ServiceDirectoryConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig 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.v3.Tool.ServiceDirectoryConfig 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.v3.Tool.ServiceDirectoryConfig 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.v3.Tool.ServiceDirectoryConfig 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; + } + + /** + * + * + *
+     * Configuration for tools using Service Directory.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig) + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.class, + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig build() { + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig result = + new com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + } + + @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.v3.Tool.ServiceDirectoryConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.getDefaultInstance()) + return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + 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: + { + service_ = input.readStringRequireUtf8(); + 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 java.lang.Object service_ = ""; + + /** + * + * + *
+       * Required. The name of [Service
+       * Directory](https://cloud.google.com/service-directory) service.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+       * `LocationID` of the service directory must be the same as the location
+       * of the agent.
+       * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The name of [Service
+       * Directory](https://cloud.google.com/service-directory) service.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+       * `LocationID` of the service directory must be the same as the location
+       * of the agent.
+       * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for service. + */ + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The name of [Service
+       * Directory](https://cloud.google.com/service-directory) service.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+       * `LocationID` of the service directory must be the same as the location
+       * of the agent.
+       * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of [Service
+       * Directory](https://cloud.google.com/service-directory) service.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+       * `LocationID` of the service directory must be the same as the location
+       * of the agent.
+       * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of [Service
+       * Directory](https://cloud.google.com/service-directory) service.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
+       * `LocationID` of the service directory must be the same as the location
+       * of the agent.
+       * 
+ * + * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + 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.v3.Tool.ServiceDirectoryConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig) + private static final com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceDirectoryConfig 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.v3.Tool.ServiceDirectoryConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int specificationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object specification_; + + public enum SpecificationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OPEN_API_SPEC(4), + DATA_STORE_SPEC(8), + FUNCTION_SPEC(13), + SPECIFICATION_NOT_SET(0); + private final int value; + + private SpecificationCase(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 SpecificationCase valueOf(int value) { + return forNumber(value); + } + + public static SpecificationCase forNumber(int value) { + switch (value) { + case 4: + return OPEN_API_SPEC; + case 8: + return DATA_STORE_SPEC; + case 13: + return FUNCTION_SPEC; + case 0: + return SPECIFICATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SpecificationCase getSpecificationCase() { + return SpecificationCase.forNumber(specificationCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * The unique identifier of the Tool.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique identifier of the Tool.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Required. The human-readable name of the Tool, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The human-readable name of the Tool, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Required. High level description of the Tool and its usage.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. High level description of the Tool and its usage.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPEN_API_SPEC_FIELD_NUMBER = 4; + + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + * + * @return Whether the openApiSpec field is set. + */ + @java.lang.Override + public boolean hasOpenApiSpec() { + return specificationCase_ == 4; + } + + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + * + * @return The openApiSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool getOpenApiSpec() { + if (specificationCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance(); + } + + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.OpenApiToolOrBuilder getOpenApiSpecOrBuilder() { + if (specificationCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance(); + } + + public static final int DATA_STORE_SPEC_FIELD_NUMBER = 8; + + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + * + * @return Whether the dataStoreSpec field is set. + */ + @java.lang.Override + public boolean hasDataStoreSpec() { + return specificationCase_ == 8; + } + + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + * + * @return The dataStoreSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool getDataStoreSpec() { + if (specificationCase_ == 8) { + return (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance(); + } + + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreToolOrBuilder getDataStoreSpecOrBuilder() { + if (specificationCase_ == 8) { + return (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance(); + } + + public static final int FUNCTION_SPEC_FIELD_NUMBER = 13; + + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + * + * @return Whether the functionSpec field is set. + */ + @java.lang.Override + public boolean hasFunctionSpec() { + return specificationCase_ == 13; + } + + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + * + * @return The functionSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool getFunctionSpec() { + if (specificationCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance(); + } + + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.FunctionToolOrBuilder getFunctionSpecOrBuilder() { + if (specificationCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance(); + } + + public static final int TOOL_TYPE_FIELD_NUMBER = 12; + private int toolType_ = 0; + + /** + * + * + *
+   * Output only. The tool type.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for toolType. + */ + @java.lang.Override + public int getToolTypeValue() { + return toolType_; + } + + /** + * + * + *
+   * Output only. The tool type.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The toolType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.ToolType getToolType() { + com.google.cloud.dialogflow.cx.v3.Tool.ToolType result = + com.google.cloud.dialogflow.cx.v3.Tool.ToolType.forNumber(toolType_); + return result == null ? com.google.cloud.dialogflow.cx.v3.Tool.ToolType.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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (specificationCase_ == 4) { + output.writeMessage(4, (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) specification_); + } + if (specificationCase_ == 8) { + output.writeMessage(8, (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) specification_); + } + if (toolType_ + != com.google.cloud.dialogflow.cx.v3.Tool.ToolType.TOOL_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(12, toolType_); + } + if (specificationCase_ == 13) { + output.writeMessage(13, (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) specification_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (specificationCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) specification_); + } + if (specificationCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) specification_); + } + if (toolType_ + != com.google.cloud.dialogflow.cx.v3.Tool.ToolType.TOOL_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, toolType_); + } + if (specificationCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) specification_); + } + 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.v3.Tool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Tool other = (com.google.cloud.dialogflow.cx.v3.Tool) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (toolType_ != other.toolType_) return false; + if (!getSpecificationCase().equals(other.getSpecificationCase())) return false; + switch (specificationCase_) { + case 4: + if (!getOpenApiSpec().equals(other.getOpenApiSpec())) return false; + break; + case 8: + if (!getDataStoreSpec().equals(other.getDataStoreSpec())) return false; + break; + case 13: + if (!getFunctionSpec().equals(other.getFunctionSpec())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TOOL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + toolType_; + switch (specificationCase_) { + case 4: + hash = (37 * hash) + OPEN_API_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getOpenApiSpec().hashCode(); + break; + case 8: + hash = (37 * hash) + DATA_STORE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreSpec().hashCode(); + break; + case 13: + hash = (37 * hash) + FUNCTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getFunctionSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Tool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool 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.v3.Tool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool 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.v3.Tool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool 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.v3.Tool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool 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.v3.Tool parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool 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.v3.Tool 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.v3.Tool 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.v3.Tool 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; + } + + /** + * + * + *
+   * A tool provides a list of actions which are available to the
+   * [Playbook][google.cloud.dialogflow.cx.v3.Playbook] to attain its goal. A Tool
+   * consists of a description of the tool's usage and a specification of the tool
+   * which contains the schema and authentication information.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Tool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Tool) + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Tool.class, + com.google.cloud.dialogflow.cx.v3.Tool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.Tool.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + if (openApiSpecBuilder_ != null) { + openApiSpecBuilder_.clear(); + } + if (dataStoreSpecBuilder_ != null) { + dataStoreSpecBuilder_.clear(); + } + if (functionSpecBuilder_ != null) { + functionSpecBuilder_.clear(); + } + toolType_ = 0; + specificationCase_ = 0; + specification_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool build() { + com.google.cloud.dialogflow.cx.v3.Tool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool buildPartial() { + com.google.cloud.dialogflow.cx.v3.Tool result = + new com.google.cloud.dialogflow.cx.v3.Tool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Tool result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.toolType_ = toolType_; + } + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.Tool result) { + result.specificationCase_ = specificationCase_; + result.specification_ = this.specification_; + if (specificationCase_ == 4 && openApiSpecBuilder_ != null) { + result.specification_ = openApiSpecBuilder_.build(); + } + if (specificationCase_ == 8 && dataStoreSpecBuilder_ != null) { + result.specification_ = dataStoreSpecBuilder_.build(); + } + if (specificationCase_ == 13 && functionSpecBuilder_ != null) { + result.specification_ = functionSpecBuilder_.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.v3.Tool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Tool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Tool other) { + if (other == com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.toolType_ != 0) { + setToolTypeValue(other.getToolTypeValue()); + } + switch (other.getSpecificationCase()) { + case OPEN_API_SPEC: + { + mergeOpenApiSpec(other.getOpenApiSpec()); + break; + } + case DATA_STORE_SPEC: + { + mergeDataStoreSpec(other.getDataStoreSpec()); + break; + } + case FUNCTION_SPEC: + { + mergeFunctionSpec(other.getFunctionSpec()); + break; + } + case SPECIFICATION_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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getOpenApiSpecFieldBuilder().getBuilder(), extensionRegistry); + specificationCase_ = 4; + break; + } // case 34 + case 66: + { + input.readMessage(getDataStoreSpecFieldBuilder().getBuilder(), extensionRegistry); + specificationCase_ = 8; + break; + } // case 66 + case 96: + { + toolType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 96 + case 106: + { + input.readMessage(getFunctionSpecFieldBuilder().getBuilder(), extensionRegistry); + specificationCase_ = 13; + break; + } // case 106 + 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 specificationCase_ = 0; + private java.lang.Object specification_; + + public SpecificationCase getSpecificationCase() { + return SpecificationCase.forNumber(specificationCase_); + } + + public Builder clearSpecification() { + specificationCase_ = 0; + specification_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool, + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiToolOrBuilder> + openApiSpecBuilder_; + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + * + * @return Whether the openApiSpec field is set. + */ + @java.lang.Override + public boolean hasOpenApiSpec() { + return specificationCase_ == 4; + } + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + * + * @return The openApiSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool getOpenApiSpec() { + if (openApiSpecBuilder_ == null) { + if (specificationCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance(); + } else { + if (specificationCase_ == 4) { + return openApiSpecBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance(); + } + } + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + public Builder setOpenApiSpec(com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool value) { + if (openApiSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specification_ = value; + onChanged(); + } else { + openApiSpecBuilder_.setMessage(value); + } + specificationCase_ = 4; + return this; + } + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + public Builder setOpenApiSpec( + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.Builder builderForValue) { + if (openApiSpecBuilder_ == null) { + specification_ = builderForValue.build(); + onChanged(); + } else { + openApiSpecBuilder_.setMessage(builderForValue.build()); + } + specificationCase_ = 4; + return this; + } + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + public Builder mergeOpenApiSpec(com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool value) { + if (openApiSpecBuilder_ == null) { + if (specificationCase_ == 4 + && specification_ + != com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance()) { + specification_ = + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) specification_) + .mergeFrom(value) + .buildPartial(); + } else { + specification_ = value; + } + onChanged(); + } else { + if (specificationCase_ == 4) { + openApiSpecBuilder_.mergeFrom(value); + } else { + openApiSpecBuilder_.setMessage(value); + } + } + specificationCase_ = 4; + return this; + } + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + public Builder clearOpenApiSpec() { + if (openApiSpecBuilder_ == null) { + if (specificationCase_ == 4) { + specificationCase_ = 0; + specification_ = null; + onChanged(); + } + } else { + if (specificationCase_ == 4) { + specificationCase_ = 0; + specification_ = null; + } + openApiSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + public com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.Builder getOpenApiSpecBuilder() { + return getOpenApiSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.OpenApiToolOrBuilder getOpenApiSpecOrBuilder() { + if ((specificationCase_ == 4) && (openApiSpecBuilder_ != null)) { + return openApiSpecBuilder_.getMessageOrBuilder(); + } else { + if (specificationCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance(); + } + } + + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool, + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiToolOrBuilder> + getOpenApiSpecFieldBuilder() { + if (openApiSpecBuilder_ == null) { + if (!(specificationCase_ == 4)) { + specification_ = com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.getDefaultInstance(); + } + openApiSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool, + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiToolOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) specification_, + getParentForChildren(), + isClean()); + specification_ = null; + } + specificationCase_ = 4; + onChanged(); + return openApiSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreToolOrBuilder> + dataStoreSpecBuilder_; + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + * + * @return Whether the dataStoreSpec field is set. + */ + @java.lang.Override + public boolean hasDataStoreSpec() { + return specificationCase_ == 8; + } + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + * + * @return The dataStoreSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool getDataStoreSpec() { + if (dataStoreSpecBuilder_ == null) { + if (specificationCase_ == 8) { + return (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance(); + } else { + if (specificationCase_ == 8) { + return dataStoreSpecBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + public Builder setDataStoreSpec(com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool value) { + if (dataStoreSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specification_ = value; + onChanged(); + } else { + dataStoreSpecBuilder_.setMessage(value); + } + specificationCase_ = 8; + return this; + } + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + public Builder setDataStoreSpec( + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.Builder builderForValue) { + if (dataStoreSpecBuilder_ == null) { + specification_ = builderForValue.build(); + onChanged(); + } else { + dataStoreSpecBuilder_.setMessage(builderForValue.build()); + } + specificationCase_ = 8; + return this; + } + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + public Builder mergeDataStoreSpec(com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool value) { + if (dataStoreSpecBuilder_ == null) { + if (specificationCase_ == 8 + && specification_ + != com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance()) { + specification_ = + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) specification_) + .mergeFrom(value) + .buildPartial(); + } else { + specification_ = value; + } + onChanged(); + } else { + if (specificationCase_ == 8) { + dataStoreSpecBuilder_.mergeFrom(value); + } else { + dataStoreSpecBuilder_.setMessage(value); + } + } + specificationCase_ = 8; + return this; + } + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + public Builder clearDataStoreSpec() { + if (dataStoreSpecBuilder_ == null) { + if (specificationCase_ == 8) { + specificationCase_ = 0; + specification_ = null; + onChanged(); + } + } else { + if (specificationCase_ == 8) { + specificationCase_ = 0; + specification_ = null; + } + dataStoreSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.Builder getDataStoreSpecBuilder() { + return getDataStoreSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.DataStoreToolOrBuilder + getDataStoreSpecOrBuilder() { + if ((specificationCase_ == 8) && (dataStoreSpecBuilder_ != null)) { + return dataStoreSpecBuilder_.getMessageOrBuilder(); + } else { + if (specificationCase_ == 8) { + return (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreToolOrBuilder> + getDataStoreSpecFieldBuilder() { + if (dataStoreSpecBuilder_ == null) { + if (!(specificationCase_ == 8)) { + specification_ = + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.getDefaultInstance(); + } + dataStoreSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreToolOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) specification_, + getParentForChildren(), + isClean()); + specification_ = null; + } + specificationCase_ = 8; + onChanged(); + return dataStoreSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool, + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.FunctionToolOrBuilder> + functionSpecBuilder_; + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + * + * @return Whether the functionSpec field is set. + */ + @java.lang.Override + public boolean hasFunctionSpec() { + return specificationCase_ == 13; + } + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + * + * @return The functionSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool getFunctionSpec() { + if (functionSpecBuilder_ == null) { + if (specificationCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance(); + } else { + if (specificationCase_ == 13) { + return functionSpecBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + public Builder setFunctionSpec(com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool value) { + if (functionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specification_ = value; + onChanged(); + } else { + functionSpecBuilder_.setMessage(value); + } + specificationCase_ = 13; + return this; + } + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + public Builder setFunctionSpec( + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.Builder builderForValue) { + if (functionSpecBuilder_ == null) { + specification_ = builderForValue.build(); + onChanged(); + } else { + functionSpecBuilder_.setMessage(builderForValue.build()); + } + specificationCase_ = 13; + return this; + } + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + public Builder mergeFunctionSpec(com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool value) { + if (functionSpecBuilder_ == null) { + if (specificationCase_ == 13 + && specification_ + != com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance()) { + specification_ = + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.newBuilder( + (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) specification_) + .mergeFrom(value) + .buildPartial(); + } else { + specification_ = value; + } + onChanged(); + } else { + if (specificationCase_ == 13) { + functionSpecBuilder_.mergeFrom(value); + } else { + functionSpecBuilder_.setMessage(value); + } + } + specificationCase_ = 13; + return this; + } + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + public Builder clearFunctionSpec() { + if (functionSpecBuilder_ == null) { + if (specificationCase_ == 13) { + specificationCase_ = 0; + specification_ = null; + onChanged(); + } + } else { + if (specificationCase_ == 13) { + specificationCase_ = 0; + specification_ = null; + } + functionSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + public com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.Builder getFunctionSpecBuilder() { + return getFunctionSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.FunctionToolOrBuilder getFunctionSpecOrBuilder() { + if ((specificationCase_ == 13) && (functionSpecBuilder_ != null)) { + return functionSpecBuilder_.getMessageOrBuilder(); + } else { + if (specificationCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool, + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.FunctionToolOrBuilder> + getFunctionSpecFieldBuilder() { + if (functionSpecBuilder_ == null) { + if (!(specificationCase_ == 13)) { + specification_ = com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.getDefaultInstance(); + } + functionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool, + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.Builder, + com.google.cloud.dialogflow.cx.v3.Tool.FunctionToolOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) specification_, + getParentForChildren(), + isClean()); + specification_ = null; + } + specificationCase_ = 13; + onChanged(); + return functionSpecBuilder_; + } + + private int toolType_ = 0; + + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for toolType. + */ + @java.lang.Override + public int getToolTypeValue() { + return toolType_; + } + + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for toolType to set. + * @return This builder for chaining. + */ + public Builder setToolTypeValue(int value) { + toolType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The toolType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool.ToolType getToolType() { + com.google.cloud.dialogflow.cx.v3.Tool.ToolType result = + com.google.cloud.dialogflow.cx.v3.Tool.ToolType.forNumber(toolType_); + return result == null ? com.google.cloud.dialogflow.cx.v3.Tool.ToolType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The toolType to set. + * @return This builder for chaining. + */ + public Builder setToolType(com.google.cloud.dialogflow.cx.v3.Tool.ToolType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + toolType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearToolType() { + bitField0_ = (bitField0_ & ~0x00000040); + toolType_ = 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.v3.Tool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Tool) + private static final com.google.cloud.dialogflow.cx.v3.Tool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Tool(); + } + + public static com.google.cloud.dialogflow.cx.v3.Tool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tool 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.v3.Tool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCall.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCall.java new file mode 100644 index 000000000000..fbed0095a3f9 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCall.java @@ -0,0 +1,1154 @@ +/* + * Copyright 2026 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/v3/tool_call.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Represents a call of a specific tool's action with the specified inputs.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolCall} + */ +public final class ToolCall extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ToolCall) + ToolCallOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ToolCall.newBuilder() to construct. + private ToolCall(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ToolCall() { + tool_ = ""; + action_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ToolCall(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCall_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCall_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolCall.class, + com.google.cloud.dialogflow.cx.v3.ToolCall.Builder.class); + } + + private int bitField0_; + public static final int TOOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tool_ = ""; + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+   * this call. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + @java.lang.Override + public java.lang.String getTool() { + java.lang.Object ref = tool_; + 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(); + tool_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+   * this call. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; + + /** + * + * + *
+   * Required. The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + 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(); + action_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_PARAMETERS_FIELD_NUMBER = 3; + private com.google.protobuf.Struct inputParameters_; + + /** + * + * + *
+   * Optional. The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputParameters field is set. + */ + @java.lang.Override + public boolean hasInputParameters() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getInputParameters() { + return inputParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputParameters_; + } + + /** + * + * + *
+   * Optional. The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getInputParametersOrBuilder() { + return inputParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputParameters_; + } + + 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(tool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getInputParameters()); + } + 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(tool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInputParameters()); + } + 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.v3.ToolCall)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ToolCall other = + (com.google.cloud.dialogflow.cx.v3.ToolCall) obj; + + if (!getTool().equals(other.getTool())) return false; + if (!getAction().equals(other.getAction())) return false; + if (hasInputParameters() != other.hasInputParameters()) return false; + if (hasInputParameters()) { + if (!getInputParameters().equals(other.getInputParameters())) 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) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + if (hasInputParameters()) { + hash = (37 * hash) + INPUT_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInputParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCall parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCall 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.v3.ToolCall parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCall 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.v3.ToolCall parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCall 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.v3.ToolCall parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCall 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.v3.ToolCall parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCall 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.v3.ToolCall 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.v3.ToolCall 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.v3.ToolCall 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; + } + + /** + * + * + *
+   * Represents a call of a specific tool's action with the specified inputs.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolCall} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ToolCall) + com.google.cloud.dialogflow.cx.v3.ToolCallOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCall_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCall_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolCall.class, + com.google.cloud.dialogflow.cx.v3.ToolCall.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ToolCall.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = ""; + action_ = ""; + inputParameters_ = null; + if (inputParametersBuilder_ != null) { + inputParametersBuilder_.dispose(); + inputParametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCall_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCall getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCall build() { + com.google.cloud.dialogflow.cx.v3.ToolCall result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCall buildPartial() { + com.google.cloud.dialogflow.cx.v3.ToolCall result = + new com.google.cloud.dialogflow.cx.v3.ToolCall(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ToolCall result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = tool_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.action_ = action_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.inputParameters_ = + inputParametersBuilder_ == null ? inputParameters_ : inputParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.ToolCall) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ToolCall) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ToolCall other) { + if (other == com.google.cloud.dialogflow.cx.v3.ToolCall.getDefaultInstance()) return this; + if (!other.getTool().isEmpty()) { + tool_ = other.tool_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInputParameters()) { + mergeInputParameters(other.getInputParameters()); + } + 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: + { + tool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getInputParametersFieldBuilder().getBuilder(), extensionRegistry); + 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 java.lang.Object tool_ = ""; + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tool to set. + * @return This builder for chaining. + */ + public Builder setTool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTool() { + tool_ = getDefaultInstance().getTool(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tool to set. + * @return This builder for chaining. + */ + public Builder setToolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Struct inputParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + inputParametersBuilder_; + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputParameters field is set. + */ + public boolean hasInputParameters() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputParameters. + */ + public com.google.protobuf.Struct getInputParameters() { + if (inputParametersBuilder_ == null) { + return inputParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputParameters_; + } else { + return inputParametersBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputParameters(com.google.protobuf.Struct value) { + if (inputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputParameters_ = value; + } else { + inputParametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (inputParametersBuilder_ == null) { + inputParameters_ = builderForValue.build(); + } else { + inputParametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInputParameters(com.google.protobuf.Struct value) { + if (inputParametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && inputParameters_ != null + && inputParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getInputParametersBuilder().mergeFrom(value); + } else { + inputParameters_ = value; + } + } else { + inputParametersBuilder_.mergeFrom(value); + } + if (inputParameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputParameters() { + bitField0_ = (bitField0_ & ~0x00000004); + inputParameters_ = null; + if (inputParametersBuilder_ != null) { + inputParametersBuilder_.dispose(); + inputParametersBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getInputParametersBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInputParametersFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getInputParametersOrBuilder() { + if (inputParametersBuilder_ != null) { + return inputParametersBuilder_.getMessageOrBuilder(); + } else { + return inputParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputParameters_; + } + } + + /** + * + * + *
+     * Optional. The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInputParametersFieldBuilder() { + if (inputParametersBuilder_ == null) { + inputParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInputParameters(), getParentForChildren(), isClean()); + inputParameters_ = null; + } + return inputParametersBuilder_; + } + + @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.v3.ToolCall) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ToolCall) + private static final com.google.cloud.dialogflow.cx.v3.ToolCall DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ToolCall(); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCall getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolCall 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.v3.ToolCall getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallOrBuilder.java new file mode 100644 index 000000000000..30d8bef4fe75 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2026 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/v3/tool_call.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ToolCallOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ToolCall) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+   * this call. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + java.lang.String getTool(); + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+   * this call. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + com.google.protobuf.ByteString getToolBytes(); + + /** + * + * + *
+   * Required. The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + java.lang.String getAction(); + + /** + * + * + *
+   * Required. The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * Optional. The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputParameters field is set. + */ + boolean hasInputParameters(); + + /** + * + * + *
+   * Optional. The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputParameters. + */ + com.google.protobuf.Struct getInputParameters(); + + /** + * + * + *
+   * Optional. The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getInputParametersOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallProto.java new file mode 100644 index 000000000000..1d3d61d2d482 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallProto.java @@ -0,0 +1,118 @@ +/* + * Copyright 2026 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/v3/tool_call.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public final class ToolCallProto { + private ToolCallProto() {} + + 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_v3_ToolCall_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ToolCall_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_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/v3/tool_cal" + + "l.proto\022\035google.cloud.dialogflow.cx.v3\032\037" + + "google/api/field_behavior.proto\032\031google/" + + "api/resource.proto\032\034google/protobuf/stru" + + "ct.proto\"\215\001\n\010ToolCall\0224\n\004tool\030\001 \001(\tB&\340A\002" + + "\372A \n\036dialogflow.googleapis.com/Tool\022\023\n\006a" + + "ction\030\002 \001(\tB\003\340A\002\0226\n\020input_parameters\030\003 \001" + + "(\0132\027.google.protobuf.StructB\003\340A\001\"\200\002\n\016Too" + + "lCallResult\0224\n\004tool\030\001 \001(\tB&\340A\002\372A \n\036dialo" + + "gflow.googleapis.com/Tool\022\023\n\006action\030\002 \001(" + + "\tB\003\340A\002\022D\n\005error\030\003 \001(\01323.google.cloud.dia" + + "logflow.cx.v3.ToolCallResult.ErrorH\000\0224\n\021" + + "output_parameters\030\004 \001(\0132\027.google.protobu" + + "f.StructH\000\032\035\n\005Error\022\024\n\007message\030\001 \001(\tB\003\340A" + + "\001B\010\n\006resultB\260\001\n!com.google.cloud.dialogf" + + "low.cx.v3B\rToolCallProtoP\001Z1cloud.google" + + ".com/go/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002" + + "DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!Goo" + + "gle::Cloud::Dialogflow::CX::V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_ToolCall_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_ToolCall_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ToolCall_descriptor, + new java.lang.String[] { + "Tool", "Action", "InputParameters", + }); + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_descriptor, + new java.lang.String[] { + "Tool", "Action", "Error", "OutputParameters", "Result", + }); + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_descriptor, + new java.lang.String[] { + "Message", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallResult.java new file mode 100644 index 000000000000..e72d7eb82fc2 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallResult.java @@ -0,0 +1,2196 @@ +/* + * Copyright 2026 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/v3/tool_call.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The result of calling a tool's action that has been executed by the client.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolCallResult} + */ +public final class ToolCallResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ToolCallResult) + ToolCallResultOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ToolCallResult.newBuilder() to construct. + private ToolCallResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ToolCallResult() { + tool_ = ""; + action_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ToolCallResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolCallResult.class, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Builder.class); + } + + public interface ErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ToolCallResult.Error) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The error message of the function.
+     * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The message. + */ + java.lang.String getMessage(); + + /** + * + * + *
+     * Optional. The error message of the function.
+     * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + } + + /** + * + * + *
+   * An error produced by the tool call.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolCallResult.Error} + */ + public static final class Error extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ToolCallResult.Error) + ErrorOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Error.newBuilder() to construct. + private Error(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Error() { + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Error(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.class, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + + /** + * + * + *
+     * Optional. The error message of the function.
+     * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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(); + message_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The error message of the function.
+     * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); + } + 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(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); + } + 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.v3.ToolCallResult.Error)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error other = + (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) obj; + + if (!getMessage().equals(other.getMessage())) 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) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error 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.v3.ToolCallResult.Error parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error 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.v3.ToolCallResult.Error parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error 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.v3.ToolCallResult.Error parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error 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.v3.ToolCallResult.Error parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error 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.v3.ToolCallResult.Error 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.v3.ToolCallResult.Error 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.v3.ToolCallResult.Error 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; + } + + /** + * + * + *
+     * An error produced by the tool call.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolCallResult.Error} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ToolCallResult.Error) + com.google.cloud.dialogflow.cx.v3.ToolCallResult.ErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.class, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + message_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_Error_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error build() { + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error buildPartial() { + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error result = + new com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.message_ = message_; + } + } + + @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.v3.ToolCallResult.Error) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error other) { + if (other == com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance()) + return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000001; + 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: + { + message_ = input.readStringRequireUtf8(); + 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 java.lang.Object message_ = ""; + + /** + * + * + *
+       * Optional. The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000001; + 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.v3.ToolCallResult.Error) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ToolCallResult.Error) + private static final com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error(); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Error 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.v3.ToolCallResult.Error getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ERROR(3), + OUTPUT_PARAMETERS(4), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(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 ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 3: + return ERROR; + case 4: + return OUTPUT_PARAMETERS; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int TOOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tool_ = ""; + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+   * this call. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + @java.lang.Override + public java.lang.String getTool() { + java.lang.Object ref = tool_; + 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(); + tool_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+   * this call. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; + + /** + * + * + *
+   * Required. The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + 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(); + action_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_FIELD_NUMBER = 3; + + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 3; + } + + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error getError() { + if (resultCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) result_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance(); + } + + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.ErrorOrBuilder getErrorOrBuilder() { + if (resultCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) result_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance(); + } + + public static final int OUTPUT_PARAMETERS_FIELD_NUMBER = 4; + + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return Whether the outputParameters field is set. + */ + @java.lang.Override + public boolean hasOutputParameters() { + return resultCase_ == 4; + } + + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return The outputParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getOutputParameters() { + if (resultCase_ == 4) { + return (com.google.protobuf.Struct) result_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getOutputParametersOrBuilder() { + if (resultCase_ == 4) { + return (com.google.protobuf.Struct) result_; + } + return com.google.protobuf.Struct.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); + } + if (resultCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) result_); + } + if (resultCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Struct) result_); + } + 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(tool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); + } + if (resultCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) result_); + } + if (resultCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.protobuf.Struct) result_); + } + 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.v3.ToolCallResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ToolCallResult other = + (com.google.cloud.dialogflow.cx.v3.ToolCallResult) obj; + + if (!getTool().equals(other.getTool())) return false; + if (!getAction().equals(other.getAction())) return false; + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 3: + if (!getError().equals(other.getError())) return false; + break; + case 4: + if (!getOutputParameters().equals(other.getOutputParameters())) 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) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + switch (resultCase_) { + case 3: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 4: + hash = (37 * hash) + OUTPUT_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getOutputParameters().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult 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.v3.ToolCallResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult 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.v3.ToolCallResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult 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.v3.ToolCallResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult 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.v3.ToolCallResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult 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.v3.ToolCallResult 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.v3.ToolCallResult 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.v3.ToolCallResult 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 result of calling a tool's action that has been executed by the client.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolCallResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ToolCallResult) + com.google.cloud.dialogflow.cx.v3.ToolCallResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolCallResult.class, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ToolCallResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = ""; + action_ = ""; + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + if (outputParametersBuilder_ != null) { + outputParametersBuilder_.clear(); + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolCallResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult build() { + com.google.cloud.dialogflow.cx.v3.ToolCallResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult buildPartial() { + com.google.cloud.dialogflow.cx.v3.ToolCallResult result = + new com.google.cloud.dialogflow.cx.v3.ToolCallResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ToolCallResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = tool_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.action_ = action_; + } + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.ToolCallResult result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 3 && errorBuilder_ != null) { + result.result_ = errorBuilder_.build(); + } + if (resultCase_ == 4 && outputParametersBuilder_ != null) { + result.result_ = outputParametersBuilder_.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.v3.ToolCallResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ToolCallResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ToolCallResult other) { + if (other == com.google.cloud.dialogflow.cx.v3.ToolCallResult.getDefaultInstance()) + return this; + if (!other.getTool().isEmpty()) { + tool_ = other.tool_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getResultCase()) { + case ERROR: + { + mergeError(other.getError()); + break; + } + case OUTPUT_PARAMETERS: + { + mergeOutputParameters(other.getOutputParameters()); + break; + } + case RESULT_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: + { + tool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getOutputParametersFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 4; + break; + } // case 34 + 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 resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object tool_ = ""; + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tool to set. + * @return This builder for chaining. + */ + public Builder setTool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTool() { + tool_ = getDefaultInstance().getTool(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+     * this call. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tool to set. + * @return This builder for chaining. + */ + public Builder setToolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.ErrorOrBuilder> + errorBuilder_; + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 3; + } + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) result_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance(); + } else { + if (resultCase_ == 3) { + return errorBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + public Builder setError(com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 3; + return this; + } + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + public Builder setError( + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 3; + return this; + } + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + public Builder mergeError(com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error value) { + if (errorBuilder_ == null) { + if (resultCase_ == 3 + && result_ + != com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance()) { + result_ = + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.newBuilder( + (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 3) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + resultCase_ = 3; + return this; + } + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolCallResult.ErrorOrBuilder getErrorOrBuilder() { + if ((resultCase_ == 3) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) result_; + } + return com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.ErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 3)) { + result_ = com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.getDefaultInstance(); + } + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.Builder, + com.google.cloud.dialogflow.cx.v3.ToolCallResult.ErrorOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 3; + onChanged(); + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + outputParametersBuilder_; + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return Whether the outputParameters field is set. + */ + @java.lang.Override + public boolean hasOutputParameters() { + return resultCase_ == 4; + } + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return The outputParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getOutputParameters() { + if (outputParametersBuilder_ == null) { + if (resultCase_ == 4) { + return (com.google.protobuf.Struct) result_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } else { + if (resultCase_ == 4) { + return outputParametersBuilder_.getMessage(); + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public Builder setOutputParameters(com.google.protobuf.Struct value) { + if (outputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + outputParametersBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public Builder setOutputParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (outputParametersBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + outputParametersBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 4; + return this; + } + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public Builder mergeOutputParameters(com.google.protobuf.Struct value) { + if (outputParametersBuilder_ == null) { + if (resultCase_ == 4 && result_ != com.google.protobuf.Struct.getDefaultInstance()) { + result_ = + com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 4) { + outputParametersBuilder_.mergeFrom(value); + } else { + outputParametersBuilder_.setMessage(value); + } + } + resultCase_ = 4; + return this; + } + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public Builder clearOutputParameters() { + if (outputParametersBuilder_ == null) { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + } + outputParametersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public com.google.protobuf.Struct.Builder getOutputParametersBuilder() { + return getOutputParametersFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getOutputParametersOrBuilder() { + if ((resultCase_ == 4) && (outputParametersBuilder_ != null)) { + return outputParametersBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 4) { + return (com.google.protobuf.Struct) result_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getOutputParametersFieldBuilder() { + if (outputParametersBuilder_ == null) { + if (!(resultCase_ == 4)) { + result_ = com.google.protobuf.Struct.getDefaultInstance(); + } + outputParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + (com.google.protobuf.Struct) result_, getParentForChildren(), isClean()); + result_ = null; + } + resultCase_ = 4; + onChanged(); + return outputParametersBuilder_; + } + + @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.v3.ToolCallResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ToolCallResult) + private static final com.google.cloud.dialogflow.cx.v3.ToolCallResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ToolCallResult(); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolCallResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolCallResult 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.v3.ToolCallResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallResultOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallResultOrBuilder.java new file mode 100644 index 000000000000..3bc40dc91cc5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolCallResultOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2026 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/v3/tool_call.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ToolCallResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ToolCallResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+   * this call. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + java.lang.String getTool(); + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
+   * this call. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + com.google.protobuf.ByteString getToolBytes(); + + /** + * + * + *
+   * Required. The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + java.lang.String getAction(); + + /** + * + * + *
+   * Required. The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + * + * @return The error. + */ + com.google.cloud.dialogflow.cx.v3.ToolCallResult.Error getError(); + + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.ToolCallResult.Error error = 3; + */ + com.google.cloud.dialogflow.cx.v3.ToolCallResult.ErrorOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return Whether the outputParameters field is set. + */ + boolean hasOutputParameters(); + + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return The outputParameters. + */ + com.google.protobuf.Struct getOutputParameters(); + + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + com.google.protobuf.StructOrBuilder getOutputParametersOrBuilder(); + + com.google.cloud.dialogflow.cx.v3.ToolCallResult.ResultCase getResultCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolName.java new file mode 100644 index 000000000000..d4876518176b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ToolName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TOOL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String tool; + + @Deprecated + protected ToolName() { + project = null; + location = null; + agent = null; + tool = null; + } + + private ToolName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + tool = Preconditions.checkNotNull(builder.getTool()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTool() { + return tool; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ToolName of(String project, String location, String agent, String tool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTool(tool) + .build(); + } + + public static String format(String project, String location, String agent, String tool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTool(tool) + .build() + .toString(); + } + + public static ToolName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_TOOL.validatedMatch( + formattedString, "ToolName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("tool")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ToolName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_TOOL.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (tool != null) { + fieldMapBuilder.put("tool", tool); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_TOOL.instantiate( + "project", project, "location", location, "agent", agent, "tool", tool); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ToolName that = ((ToolName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.tool, that.tool); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(tool); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/tools/{tool}. */ + public static class Builder { + private String project; + private String location; + private String agent; + private String tool; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTool() { + return tool; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setTool(String tool) { + this.tool = tool; + return this; + } + + private Builder(ToolName toolName) { + this.project = toolName.project; + this.location = toolName.location; + this.agent = toolName.agent; + this.tool = toolName.tool; + } + + public ToolName build() { + return new ToolName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolOrBuilder.java new file mode 100644 index 000000000000..79c3b8bc9a9f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolOrBuilder.java @@ -0,0 +1,251 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Tool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the Tool.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * The unique identifier of the Tool.
+   * Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The human-readable name of the Tool, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Required. The human-readable name of the Tool, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. High level description of the Tool and its usage.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Required. High level description of the Tool and its usage.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + * + * @return Whether the openApiSpec field is set. + */ + boolean hasOpenApiSpec(); + + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + * + * @return The openApiSpec. + */ + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool getOpenApiSpec(); + + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.OpenApiTool open_api_spec = 4; + */ + com.google.cloud.dialogflow.cx.v3.Tool.OpenApiToolOrBuilder getOpenApiSpecOrBuilder(); + + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + * + * @return Whether the dataStoreSpec field is set. + */ + boolean hasDataStoreSpec(); + + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + * + * @return The dataStoreSpec. + */ + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool getDataStoreSpec(); + + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.DataStoreTool data_store_spec = 8; + */ + com.google.cloud.dialogflow.cx.v3.Tool.DataStoreToolOrBuilder getDataStoreSpecOrBuilder(); + + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + * + * @return Whether the functionSpec field is set. + */ + boolean hasFunctionSpec(); + + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + * + * @return The functionSpec. + */ + com.google.cloud.dialogflow.cx.v3.Tool.FunctionTool getFunctionSpec(); + + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool.FunctionTool function_spec = 13; + */ + com.google.cloud.dialogflow.cx.v3.Tool.FunctionToolOrBuilder getFunctionSpecOrBuilder(); + + /** + * + * + *
+   * Output only. The tool type.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for toolType. + */ + int getToolTypeValue(); + + /** + * + * + *
+   * Output only. The tool type.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The toolType. + */ + com.google.cloud.dialogflow.cx.v3.Tool.ToolType getToolType(); + + com.google.cloud.dialogflow.cx.v3.Tool.SpecificationCase getSpecificationCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolProto.java new file mode 100644 index 000000000000..062a45f251fa --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolProto.java @@ -0,0 +1,646 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public final class ToolProto { + private ToolProto() {} + + 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_v3_CreateToolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_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/v3/tool.pro" + + "to\022\035google.cloud.dialogflow.cx.v3\032\034googl" + + "e/api/annotations.proto\032\027google/api/clie" + + "nt.proto\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\0329google/clo" + + "ud/dialogflow/cx/v3/data_store_connection.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\034google/p" + + "rotobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\203\001\n" + + "\021CreateToolRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A" + + " \022\036dialogflow.googleapis.com/Tool\0226\n" + + "\004tool\030\002 \001(\0132#.google.cloud.dialogflow.cx.v3.ToolB\003\340A\002\"q\n" + + "\020ListToolsRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A" + + " \022\036dialogflow.googleapis.com/Tool\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\"`\n" + + "\021ListToolsResponse\0222\n" + + "\005tools\030\001 \003(\0132#.google.cloud.dialogflow.cx.v3.Tool\022\027\n" + + "\017next_page_token\030\002 \001(\t\"F\n" + + "\016GetToolRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036dialogflow.googleapis.com/Tool\"|\n" + + "\021UpdateToolRequest\0226\n" + + "\004tool\030\001 \001(\0132#.google.cloud.dialogflow.cx.v3.ToolB\003\340A\002\022/\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"X\n" + + "\021DeleteToolRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036dialogflow.googleapis.com/Tool\022\r\n" + + "\005force\030\002 \001(\010\"\322\030\n" + + "\004Tool\022\014\n" + + "\004name\030\001 \001(\t\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\002\022H\n\r" + + "open_api_spec\030\004 \001(\0132/.google.clo" + + "ud.dialogflow.cx.v3.Tool.OpenApiToolH\000\022L\n" + + "\017data_store_spec\030\010" + + " \001(\01321.google.cloud.dialogflow.cx.v3.Tool.DataStoreToolH\000\022I\n\r" + + "function_spec\030\r" + + " \001(\01320.google.cloud.dialogflow.cx.v3.Tool.FunctionToolH\000\022D\n" + + "\ttool_type\030\014" + + " \001(\0162,.google.cloud.dialogflow.cx.v3.Tool.ToolTypeB\003\340A\003\032\257\002\n" + + "\013OpenApiTool\022\032\n" + + "\013text_schema\030\001 \001(\tB\003\340A\002H\000\022O\n" + + "\016authentication\030\002" + + " \001(\01322.google.cloud.dialogflow.cx.v3.Tool.AuthenticationB\003\340A\001\022F\n\n" + + "tls_config\030\003" + + " \001(\0132-.google.cloud.dialogflow.cx.v3.Tool.TLSConfigB\003\340A\001\022a\n" + + "\030service_directory_config\030\004" + + " \001(\0132:.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfigB\003\340A\001B\010\n" + + "\006schema\032\332\001\n\r" + + "DataStoreTool\022W\n" + + "\026data_store_connections\030\001" + + " \003(\01322.google.cloud.dialogflow.cx.v3.DataStoreConnectionB\003\340A\002\022^\n" + + "\017fallback_prompt\030\003 \001(\0132@.google.cloud.dialo" + + "gflow.cx.v3.Tool.DataStoreTool.FallbackPromptB\003\340A\002\032\020\n" + + "\016FallbackPrompt\032w\n" + + "\014FunctionTool\0222\n" + + "\014input_schema\030\001 \001(\0132\027.google.protobuf.StructB\003\340A\001\0223\n\r" + + "output_schema\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\032\235\r\n" + + "\016Authentication\022Y\n" + + "\016api_key_config\030\001 \001(\0132?.googl" + + "e.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfigH\000\022V\n" + + "\014oauth_config\030\002 \001(" + + "\0132>.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfigH\000\022n\n" + + "\031service_agent_auth_config\030\003 \001(\0132I.google.cloud.di" + + "alogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfigH\000\022c\n" + + "\023bearer_token_config\030\004 \001(\0132D.google.cloud.dialogflow.cx.v3" + + ".Tool.Authentication.BearerTokenConfigH\000\022r\n" + + "\033service_account_auth_config\030\005 \001(\0132K." + + "google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfigH\000\032\366\001\n" + + "\014ApiKeyConfig\022\025\n" + + "\010key_name\030\001 \001(\tB\003\340A\002\022\024\n" + + "\007api_key\030\002 \001(\tB\003\340A\001\022V\n" + + "\032secret_version_for_api_key\030\004 \001(\tB2\340A\001\372A,\n" + + "*secretmanager.googleapis.com/SecretVersion\022a\n" + + "\020request_location\030\003 \001(\0162B.google.cloud.dialogflow.c" + + "x.v3.Tool.Authentication.RequestLocationB\003\340A\002\032\212\003\n" + + "\013OAuthConfig\022l\n" + + "\020oauth_grant_type\030\001 \001(\0162M.google.cloud.dialogflow.cx.v3." + + "Tool.Authentication.OAuthConfig.OauthGrantTypeB\003\340A\002\022\026\n" + + "\tclient_id\030\002 \001(\tB\003\340A\002\022\032\n\r" + + "client_secret\030\003 \001(\tB\003\340A\001\022\\\n" + + " secret_version_for_client_secret\030\006 \001(\tB2\340A\001\372A,\n" + + "*secretmanager.googleapis.com/SecretVersion\022\033\n" + + "\016token_endpoint\030\004 \001(\tB\003\340A\002\022\023\n" + + "\006scopes\030\005 \003(\tB\003\340A\001\"I\n" + + "\016OauthGrantType\022 \n" + + "\034OAUTH_GRANT_TYPE_UNSPECIFIED\020\000\022\025\n" + + "\021CLIENT_CREDENTIAL\020\001\032\355\001\n" + + "\026ServiceAgentAuthConfig\022{\n" + + "\022service_agent_auth\030\001 \001(\0162Z.google.cloud.dialogf" + + "low.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuthB\003\340A\001\"V\n" + + "\020ServiceAgentAuth\022\"\n" + + "\036SERVICE_AGENT_AUTH_UNSPECIFIED\020\000\022\014\n" + + "\010ID_TOKEN\020\001\022\020\n" + + "\014ACCESS_TOKEN\020\002\032}\n" + + "\021BearerTokenConfig\022\022\n" + + "\005token\030\001 \001(\tB\003\340A\001\022T\n" + + "\030secret_version_for_token\030\002 \001(\tB2\340A\001\372A,\n" + + "*secretmanager.googleapis.com/SecretVersion\0328\n" + + "\030ServiceAccountAuthConfig\022\034\n" + + "\017service_account\030\001 \001(\tB\003\340A\002\"Q\n" + + "\017RequestLocation\022 \n" + + "\034REQUEST_LOCATION_UNSPECIFIED\020\000\022\n\n" + + "\006HEADER\020\001\022\020\n" + + "\014QUERY_STRING\020\002B\r\n" + + "\013auth_config\032\220\001\n" + + "\tTLSConfig\022K\n" + + "\010ca_certs\030\001 \003(\01324." + + "google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACertB\003\340A\002\0326\n" + + "\006CACert\022\031\n" + + "\014display_name\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004cert\030\002 \001(\014B\003\340A\002\032Z\n" + + "\026ServiceDirectoryConfig\022@\n" + + "\007service\030\001 \001(\tB/\340A\002\372A)\n" + + "\'servicedirectory.googleapis.com/Service\"L\n" + + "\010ToolType\022\031\n" + + "\025TOOL_TYPE_UNSPECIFIED\020\000\022\023\n" + + "\017CUSTOMIZED_TOOL\020\001\022\020\n" + + "\014BUILTIN_TOOL\020\002:h\352Ae\n" + + "\036dialogflow.googleapis.com/Tool\022" + + "Cprojects/{project}/locations/{location}/agents/{agent}/tools/{tool}B\017\n\r" + + "specification\"\211\001\n" + + "\027ListToolVersionsRequest\022=\n" + + "\006parent\030\001 \001(" + + "\tB-\340A\002\372A\'\022%dialogflow.googleapis.com/ToolVersion\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"v\n" + + "\030ListToolVersionsResponse\022A\n\r" + + "tool_versions\030\001 \003(\0132*.google.cloud.dialogflow.cx.v3.ToolVersion\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\240\001\n" + + "\030CreateToolVersionRequest\022=\n" + + "\006parent\030\001 \001(" + + "\tB-\340A\002\372A\'\022%dialogflow.googleapis.com/ToolVersion\022E\n" + + "\014tool_version\030\002" + + " \001(\0132*.google.cloud.dialogflow.cx.v3.ToolVersionB\003\340A\002\"T\n" + + "\025GetToolVersionRequest\022;\n" + + "\004name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%dialogflow.googleapis.com/ToolVersion\"k\n" + + "\030DeleteToolVersionRequest\022;\n" + + "\004name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%dialogflow.googleapis.com/ToolVersion\022\022\n" + + "\005force\030\002 \001(\010B\003\340A\001\"X\n" + + "\031RestoreToolVersionRequest\022;\n" + + "\004name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%dialogflow.googleapis.com/ToolVersion\"O\n" + + "\032RestoreToolVersionResponse\0221\n" + + "\004tool\030\002 \001(\0132#.google.cloud.dialogflow.cx.v3.Tool\"\200\003\n" + + "\013ToolVersion\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\0226\n" + + "\004tool\030\003 \001(\0132#.google.cloud.dialogflow.cx.v3.ToolB\003\340A\002\0224\n" + + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003:\236\001\352A\232\001\n" + + "%dialogflow.googleapis.com/ToolVersion\022Vprojects/{pr" + + "oject}/locations/{location}/agents/{agen" + + "t}/tools/{tool}/versions/{version}*\014toolVersions2\013toolVersion2\205\020\n" + + "\005Tools\022\263\001\n\n" + + "CreateTool\0220.google.cloud.dialogflow.cx.v3.C" + + "reateToolRequest\032#.google.cloud.dialogfl" + + "ow.cx.v3.Tool\"N\332A\013parent,tool\202\323\344\223\002:\"2/v3" + + "/{parent=projects/*/locations/*/agents/*}/tools:\004tool\022\263\001\n" + + "\tListTools\022/.google.cloud.dialogflow.cx.v3.ListToolsRequest\0320.g" + + "oogle.cloud.dialogflow.cx.v3.ListToolsRe" + + "sponse\"C\332A\006parent\202\323\344\223\0024\0222/v3/{parent=projects/*/locations/*/agents/*}/tools\022\240\001\n" + + "\007GetTool\022-.google.cloud.dialogflow.cx.v3." + + "GetToolRequest\032#.google.cloud.dialogflow" + + ".cx.v3.Tool\"A\332A\004name\202\323\344\223\0024\0222/v3/{name=pr" + + "ojects/*/locations/*/agents/*/tools/*}\022\275\001\n\n" + + "UpdateTool\0220.google.cloud.dialogflow.cx.v3.UpdateToolRequest\032#.google.cloud.d" + + "ialogflow.cx.v3.Tool\"X\332A\020tool,update_mas" + + "k\202\323\344\223\002?27/v3/{tool.name=projects/*/locations/*/agents/*/tools/*}:\004tool\022\231\001\n\n" + + "DeleteTool\0220.google.cloud.dialogflow.cx.v3.De" + + "leteToolRequest\032\026.google.protobuf.Empty\"" + + "A\332A\004name\202\323\344\223\0024*2/v3/{name=projects/*/locations/*/agents/*/tools/*}\022\323\001\n" + + "\020ListToolVersions\0226.google.cloud.dialogflow.cx.v3." + + "ListToolVersionsRequest\0327.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse" + + "\"N\332A\006parent\202\323\344\223\002?\022=/v3/{parent=projects/" + + "*/locations/*/agents/*/tools/*}/versions\022\343\001\n" + + "\021CreateToolVersion\0227.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest\032" + + "*.google.cloud.dialogflow.cx.v3.ToolVers" + + "ion\"i\332A\023parent,tool_version\202\323\344\223\002M\"=/v3/{" + + "parent=projects/*/locations/*/agents/*/tools/*}/versions:\014tool_version\022\300\001\n" + + "\016GetToolVersion\0224.google.cloud.dialogflow.cx.v" + + "3.GetToolVersionRequest\032*.google.cloud.d" + + "ialogflow.cx.v3.ToolVersion\"L\332A\004name\202\323\344\223" + + "\002?\022=/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}\022\262\001\n" + + "\021DeleteToolVersion\0227.google.cloud.dialogflow.cx.v3." + + "DeleteToolVersionRequest\032\026.google.protob" + + "uf.Empty\"L\332A\004name\202\323\344\223\002?*=/v3/{name=proje" + + "cts/*/locations/*/agents/*/tools/*/versions/*}\022\342\001\n" + + "\022RestoreToolVersion\0228.google.cloud.dialogflow.cx.v3.RestoreToolVersion" + + "Request\0329.google.cloud.dialogflow.cx.v3." + + "RestoreToolVersionResponse\"W\332A\004name\202\323\344\223\002" + + "J\"E/v3/{name=projects/*/locations/*/agen" + + "ts/*/tools/*/versions/*}:restore:\001*\032x\312A\031" + + "dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https" + + "://www.googleapis.com/auth/dialogflowB\210\001\n" + + "!com.google.cloud.dialogflow.cx.v3B\tToolProtoP\001Z1cloud.google.com/go/dialogflow" + + "/cx/apiv3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + 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.v3.DataStoreConnectionProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CreateToolRequest_descriptor, + new java.lang.String[] { + "Parent", "Tool", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListToolsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListToolsResponse_descriptor, + new java.lang.String[] { + "Tools", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetToolRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_descriptor, + new java.lang.String[] { + "Tool", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3_Tool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "OpenApiSpec", + "DataStoreSpec", + "FunctionSpec", + "ToolType", + "Specification", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_OpenApiTool_descriptor, + new java.lang.String[] { + "TextSchema", "Authentication", "TlsConfig", "ServiceDirectoryConfig", "Schema", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_descriptor, + new java.lang.String[] { + "DataStoreConnections", "FallbackPrompt", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_DataStoreTool_FallbackPrompt_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_FunctionTool_descriptor, + new java.lang.String[] { + "InputSchema", "OutputSchema", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor, + new java.lang.String[] { + "ApiKeyConfig", + "OauthConfig", + "ServiceAgentAuthConfig", + "BearerTokenConfig", + "ServiceAccountAuthConfig", + "AuthConfig", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ApiKeyConfig_descriptor, + new java.lang.String[] { + "KeyName", "ApiKey", "SecretVersionForApiKey", "RequestLocation", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_OAuthConfig_descriptor, + new java.lang.String[] { + "OauthGrantType", + "ClientId", + "ClientSecret", + "SecretVersionForClientSecret", + "TokenEndpoint", + "Scopes", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAgentAuthConfig_descriptor, + new java.lang.String[] { + "ServiceAgentAuth", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_BearerTokenConfig_descriptor, + new java.lang.String[] { + "Token", "SecretVersionForToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_Authentication_ServiceAccountAuthConfig_descriptor, + new java.lang.String[] { + "ServiceAccount", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_descriptor, + new java.lang.String[] { + "CaCerts", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_TLSConfig_CACert_descriptor, + new java.lang.String[] { + "DisplayName", "Cert", + }); + internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Tool_descriptor.getNestedTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Tool_ServiceDirectoryConfig_descriptor, + new java.lang.String[] { + "Service", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListToolVersionsResponse_descriptor, + new java.lang.String[] { + "ToolVersions", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_CreateToolVersionRequest_descriptor, + new java.lang.String[] { + "Parent", "ToolVersion", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_GetToolVersionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DeleteToolVersionRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RestoreToolVersionResponse_descriptor, + new java.lang.String[] { + "Tool", + }); + internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Tool", "CreateTime", "UpdateTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + 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.v3.DataStoreConnectionProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolUse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolUse.java new file mode 100644 index 000000000000..899d576f2979 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolUse.java @@ -0,0 +1,1668 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Stores metadata of the invocation of an action supported by a tool.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolUse} + */ +public final class ToolUse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ToolUse) + ToolUseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ToolUse.newBuilder() to construct. + private ToolUse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ToolUse() { + tool_ = ""; + displayName_ = ""; + action_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ToolUse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolUse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolUse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolUse.class, + com.google.cloud.dialogflow.cx.v3.ToolUse.Builder.class); + } + + private int bitField0_; + public static final int TOOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tool_ = ""; + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+   * used. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + @java.lang.Override + public java.lang.String getTool() { + java.lang.Object ref = tool_; + 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(); + tool_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+   * used. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. The display name of the tool.
+   * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The display name of the tool.
+   * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; + + /** + * + * + *
+   * Optional. Name of the action to be called during the tool use.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + 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(); + action_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Name of the action to be called during the tool use.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_ACTION_PARAMETERS_FIELD_NUMBER = 5; + private com.google.protobuf.Struct inputActionParameters_; + + /** + * + * + *
+   * Optional. A list of input parameters for the action.
+   * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputActionParameters field is set. + */ + @java.lang.Override + public boolean hasInputActionParameters() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. A list of input parameters for the action.
+   * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputActionParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getInputActionParameters() { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; + } + + /** + * + * + *
+   * Optional. A list of input parameters for the action.
+   * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder() { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; + } + + public static final int OUTPUT_ACTION_PARAMETERS_FIELD_NUMBER = 6; + private com.google.protobuf.Struct outputActionParameters_; + + /** + * + * + *
+   * Optional. A list of output parameters generated by the action.
+   * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputActionParameters field is set. + */ + @java.lang.Override + public boolean hasOutputActionParameters() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. A list of output parameters generated by the action.
+   * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputActionParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getOutputActionParameters() { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; + } + + /** + * + * + *
+   * Optional. A list of output parameters generated by the action.
+   * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder() { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; + } + + 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(tool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getInputActionParameters()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getOutputActionParameters()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, displayName_); + } + 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(tool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInputActionParameters()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOutputActionParameters()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, displayName_); + } + 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.v3.ToolUse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ToolUse other = + (com.google.cloud.dialogflow.cx.v3.ToolUse) obj; + + if (!getTool().equals(other.getTool())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getAction().equals(other.getAction())) return false; + if (hasInputActionParameters() != other.hasInputActionParameters()) return false; + if (hasInputActionParameters()) { + if (!getInputActionParameters().equals(other.getInputActionParameters())) return false; + } + if (hasOutputActionParameters() != other.hasOutputActionParameters()) return false; + if (hasOutputActionParameters()) { + if (!getOutputActionParameters().equals(other.getOutputActionParameters())) 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) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + if (hasInputActionParameters()) { + hash = (37 * hash) + INPUT_ACTION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInputActionParameters().hashCode(); + } + if (hasOutputActionParameters()) { + hash = (37 * hash) + OUTPUT_ACTION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getOutputActionParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ToolUse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolUse 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.v3.ToolUse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolUse 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.v3.ToolUse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolUse 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.v3.ToolUse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolUse 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.v3.ToolUse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolUse 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.v3.ToolUse 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.v3.ToolUse 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.v3.ToolUse 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; + } + + /** + * + * + *
+   * Stores metadata of the invocation of an action supported by a tool.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolUse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ToolUse) + com.google.cloud.dialogflow.cx.v3.ToolUseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolUse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolUse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolUse.class, + com.google.cloud.dialogflow.cx.v3.ToolUse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ToolUse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputActionParametersFieldBuilder(); + getOutputActionParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = ""; + displayName_ = ""; + action_ = ""; + inputActionParameters_ = null; + if (inputActionParametersBuilder_ != null) { + inputActionParametersBuilder_.dispose(); + inputActionParametersBuilder_ = null; + } + outputActionParameters_ = null; + if (outputActionParametersBuilder_ != null) { + outputActionParametersBuilder_.dispose(); + outputActionParametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolUse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolUse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolUse build() { + com.google.cloud.dialogflow.cx.v3.ToolUse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolUse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ToolUse result = + new com.google.cloud.dialogflow.cx.v3.ToolUse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ToolUse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = tool_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.action_ = action_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.inputActionParameters_ = + inputActionParametersBuilder_ == null + ? inputActionParameters_ + : inputActionParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.outputActionParameters_ = + outputActionParametersBuilder_ == null + ? outputActionParameters_ + : outputActionParametersBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.ToolUse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ToolUse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ToolUse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ToolUse.getDefaultInstance()) return this; + if (!other.getTool().isEmpty()) { + tool_ = other.tool_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasInputActionParameters()) { + mergeInputActionParameters(other.getInputActionParameters()); + } + if (other.hasOutputActionParameters()) { + mergeOutputActionParameters(other.getOutputActionParameters()); + } + 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: + { + tool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 42: + { + input.readMessage( + getInputActionParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + input.readMessage( + getOutputActionParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 66: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 66 + 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 java.lang.Object tool_ = ""; + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+     * used. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+     * used. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+     * used. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tool to set. + * @return This builder for chaining. + */ + public Builder setTool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+     * used. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTool() { + tool_ = getDefaultInstance().getTool(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+     * used. Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tool to set. + * @return This builder for chaining. + */ + public Builder setToolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. The display name of the tool.
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the tool.
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the tool.
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the tool.
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the tool.
+     * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + action_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Struct inputActionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + inputActionParametersBuilder_; + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputActionParameters field is set. + */ + public boolean hasInputActionParameters() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputActionParameters. + */ + public com.google.protobuf.Struct getInputActionParameters() { + if (inputActionParametersBuilder_ == null) { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; + } else { + return inputActionParametersBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputActionParameters(com.google.protobuf.Struct value) { + if (inputActionParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputActionParameters_ = value; + } else { + inputActionParametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputActionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (inputActionParametersBuilder_ == null) { + inputActionParameters_ = builderForValue.build(); + } else { + inputActionParametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInputActionParameters(com.google.protobuf.Struct value) { + if (inputActionParametersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && inputActionParameters_ != null + && inputActionParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getInputActionParametersBuilder().mergeFrom(value); + } else { + inputActionParameters_ = value; + } + } else { + inputActionParametersBuilder_.mergeFrom(value); + } + if (inputActionParameters_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputActionParameters() { + bitField0_ = (bitField0_ & ~0x00000008); + inputActionParameters_ = null; + if (inputActionParametersBuilder_ != null) { + inputActionParametersBuilder_.dispose(); + inputActionParametersBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getInputActionParametersBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getInputActionParametersFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder() { + if (inputActionParametersBuilder_ != null) { + return inputActionParametersBuilder_.getMessageOrBuilder(); + } else { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; + } + } + + /** + * + * + *
+     * Optional. A list of input parameters for the action.
+     * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInputActionParametersFieldBuilder() { + if (inputActionParametersBuilder_ == null) { + inputActionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInputActionParameters(), getParentForChildren(), isClean()); + inputActionParameters_ = null; + } + return inputActionParametersBuilder_; + } + + private com.google.protobuf.Struct outputActionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + outputActionParametersBuilder_; + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputActionParameters field is set. + */ + public boolean hasOutputActionParameters() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputActionParameters. + */ + public com.google.protobuf.Struct getOutputActionParameters() { + if (outputActionParametersBuilder_ == null) { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; + } else { + return outputActionParametersBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputActionParameters(com.google.protobuf.Struct value) { + if (outputActionParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputActionParameters_ = value; + } else { + outputActionParametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputActionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (outputActionParametersBuilder_ == null) { + outputActionParameters_ = builderForValue.build(); + } else { + outputActionParametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOutputActionParameters(com.google.protobuf.Struct value) { + if (outputActionParametersBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && outputActionParameters_ != null + && outputActionParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getOutputActionParametersBuilder().mergeFrom(value); + } else { + outputActionParameters_ = value; + } + } else { + outputActionParametersBuilder_.mergeFrom(value); + } + if (outputActionParameters_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOutputActionParameters() { + bitField0_ = (bitField0_ & ~0x00000010); + outputActionParameters_ = null; + if (outputActionParametersBuilder_ != null) { + outputActionParametersBuilder_.dispose(); + outputActionParametersBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getOutputActionParametersBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getOutputActionParametersFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder() { + if (outputActionParametersBuilder_ != null) { + return outputActionParametersBuilder_.getMessageOrBuilder(); + } else { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; + } + } + + /** + * + * + *
+     * Optional. A list of output parameters generated by the action.
+     * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getOutputActionParametersFieldBuilder() { + if (outputActionParametersBuilder_ == null) { + outputActionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getOutputActionParameters(), getParentForChildren(), isClean()); + outputActionParameters_ = null; + } + return outputActionParametersBuilder_; + } + + @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.v3.ToolUse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ToolUse) + private static final com.google.cloud.dialogflow.cx.v3.ToolUse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ToolUse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolUse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolUse 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.v3.ToolUse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolUseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolUseOrBuilder.java new file mode 100644 index 000000000000..a724a391fc58 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolUseOrBuilder.java @@ -0,0 +1,198 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ToolUseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ToolUse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+   * used. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + java.lang.String getTool(); + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be
+   * used. Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + com.google.protobuf.ByteString getToolBytes(); + + /** + * + * + *
+   * Output only. The display name of the tool.
+   * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. The display name of the tool.
+   * 
+ * + * string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Name of the action to be called during the tool use.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The action. + */ + java.lang.String getAction(); + + /** + * + * + *
+   * Optional. Name of the action to be called during the tool use.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * Optional. A list of input parameters for the action.
+   * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputActionParameters field is set. + */ + boolean hasInputActionParameters(); + + /** + * + * + *
+   * Optional. A list of input parameters for the action.
+   * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputActionParameters. + */ + com.google.protobuf.Struct getInputActionParameters(); + + /** + * + * + *
+   * Optional. A list of input parameters for the action.
+   * 
+ * + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder(); + + /** + * + * + *
+   * Optional. A list of output parameters generated by the action.
+   * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputActionParameters field is set. + */ + boolean hasOutputActionParameters(); + + /** + * + * + *
+   * Optional. A list of output parameters generated by the action.
+   * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputActionParameters. + */ + com.google.protobuf.Struct getOutputActionParameters(); + + /** + * + * + *
+   * Optional. A list of output parameters generated by the action.
+   * 
+ * + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersion.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersion.java new file mode 100644 index 000000000000..98a15cc4196d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersion.java @@ -0,0 +1,1725 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Tool version is a snapshot of the tool at certain timestamp.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolVersion} + */ +public final class ToolVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ToolVersion) + ToolVersionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ToolVersion.newBuilder() to construct. + private ToolVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ToolVersion() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ToolVersion(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolVersion.class, + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The unique identifier of the tool version.
+   *  Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The unique identifier of the tool version.
+   *  Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Required. The display name of the tool version.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The display name of the tool version.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOOL_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3.Tool tool_; + + /** + * + * + *
+   * Required. Snapshot of the tool to be associated with this version.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + @java.lang.Override + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Snapshot of the tool to be associated with this version.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool getTool() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + + /** + * + * + *
+   * Required. Snapshot of the tool to be associated with this version.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTool()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTool()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + 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.v3.ToolVersion)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ToolVersion other = + (com.google.cloud.dialogflow.cx.v3.ToolVersion) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasTool() != other.hasTool()) return false; + if (hasTool()) { + if (!getTool().equals(other.getTool())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasTool()) { + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ToolVersion parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolVersion 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.v3.ToolVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolVersion 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.v3.ToolVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolVersion 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.v3.ToolVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolVersion 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.v3.ToolVersion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolVersion 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.v3.ToolVersion 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.v3.ToolVersion 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.v3.ToolVersion 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; + } + + /** + * + * + *
+   * Tool version is a snapshot of the tool at certain timestamp.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ToolVersion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ToolVersion) + com.google.cloud.dialogflow.cx.v3.ToolVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ToolVersion.class, + com.google.cloud.dialogflow.cx.v3.ToolVersion.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ToolVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getToolFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_ToolVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolVersion getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolVersion build() { + com.google.cloud.dialogflow.cx.v3.ToolVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolVersion buildPartial() { + com.google.cloud.dialogflow.cx.v3.ToolVersion result = + new com.google.cloud.dialogflow.cx.v3.ToolVersion(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ToolVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tool_ = toolBuilder_ == null ? tool_ : toolBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.ToolVersion) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ToolVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ToolVersion other) { + if (other == com.google.cloud.dialogflow.cx.v3.ToolVersion.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasTool()) { + mergeTool(other.getTool()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getToolFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The unique identifier of the tool version.
+     *  Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The unique identifier of the tool version.
+     *  Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The unique identifier of the tool version.
+     *  Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The unique identifier of the tool version.
+     *  Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The unique identifier of the tool version.
+     *  Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Required. The display name of the tool version.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The display name of the tool version.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The display name of the tool version.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The display name of the tool version.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The display name of the tool version.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Tool tool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + toolBuilder_; + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + public boolean hasTool() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + public com.google.cloud.dialogflow.cx.v3.Tool getTool() { + if (toolBuilder_ == null) { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } else { + return toolBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + } else { + toolBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3.Tool.Builder builderForValue) { + if (toolBuilder_ == null) { + tool_ = builderForValue.build(); + } else { + toolBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTool(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && tool_ != null + && tool_ != com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance()) { + getToolBuilder().mergeFrom(value); + } else { + tool_ = value; + } + } else { + toolBuilder_.mergeFrom(value); + } + if (tool_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTool() { + bitField0_ = (bitField0_ & ~0x00000004); + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Builder getToolBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getToolFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder() { + if (toolBuilder_ != null) { + return toolBuilder_.getMessageOrBuilder(); + } else { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + } + + /** + * + * + *
+     * Required. Snapshot of the tool to be associated with this version.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + getToolFieldBuilder() { + if (toolBuilder_ == null) { + toolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder>( + getTool(), getParentForChildren(), isClean()); + tool_ = null; + } + return toolBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Last time the tool version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @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.v3.ToolVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ToolVersion) + private static final com.google.cloud.dialogflow.cx.v3.ToolVersion DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ToolVersion(); + } + + public static com.google.cloud.dialogflow.cx.v3.ToolVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolVersion 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.v3.ToolVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersionName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersionName.java new file mode 100644 index 000000000000..d06d4ee7d782 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersionName.java @@ -0,0 +1,289 @@ +/* + * Copyright 2026 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.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ToolVersionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TOOL_VERSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String tool; + private final String version; + + @Deprecated + protected ToolVersionName() { + project = null; + location = null; + agent = null; + tool = null; + version = null; + } + + private ToolVersionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + tool = Preconditions.checkNotNull(builder.getTool()); + version = Preconditions.checkNotNull(builder.getVersion()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTool() { + return tool; + } + + public String getVersion() { + return version; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ToolVersionName of( + String project, String location, String agent, String tool, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTool(tool) + .setVersion(version) + .build(); + } + + public static String format( + String project, String location, String agent, String tool, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTool(tool) + .setVersion(version) + .build() + .toString(); + } + + public static ToolVersionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_TOOL_VERSION.validatedMatch( + formattedString, "ToolVersionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("tool"), + matchMap.get("version")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ToolVersionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_TOOL_VERSION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (tool != null) { + fieldMapBuilder.put("tool", tool); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_TOOL_VERSION.instantiate( + "project", project, "location", location, "agent", agent, "tool", tool, "version", version); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ToolVersionName that = ((ToolVersionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.tool, that.tool) + && Objects.equals(this.version, that.version); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(tool); + h *= 1000003; + h ^= Objects.hashCode(version); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String tool; + private String version; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTool() { + return tool; + } + + public String getVersion() { + return version; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setTool(String tool) { + this.tool = tool; + return this; + } + + public Builder setVersion(String version) { + this.version = version; + return this; + } + + private Builder(ToolVersionName toolVersionName) { + this.project = toolVersionName.project; + this.location = toolVersionName.location; + this.agent = toolVersionName.agent; + this.tool = toolVersionName.tool; + this.version = toolVersionName.version; + } + + public ToolVersionName build() { + return new ToolVersionName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersionOrBuilder.java new file mode 100644 index 000000000000..6cfce2072147 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ToolVersionOrBuilder.java @@ -0,0 +1,202 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface ToolVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ToolVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The unique identifier of the tool version.
+   *  Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The unique identifier of the tool version.
+   *  Format:
+   * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the tool version.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Required. The display name of the tool version.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Snapshot of the tool to be associated with this version.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + boolean hasTool(); + + /** + * + * + *
+   * Required. Snapshot of the tool to be associated with this version.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + com.google.cloud.dialogflow.cx.v3.Tool getTool(); + + /** + * + * + *
+   * Required. Snapshot of the tool to be associated with this version.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder(); + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Last time the tool version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TraceProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TraceProto.java new file mode 100644 index 000000000000..99b01705c94d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TraceProto.java @@ -0,0 +1,261 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public final class TraceProto { + private TraceProto() {} + + 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_v3_PlaybookInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Action_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Action_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ToolUse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ToolUse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_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/v3/trace.pr" + + "oto\022\035google.cloud.dialogflow.cx.v3\032\037goog" + + "le/api/field_behavior.proto\032\031google/api/" + + "resource.proto\032\034google/protobuf/struct.proto\"<\n\r" + + "PlaybookInput\022+\n" + + "\036preceding_conversation_summary\030\001 \001(\tB\003\340A\001\"0\n" + + "\016PlaybookOutput\022\036\n" + + "\021execution_summary\030\001 \001(\tB\003\340A\001\"\273\004\n" + + "\006Action\022K\n" + + "\016user_utterance\030\001 \001(\0132,.google" + + ".cloud.dialogflow.cx.v3.UserUtteranceB\003\340A\001H\000\022M\n" + + "\017agent_utterance\030\002 \001(\0132-.google.c" + + "loud.dialogflow.cx.v3.AgentUtteranceB\003\340A\001H\000\022?\n" + + "\010tool_use\030\003" + + " \001(\0132&.google.cloud.dialogflow.cx.v3.ToolUseB\003\340A\001H\000\022U\n" + + "\023playbook_invocation\030\004" + + " \001(\01321.google.cloud.dialogflow.cx.v3.PlaybookInvocationB\003\340A\001H\000\022M\n" + + "\017flow_invocation\030\005" + + " \001(\0132-.google.cloud.dialogflow.cx.v3.FlowInvocationB\003\340A\001H\000\022U\n" + + "\023playbook_transition\030\014 \001(\01321.google.cloud.d" + + "ialogflow.cx.v3.PlaybookTransitionB\003\340A\001H\000\022M\n" + + "\017flow_transition\030\r" + + " \001(\0132-.google.cloud.dialogflow.cx.v3.FlowTransitionB\003\340A\001H\000B\010\n" + + "\006action\"\"\n\r" + + "UserUtterance\022\021\n" + + "\004text\030\001 \001(\tB\003\340A\002\"#\n" + + "\016AgentUtterance\022\021\n" + + "\004text\030\001 \001(\tB\003\340A\002\"\356\001\n" + + "\007ToolUse\0224\n" + + "\004tool\030\001 \001(\tB&\340A\002\372A \n" + + "\036dialogflow.googleapis.com/Tool\022\031\n" + + "\014display_name\030\010 \001(\tB\003\340A\003\022\023\n" + + "\006action\030\002 \001(\tB\003\340A\001\022=\n" + + "\027input_action_parameters\030\005" + + " \001(\0132\027.google.protobuf.StructB\003\340A\001\022>\n" + + "\030output_action_parameters\030\006" + + " \001(\0132\027.google.protobuf.StructB\003\340A\001\"\316\002\n" + + "\022PlaybookInvocation\022<\n" + + "\010playbook\030\001 \001(\tB*\340A\002\372A$\n" + + "\"dialogflow.googleapis.com/Playbook\022\031\n" + + "\014display_name\030\005 \001(\tB\003\340A\003\022I\n" + + "\016playbook_input\030\002" + + " \001(\0132,.google.cloud.dialogflow.cx.v3.PlaybookInputB\003\340A\001\022K\n" + + "\017playbook_output\030\003" + + " \001(\0132-.google.cloud.dialogflow.cx.v3.PlaybookOutputB\003\340A\001\022G\n" + + "\016playbook_state\030\004" + + " \001(\0162*.google.cloud.dialogflow.cx.v3.OutputStateB\003\340A\002\"\246\001\n" + + "\016FlowInvocation\0224\n" + + "\004flow\030\001 \001(\tB&\340A\002\372A \n" + + "\036dialogflow.googleapis.com/Flow\022\031\n" + + "\014display_name\030\007 \001(\tB\003\340A\003\022C\n\n" + + "flow_state\030\004" + + " \001(\0162*.google.cloud.dialogflow.cx.v3.OutputStateB\003\340A\002\"m\n" + + "\022PlaybookTransition\022<\n" + + "\010playbook\030\001 \001(\tB*\340A\002\372A$\n" + + "\"dialogflow.googleapis.com/Playbook\022\031\n" + + "\014display_name\030\003 \001(\tB\003\340A\003\"a\n" + + "\016FlowTransition\0224\n" + + "\004flow\030\001 \001(\tB&\340A\002\372A \n" + + "\036dialogflow.googleapis.com/Flow\022\031\n" + + "\014display_name\030\003 \001(\tB\003\340A\003*\253\001\n" + + "\013OutputState\022\034\n" + + "\030OUTPUT_STATE_UNSPECIFIED\020\000\022\023\n" + + "\017OUTPUT_STATE_OK\020\001\022\032\n" + + "\026OUTPUT_STATE_CANCELLED\020\002\022\027\n" + + "\023OUTPUT_STATE_FAILED\020\003\022\032\n" + + "\026OUTPUT_STATE_ESCALATED\020\004\022\030\n" + + "\024OUTPUT_STATE_PENDING\020\005B\255\001\n" + + "!com.google.cloud.dialogflow.cx.v3B\n" + + "TraceProtoP\001Z1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002" + + "DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!Goo" + + "gle::Cloud::Dialogflow::CX::V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInput_descriptor, + new java.lang.String[] { + "PrecedingConversationSummary", + }); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_PlaybookOutput_descriptor, + new java.lang.String[] { + "ExecutionSummary", + }); + internal_static_google_cloud_dialogflow_cx_v3_Action_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_Action_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Action_descriptor, + new java.lang.String[] { + "UserUtterance", + "AgentUtterance", + "ToolUse", + "PlaybookInvocation", + "FlowInvocation", + "PlaybookTransition", + "FlowTransition", + "Action", + }); + internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_descriptor, + new java.lang.String[] { + "Text", + }); + internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_AgentUtterance_descriptor, + new java.lang.String[] { + "Text", + }); + internal_static_google_cloud_dialogflow_cx_v3_ToolUse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3_ToolUse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ToolUse_descriptor, + new java.lang.String[] { + "Tool", "DisplayName", "Action", "InputActionParameters", "OutputActionParameters", + }); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_PlaybookInvocation_descriptor, + new java.lang.String[] { + "Playbook", "DisplayName", "PlaybookInput", "PlaybookOutput", "PlaybookState", + }); + internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_FlowInvocation_descriptor, + new java.lang.String[] { + "Flow", "DisplayName", "FlowState", + }); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_PlaybookTransition_descriptor, + new java.lang.String[] { + "Playbook", "DisplayName", + }); + internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_FlowTransition_descriptor, + new java.lang.String[] { + "Flow", "DisplayName", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TypeSchema.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TypeSchema.java new file mode 100644 index 000000000000..848dee019f84 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TypeSchema.java @@ -0,0 +1,2041 @@ +/* + * Copyright 2026 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/v3/parameter_definition.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Encapsulates different type schema variations: either a reference to an
+ * a schema that's already defined by a tool, or an inline definition.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TypeSchema} + */ +public final class TypeSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TypeSchema) + TypeSchemaOrBuilder { + private static final long serialVersionUID = 0L; + + // Use TypeSchema.newBuilder() to construct. + private TypeSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TypeSchema() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TypeSchema(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TypeSchema.class, + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder.class); + } + + public interface SchemaReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The tool that contains this schema definition.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string tool = 1; + * + * @return The tool. + */ + java.lang.String getTool(); + + /** + * + * + *
+     * The tool that contains this schema definition.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string tool = 1; + * + * @return The bytes for tool. + */ + com.google.protobuf.ByteString getToolBytes(); + + /** + * + * + *
+     * The name of the schema.
+     * 
+ * + * string schema = 2; + * + * @return The schema. + */ + java.lang.String getSchema(); + + /** + * + * + *
+     * The name of the schema.
+     * 
+ * + * string schema = 2; + * + * @return The bytes for schema. + */ + com.google.protobuf.ByteString getSchemaBytes(); + } + + /** + * + * + *
+   * A reference to the schema of an existing tool.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference} + */ + public static final class SchemaReference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) + SchemaReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use SchemaReference.newBuilder() to construct. + private SchemaReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SchemaReference() { + tool_ = ""; + schema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SchemaReference(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.class, + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.Builder.class); + } + + public static final int TOOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tool_ = ""; + + /** + * + * + *
+     * The tool that contains this schema definition.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string tool = 1; + * + * @return The tool. + */ + @java.lang.Override + public java.lang.String getTool() { + java.lang.Object ref = tool_; + 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(); + tool_ = s; + return s; + } + } + + /** + * + * + *
+     * The tool that contains this schema definition.
+     * Format:
+     * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+     * 
+ * + * string tool = 1; + * + * @return The bytes for tool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object schema_ = ""; + + /** + * + * + *
+     * The name of the schema.
+     * 
+ * + * string schema = 2; + * + * @return The schema. + */ + @java.lang.Override + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + 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(); + schema_ = s; + return s; + } + } + + /** + * + * + *
+     * The name of the schema.
+     * 
+ * + * string schema = 2; + * + * @return The bytes for schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schema_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schema_); + } + 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(tool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schema_); + } + 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.v3.TypeSchema.SchemaReference)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference other = + (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) obj; + + if (!getTool().equals(other.getTool())) return false; + if (!getSchema().equals(other.getSchema())) 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) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference 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.v3.TypeSchema.SchemaReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference 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.v3.TypeSchema.SchemaReference parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference 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.v3.TypeSchema.SchemaReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference 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.v3.TypeSchema.SchemaReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference 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.v3.TypeSchema.SchemaReference 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.v3.TypeSchema.SchemaReference 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.v3.TypeSchema.SchemaReference 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; + } + + /** + * + * + *
+     * A reference to the schema of an existing tool.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.class, + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = ""; + schema_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_SchemaReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference build() { + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference buildPartial() { + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference result = + new com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = tool_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.schema_ = schema_; + } + } + + @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.v3.TypeSchema.SchemaReference) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference other) { + if (other + == com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.getDefaultInstance()) + return this; + if (!other.getTool().isEmpty()) { + tool_ = other.tool_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSchema().isEmpty()) { + schema_ = other.schema_; + bitField0_ |= 0x00000002; + 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: + { + tool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + schema_ = input.readStringRequireUtf8(); + 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 java.lang.Object tool_ = ""; + + /** + * + * + *
+       * The tool that contains this schema definition.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+       * 
+ * + * string tool = 1; + * + * @return The tool. + */ + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The tool that contains this schema definition.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+       * 
+ * + * string tool = 1; + * + * @return The bytes for tool. + */ + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The tool that contains this schema definition.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+       * 
+ * + * string tool = 1; + * + * @param value The tool to set. + * @return This builder for chaining. + */ + public Builder setTool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The tool that contains this schema definition.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+       * 
+ * + * string tool = 1; + * + * @return This builder for chaining. + */ + public Builder clearTool() { + tool_ = getDefaultInstance().getTool(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * The tool that contains this schema definition.
+       * Format:
+       * `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
+       * 
+ * + * string tool = 1; + * + * @param value The bytes for tool to set. + * @return This builder for chaining. + */ + public Builder setToolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object schema_ = ""; + + /** + * + * + *
+       * The name of the schema.
+       * 
+ * + * string schema = 2; + * + * @return The schema. + */ + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The name of the schema.
+       * 
+ * + * string schema = 2; + * + * @return The bytes for schema. + */ + public com.google.protobuf.ByteString getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The name of the schema.
+       * 
+ * + * string schema = 2; + * + * @param value The schema to set. + * @return This builder for chaining. + */ + public Builder setSchema(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The name of the schema.
+       * 
+ * + * string schema = 2; + * + * @return This builder for chaining. + */ + public Builder clearSchema() { + schema_ = getDefaultInstance().getSchema(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * The name of the schema.
+       * 
+ * + * string schema = 2; + * + * @param value The bytes for schema to set. + * @return This builder for chaining. + */ + public Builder setSchemaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schema_ = 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.v3.TypeSchema.SchemaReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) + private static final com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference(); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchemaReference 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.v3.TypeSchema.SchemaReference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int schemaCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object schema_; + + public enum SchemaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_SCHEMA(1), + SCHEMA_REFERENCE(2), + SCHEMA_NOT_SET(0); + private final int value; + + private SchemaCase(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 SchemaCase valueOf(int value) { + return forNumber(value); + } + + public static SchemaCase forNumber(int value) { + switch (value) { + case 1: + return INLINE_SCHEMA; + case 2: + return SCHEMA_REFERENCE; + case 0: + return SCHEMA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public static final int INLINE_SCHEMA_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Set if this is an inline schema definition.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + * + * @return Whether the inlineSchema field is set. + */ + @java.lang.Override + public boolean hasInlineSchema() { + return schemaCase_ == 1; + } + + /** + * + * + *
+   * Set if this is an inline schema definition.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + * + * @return The inlineSchema. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSchema getInlineSchema() { + if (schemaCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.InlineSchema) schema_; + } + return com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance(); + } + + /** + * + * + *
+   * Set if this is an inline schema definition.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSchemaOrBuilder getInlineSchemaOrBuilder() { + if (schemaCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.InlineSchema) schema_; + } + return com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance(); + } + + public static final int SCHEMA_REFERENCE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Set if this is a schema reference.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + * + * @return Whether the schemaReference field is set. + */ + @java.lang.Override + public boolean hasSchemaReference() { + return schemaCase_ == 2; + } + + /** + * + * + *
+   * Set if this is a schema reference.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + * + * @return The schemaReference. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference getSchemaReference() { + if (schemaCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) schema_; + } + return com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.getDefaultInstance(); + } + + /** + * + * + *
+   * Set if this is a schema reference.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReferenceOrBuilder + getSchemaReferenceOrBuilder() { + if (schemaCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) schema_; + } + return com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.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 (schemaCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3.InlineSchema) schema_); + } + if (schemaCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) schema_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (schemaCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.cx.v3.InlineSchema) schema_); + } + if (schemaCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) schema_); + } + 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.v3.TypeSchema)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.TypeSchema other = + (com.google.cloud.dialogflow.cx.v3.TypeSchema) obj; + + if (!getSchemaCase().equals(other.getSchemaCase())) return false; + switch (schemaCase_) { + case 1: + if (!getInlineSchema().equals(other.getInlineSchema())) return false; + break; + case 2: + if (!getSchemaReference().equals(other.getSchemaReference())) 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 (schemaCase_) { + case 1: + hash = (37 * hash) + INLINE_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getInlineSchema().hashCode(); + break; + case 2: + hash = (37 * hash) + SCHEMA_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getSchemaReference().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema 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.v3.TypeSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema 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.v3.TypeSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema 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.v3.TypeSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema 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.v3.TypeSchema parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema 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.v3.TypeSchema 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.v3.TypeSchema 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.v3.TypeSchema 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; + } + + /** + * + * + *
+   * Encapsulates different type schema variations: either a reference to an
+   * a schema that's already defined by a tool, or an inline definition.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.TypeSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TypeSchema) + com.google.cloud.dialogflow.cx.v3.TypeSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.TypeSchema.class, + com.google.cloud.dialogflow.cx.v3.TypeSchema.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.TypeSchema.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineSchemaBuilder_ != null) { + inlineSchemaBuilder_.clear(); + } + if (schemaReferenceBuilder_ != null) { + schemaReferenceBuilder_.clear(); + } + schemaCase_ = 0; + schema_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3_TypeSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema build() { + com.google.cloud.dialogflow.cx.v3.TypeSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema buildPartial() { + com.google.cloud.dialogflow.cx.v3.TypeSchema result = + new com.google.cloud.dialogflow.cx.v3.TypeSchema(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.TypeSchema result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.TypeSchema result) { + result.schemaCase_ = schemaCase_; + result.schema_ = this.schema_; + if (schemaCase_ == 1 && inlineSchemaBuilder_ != null) { + result.schema_ = inlineSchemaBuilder_.build(); + } + if (schemaCase_ == 2 && schemaReferenceBuilder_ != null) { + result.schema_ = schemaReferenceBuilder_.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.v3.TypeSchema) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.TypeSchema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TypeSchema other) { + if (other == com.google.cloud.dialogflow.cx.v3.TypeSchema.getDefaultInstance()) return this; + switch (other.getSchemaCase()) { + case INLINE_SCHEMA: + { + mergeInlineSchema(other.getInlineSchema()); + break; + } + case SCHEMA_REFERENCE: + { + mergeSchemaReference(other.getSchemaReference()); + break; + } + case SCHEMA_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: + { + input.readMessage(getInlineSchemaFieldBuilder().getBuilder(), extensionRegistry); + schemaCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getSchemaReferenceFieldBuilder().getBuilder(), extensionRegistry); + schemaCase_ = 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 schemaCase_ = 0; + private java.lang.Object schema_; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public Builder clearSchema() { + schemaCase_ = 0; + schema_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineSchema, + com.google.cloud.dialogflow.cx.v3.InlineSchema.Builder, + com.google.cloud.dialogflow.cx.v3.InlineSchemaOrBuilder> + inlineSchemaBuilder_; + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + * + * @return Whether the inlineSchema field is set. + */ + @java.lang.Override + public boolean hasInlineSchema() { + return schemaCase_ == 1; + } + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + * + * @return The inlineSchema. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSchema getInlineSchema() { + if (inlineSchemaBuilder_ == null) { + if (schemaCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.InlineSchema) schema_; + } + return com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance(); + } else { + if (schemaCase_ == 1) { + return inlineSchemaBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + public Builder setInlineSchema(com.google.cloud.dialogflow.cx.v3.InlineSchema value) { + if (inlineSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + inlineSchemaBuilder_.setMessage(value); + } + schemaCase_ = 1; + return this; + } + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + public Builder setInlineSchema( + com.google.cloud.dialogflow.cx.v3.InlineSchema.Builder builderForValue) { + if (inlineSchemaBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + inlineSchemaBuilder_.setMessage(builderForValue.build()); + } + schemaCase_ = 1; + return this; + } + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + public Builder mergeInlineSchema(com.google.cloud.dialogflow.cx.v3.InlineSchema value) { + if (inlineSchemaBuilder_ == null) { + if (schemaCase_ == 1 + && schema_ != com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance()) { + schema_ = + com.google.cloud.dialogflow.cx.v3.InlineSchema.newBuilder( + (com.google.cloud.dialogflow.cx.v3.InlineSchema) schema_) + .mergeFrom(value) + .buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + if (schemaCase_ == 1) { + inlineSchemaBuilder_.mergeFrom(value); + } else { + inlineSchemaBuilder_.setMessage(value); + } + } + schemaCase_ = 1; + return this; + } + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + public Builder clearInlineSchema() { + if (inlineSchemaBuilder_ == null) { + if (schemaCase_ == 1) { + schemaCase_ = 0; + schema_ = null; + onChanged(); + } + } else { + if (schemaCase_ == 1) { + schemaCase_ = 0; + schema_ = null; + } + inlineSchemaBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + public com.google.cloud.dialogflow.cx.v3.InlineSchema.Builder getInlineSchemaBuilder() { + return getInlineSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSchemaOrBuilder getInlineSchemaOrBuilder() { + if ((schemaCase_ == 1) && (inlineSchemaBuilder_ != null)) { + return inlineSchemaBuilder_.getMessageOrBuilder(); + } else { + if (schemaCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3.InlineSchema) schema_; + } + return com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Set if this is an inline schema definition.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineSchema, + com.google.cloud.dialogflow.cx.v3.InlineSchema.Builder, + com.google.cloud.dialogflow.cx.v3.InlineSchemaOrBuilder> + getInlineSchemaFieldBuilder() { + if (inlineSchemaBuilder_ == null) { + if (!(schemaCase_ == 1)) { + schema_ = com.google.cloud.dialogflow.cx.v3.InlineSchema.getDefaultInstance(); + } + inlineSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineSchema, + com.google.cloud.dialogflow.cx.v3.InlineSchema.Builder, + com.google.cloud.dialogflow.cx.v3.InlineSchemaOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.InlineSchema) schema_, + getParentForChildren(), + isClean()); + schema_ = null; + } + schemaCase_ = 1; + onChanged(); + return inlineSchemaBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference, + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReferenceOrBuilder> + schemaReferenceBuilder_; + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + * + * @return Whether the schemaReference field is set. + */ + @java.lang.Override + public boolean hasSchemaReference() { + return schemaCase_ == 2; + } + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + * + * @return The schemaReference. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference getSchemaReference() { + if (schemaReferenceBuilder_ == null) { + if (schemaCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) schema_; + } + return com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.getDefaultInstance(); + } else { + if (schemaCase_ == 2) { + return schemaReferenceBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + public Builder setSchemaReference( + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference value) { + if (schemaReferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + schemaReferenceBuilder_.setMessage(value); + } + schemaCase_ = 2; + return this; + } + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + public Builder setSchemaReference( + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.Builder builderForValue) { + if (schemaReferenceBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + schemaReferenceBuilder_.setMessage(builderForValue.build()); + } + schemaCase_ = 2; + return this; + } + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + public Builder mergeSchemaReference( + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference value) { + if (schemaReferenceBuilder_ == null) { + if (schemaCase_ == 2 + && schema_ + != com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + .getDefaultInstance()) { + schema_ = + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.newBuilder( + (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) schema_) + .mergeFrom(value) + .buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + if (schemaCase_ == 2) { + schemaReferenceBuilder_.mergeFrom(value); + } else { + schemaReferenceBuilder_.setMessage(value); + } + } + schemaCase_ = 2; + return this; + } + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + public Builder clearSchemaReference() { + if (schemaReferenceBuilder_ == null) { + if (schemaCase_ == 2) { + schemaCase_ = 0; + schema_ = null; + onChanged(); + } + } else { + if (schemaCase_ == 2) { + schemaCase_ = 0; + schema_ = null; + } + schemaReferenceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + public com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.Builder + getSchemaReferenceBuilder() { + return getSchemaReferenceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReferenceOrBuilder + getSchemaReferenceOrBuilder() { + if ((schemaCase_ == 2) && (schemaReferenceBuilder_ != null)) { + return schemaReferenceBuilder_.getMessageOrBuilder(); + } else { + if (schemaCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) schema_; + } + return com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Set if this is a schema reference.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference, + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReferenceOrBuilder> + getSchemaReferenceFieldBuilder() { + if (schemaReferenceBuilder_ == null) { + if (!(schemaCase_ == 2)) { + schema_ = + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.getDefaultInstance(); + } + schemaReferenceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference, + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.Builder, + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReferenceOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) schema_, + getParentForChildren(), + isClean()); + schema_ = null; + } + schemaCase_ = 2; + onChanged(); + return schemaReferenceBuilder_; + } + + @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.v3.TypeSchema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TypeSchema) + private static final com.google.cloud.dialogflow.cx.v3.TypeSchema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TypeSchema(); + } + + public static com.google.cloud.dialogflow.cx.v3.TypeSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TypeSchema 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.v3.TypeSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TypeSchemaOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TypeSchemaOrBuilder.java new file mode 100644 index 000000000000..382217a581fb --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TypeSchemaOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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/v3/parameter_definition.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface TypeSchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.TypeSchema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Set if this is an inline schema definition.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + * + * @return Whether the inlineSchema field is set. + */ + boolean hasInlineSchema(); + + /** + * + * + *
+   * Set if this is an inline schema definition.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + * + * @return The inlineSchema. + */ + com.google.cloud.dialogflow.cx.v3.InlineSchema getInlineSchema(); + + /** + * + * + *
+   * Set if this is an inline schema definition.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSchema inline_schema = 1; + */ + com.google.cloud.dialogflow.cx.v3.InlineSchemaOrBuilder getInlineSchemaOrBuilder(); + + /** + * + * + *
+   * Set if this is a schema reference.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + * + * @return Whether the schemaReference field is set. + */ + boolean hasSchemaReference(); + + /** + * + * + *
+   * Set if this is a schema reference.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + * + * @return The schemaReference. + */ + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference getSchemaReference(); + + /** + * + * + *
+   * Set if this is a schema reference.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference schema_reference = 2; + */ + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReferenceOrBuilder + getSchemaReferenceOrBuilder(); + + com.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaCase getSchemaCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExampleRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExampleRequest.java new file mode 100644 index 000000000000..292184b2e240 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExampleRequest.java @@ -0,0 +1,1062 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Examples.UpdateExample][google.cloud.dialogflow.cx.v3.Examples.UpdateExample].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateExampleRequest} + */ +public final class UpdateExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UpdateExampleRequest) + UpdateExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateExampleRequest.newBuilder() to construct. + private UpdateExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateExampleRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateExampleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest.Builder.class); + } + + private int bitField0_; + public static final int EXAMPLE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.Example example_; + + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + @java.lang.Override + public boolean hasExample() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Example getExample() { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance() + : example_; + } + + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExampleOrBuilder() { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance() + : example_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getExample()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExample()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.v3.UpdateExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest other = + (com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest) obj; + + if (hasExample() != other.hasExample()) return false; + if (hasExample()) { + if (!getExample().equals(other.getExample())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasExample()) { + hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getExample().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest 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.v3.UpdateExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest 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.v3.UpdateExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest 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.v3.UpdateExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest 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.v3.UpdateExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest 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.v3.UpdateExampleRequest 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.v3.UpdateExampleRequest 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.v3.UpdateExampleRequest 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
+   * [Examples.UpdateExample][google.cloud.dialogflow.cx.v3.Examples.UpdateExample].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.UpdateExampleRequest) + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExampleFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + example_ = null; + if (exampleBuilder_ != null) { + exampleBuilder_.dispose(); + exampleBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest build() { + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest result = + new com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.example_ = exampleBuilder_ == null ? example_ : exampleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.UpdateExampleRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest.getDefaultInstance()) + return this; + if (other.hasExample()) { + mergeExample(other.getExample()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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: + { + input.readMessage(getExampleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.cloud.dialogflow.cx.v3.Example example_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder> + exampleBuilder_; + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + public boolean hasExample() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + public com.google.cloud.dialogflow.cx.v3.Example getExample() { + if (exampleBuilder_ == null) { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance() + : example_; + } else { + return exampleBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExample(com.google.cloud.dialogflow.cx.v3.Example value) { + if (exampleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + example_ = value; + } else { + exampleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExample(com.google.cloud.dialogflow.cx.v3.Example.Builder builderForValue) { + if (exampleBuilder_ == null) { + example_ = builderForValue.build(); + } else { + exampleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExample(com.google.cloud.dialogflow.cx.v3.Example value) { + if (exampleBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && example_ != null + && example_ != com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance()) { + getExampleBuilder().mergeFrom(value); + } else { + example_ = value; + } + } else { + exampleBuilder_.mergeFrom(value); + } + if (example_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExample() { + bitField0_ = (bitField0_ & ~0x00000001); + example_ = null; + if (exampleBuilder_ != null) { + exampleBuilder_.dispose(); + exampleBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Example.Builder getExampleBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getExampleFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExampleOrBuilder() { + if (exampleBuilder_ != null) { + return exampleBuilder_.getMessageOrBuilder(); + } else { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3.Example.getDefaultInstance() + : example_; + } + } + + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder> + getExampleFieldBuilder() { + if (exampleBuilder_ == null) { + exampleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Example, + com.google.cloud.dialogflow.cx.v3.Example.Builder, + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder>( + getExample(), getParentForChildren(), isClean()); + example_ = null; + } + return exampleBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.v3.UpdateExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.UpdateExampleRequest) + private static final com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateExampleRequest 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.v3.UpdateExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExampleRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExampleRequestOrBuilder.java new file mode 100644 index 000000000000..7eac0e543113 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateExampleRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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/v3/example.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface UpdateExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UpdateExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + boolean hasExample(); + + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + com.google.cloud.dialogflow.cx.v3.Example getExample(); + + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ExampleOrBuilder getExampleOrBuilder(); + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdatePlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdatePlaybookRequest.java new file mode 100644 index 000000000000..39cfbc8b188b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdatePlaybookRequest.java @@ -0,0 +1,1050 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.UpdatePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.UpdatePlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest} + */ +public final class UpdatePlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest) + UpdatePlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdatePlaybookRequest.newBuilder() to construct. + private UpdatePlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePlaybookRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.Builder.class); + } + + private int bitField0_; + public static final int PLAYBOOK_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.Playbook playbook_; + + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + @java.lang.Override + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPlaybook()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPlaybook()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.v3.UpdatePlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest) obj; + + if (hasPlaybook() != other.hasPlaybook()) return false; + if (hasPlaybook()) { + if (!getPlaybook().equals(other.getPlaybook())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasPlaybook()) { + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest 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.v3.UpdatePlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest 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.v3.UpdatePlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest 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.v3.UpdatePlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest 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.v3.UpdatePlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest 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.v3.UpdatePlaybookRequest 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.v3.UpdatePlaybookRequest 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.v3.UpdatePlaybookRequest 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
+   * [Playbooks.UpdatePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.UpdatePlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest) + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdatePlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.playbook_ = playbookBuilder_ == null ? playbook_ : playbookBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.UpdatePlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.getDefaultInstance()) + return this; + if (other.hasPlaybook()) { + mergePlaybook(other.getPlaybook()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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: + { + input.readMessage(getPlaybookFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.cloud.dialogflow.cx.v3.Playbook playbook_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + playbookBuilder_; + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + public com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook() { + if (playbookBuilder_ == null) { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } else { + return playbookBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + } else { + playbookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3.Playbook.Builder builderForValue) { + if (playbookBuilder_ == null) { + playbook_ = builderForValue.build(); + } else { + playbookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePlaybook(com.google.cloud.dialogflow.cx.v3.Playbook value) { + if (playbookBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && playbook_ != null + && playbook_ != com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance()) { + getPlaybookBuilder().mergeFrom(value); + } else { + playbook_ = value; + } + } else { + playbookBuilder_.mergeFrom(value); + } + if (playbook_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPlaybook() { + bitField0_ = (bitField0_ & ~0x00000001); + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Playbook.Builder getPlaybookBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPlaybookFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder() { + if (playbookBuilder_ != null) { + return playbookBuilder_.getMessageOrBuilder(); + } else { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3.Playbook.getDefaultInstance() + : playbook_; + } + } + + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder> + getPlaybookFieldBuilder() { + if (playbookBuilder_ == null) { + playbookBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Playbook, + com.google.cloud.dialogflow.cx.v3.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder>( + getPlaybook(), getParentForChildren(), isClean()); + playbook_ = null; + } + return playbookBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.v3.UpdatePlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePlaybookRequest 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.v3.UpdatePlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdatePlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdatePlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..42a9b2b3af39 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdatePlaybookRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2026 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/v3/playbook.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface UpdatePlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + boolean hasPlaybook(); + + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + com.google.cloud.dialogflow.cx.v3.Playbook getPlaybook(); + + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.PlaybookOrBuilder getPlaybookOrBuilder(); + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateToolRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateToolRequest.java new file mode 100644 index 000000000000..87f6b78c1492 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateToolRequest.java @@ -0,0 +1,1029 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [Tools.UpdateTool][google.cloud.dialogflow.cx.v3.Tools.UpdateTool].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateToolRequest} + */ +public final class UpdateToolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UpdateToolRequest) + UpdateToolRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateToolRequest.newBuilder() to construct. + private UpdateToolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateToolRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateToolRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest.Builder.class); + } + + private int bitField0_; + public static final int TOOL_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.Tool tool_; + + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + @java.lang.Override + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Tool getTool() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTool()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTool()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.v3.UpdateToolRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest other = + (com.google.cloud.dialogflow.cx.v3.UpdateToolRequest) obj; + + if (hasTool() != other.hasTool()) return false; + if (hasTool()) { + if (!getTool().equals(other.getTool())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasTool()) { + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateToolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateToolRequest 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.v3.UpdateToolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateToolRequest 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.v3.UpdateToolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateToolRequest 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.v3.UpdateToolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateToolRequest 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.v3.UpdateToolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateToolRequest 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.v3.UpdateToolRequest 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.v3.UpdateToolRequest 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.v3.UpdateToolRequest 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
+   * [Tools.UpdateTool][google.cloud.dialogflow.cx.v3.Tools.UpdateTool].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UpdateToolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.UpdateToolRequest) + com.google.cloud.dialogflow.cx.v3.UpdateToolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest.class, + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.UpdateToolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getToolFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3_UpdateToolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateToolRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.UpdateToolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateToolRequest build() { + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UpdateToolRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.UpdateToolRequest result = + new com.google.cloud.dialogflow.cx.v3.UpdateToolRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.UpdateToolRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = toolBuilder_ == null ? tool_ : toolBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3.UpdateToolRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.UpdateToolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.UpdateToolRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.UpdateToolRequest.getDefaultInstance()) + return this; + if (other.hasTool()) { + mergeTool(other.getTool()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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: + { + input.readMessage(getToolFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.cloud.dialogflow.cx.v3.Tool tool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + toolBuilder_; + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + public com.google.cloud.dialogflow.cx.v3.Tool getTool() { + if (toolBuilder_ == null) { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } else { + return toolBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + } else { + toolBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3.Tool.Builder builderForValue) { + if (toolBuilder_ == null) { + tool_ = builderForValue.build(); + } else { + toolBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTool(com.google.cloud.dialogflow.cx.v3.Tool value) { + if (toolBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && tool_ != null + && tool_ != com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance()) { + getToolBuilder().mergeFrom(value); + } else { + tool_ = value; + } + } else { + toolBuilder_.mergeFrom(value); + } + if (tool_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTool() { + bitField0_ = (bitField0_ & ~0x00000001); + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Tool.Builder getToolBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getToolFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder() { + if (toolBuilder_ != null) { + return toolBuilder_.getMessageOrBuilder(); + } else { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3.Tool.getDefaultInstance() : tool_; + } + } + + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder> + getToolFieldBuilder() { + if (toolBuilder_ == null) { + toolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Tool, + com.google.cloud.dialogflow.cx.v3.Tool.Builder, + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder>( + getTool(), getParentForChildren(), isClean()); + tool_ = null; + } + return toolBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.v3.UpdateToolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.UpdateToolRequest) + private static final com.google.cloud.dialogflow.cx.v3.UpdateToolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.UpdateToolRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.UpdateToolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateToolRequest 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.v3.UpdateToolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateToolRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateToolRequestOrBuilder.java new file mode 100644 index 000000000000..c7437734482b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UpdateToolRequestOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2026 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/v3/tool.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface UpdateToolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UpdateToolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + boolean hasTool(); + + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + com.google.cloud.dialogflow.cx.v3.Tool getTool(); + + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3.ToolOrBuilder getToolOrBuilder(); + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UserUtterance.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UserUtterance.java new file mode 100644 index 000000000000..114ce41b96a1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UserUtterance.java @@ -0,0 +1,634 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * UserUtterance represents one message sent by the customer.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UserUtterance} + */ +public final class UserUtterance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.UserUtterance) + UserUtteranceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UserUtterance.newBuilder() to construct. + private UserUtterance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserUtterance() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserUtterance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UserUtterance.class, + com.google.cloud.dialogflow.cx.v3.UserUtterance.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + 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(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + 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.v3.UserUtterance)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.UserUtterance other = + (com.google.cloud.dialogflow.cx.v3.UserUtterance) obj; + + if (!getText().equals(other.getText())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.UserUtterance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UserUtterance 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.v3.UserUtterance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UserUtterance 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.v3.UserUtterance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.UserUtterance 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.v3.UserUtterance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UserUtterance 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.v3.UserUtterance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.UserUtterance 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.v3.UserUtterance 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.v3.UserUtterance 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.v3.UserUtterance 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; + } + + /** + * + * + *
+   * UserUtterance represents one message sent by the customer.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.UserUtterance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.UserUtterance) + com.google.cloud.dialogflow.cx.v3.UserUtteranceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.UserUtterance.class, + com.google.cloud.dialogflow.cx.v3.UserUtterance.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.UserUtterance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.TraceProto + .internal_static_google_cloud_dialogflow_cx_v3_UserUtterance_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UserUtterance getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UserUtterance build() { + com.google.cloud.dialogflow.cx.v3.UserUtterance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.UserUtterance buildPartial() { + com.google.cloud.dialogflow.cx.v3.UserUtterance result = + new com.google.cloud.dialogflow.cx.v3.UserUtterance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.UserUtterance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + } + + @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.v3.UserUtterance) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.UserUtterance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.UserUtterance other) { + if (other == com.google.cloud.dialogflow.cx.v3.UserUtterance.getDefaultInstance()) + return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + 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: + { + text_ = input.readStringRequireUtf8(); + 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 java.lang.Object text_ = ""; + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + 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.v3.UserUtterance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.UserUtterance) + private static final com.google.cloud.dialogflow.cx.v3.UserUtterance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.UserUtterance(); + } + + public static com.google.cloud.dialogflow.cx.v3.UserUtterance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserUtterance 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.v3.UserUtterance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UserUtteranceOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UserUtteranceOrBuilder.java new file mode 100644 index 000000000000..1e5ee119deb1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/UserUtteranceOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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/v3/trace.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.dialogflow.cx.v3; + +public interface UserUtteranceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.UserUtterance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Webhook.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Webhook.java index 972d1365128d..35af78d0b20a 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Webhook.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Webhook.java @@ -111,7 +111,7 @@ public interface GenericWebServiceOrBuilder * string username = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 * @return The username. */ @java.lang.Deprecated @@ -127,7 +127,7 @@ public interface GenericWebServiceOrBuilder * string username = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 * @return The bytes for username. */ @java.lang.Deprecated @@ -143,7 +143,7 @@ public interface GenericWebServiceOrBuilder * string password = 3 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 * @return The password. */ @java.lang.Deprecated @@ -159,12 +159,46 @@ public interface GenericWebServiceOrBuilder * string password = 3 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 * @return The bytes for password. */ @java.lang.Deprecated com.google.protobuf.ByteString getPasswordBytes(); + /** + * + * + *
+     * Optional. The SecretManager secret version resource storing the
+     * username:password pair for HTTP Basic authentication. Format:
+     * `projects/{project}/secrets/{secret}/versions/{version}`
+     * 
+ * + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForUsernamePassword. + */ + java.lang.String getSecretVersionForUsernamePassword(); + + /** + * + * + *
+     * Optional. The SecretManager secret version resource storing the
+     * username:password pair for HTTP Basic authentication. Format:
+     * `projects/{project}/secrets/{secret}/versions/{version}`
+     * 
+ * + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForUsernamePassword. + */ + com.google.protobuf.ByteString getSecretVersionForUsernamePasswordBytes(); + /** * * @@ -228,6 +262,113 @@ java.lang.String getRequestHeadersOrDefault( */ java.lang.String getRequestHeadersOrThrow(java.lang.String key); + /** + * + * + *
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
+     * 
+ * + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSecretVersionsForRequestHeadersCount(); + + /** + * + * + *
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
+     * 
+ * + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsSecretVersionsForRequestHeaders(java.lang.String key); + + /** Use {@link #getSecretVersionsForRequestHeadersMap()} instead. */ + @java.lang.Deprecated + java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + getSecretVersionsForRequestHeaders(); + + /** + * + * + *
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
+     * 
+ * + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + getSecretVersionsForRequestHeadersMap(); + + /** + * + * + *
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
+     * 
+ * + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + getSecretVersionsForRequestHeadersOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + defaultValue); + + /** + * + * + *
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
+     * 
+ * + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + getSecretVersionsForRequestHeadersOrThrow(java.lang.String key); + /** * * @@ -388,6 +529,51 @@ java.lang.String getRequestHeadersOrDefault( com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth getServiceAgentAuth(); + /** + * + * + *
+     * Optional. Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceAccountAuthConfig field is set. + */ + boolean hasServiceAccountAuthConfig(); + + /** + * + * + *
+     * Optional. Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAccountAuthConfig. + */ + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + getServiceAccountAuthConfig(); + + /** + * + * + *
+     * Optional. Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfigOrBuilder + getServiceAccountAuthConfigOrBuilder(); + /** * * @@ -591,6 +777,7 @@ private GenericWebService() { uri_ = ""; username_ = ""; password_ = ""; + secretVersionForUsernamePassword_ = ""; allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class); serviceAgentAuth_ = 0; webhookType_ = 0; @@ -616,6 +803,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 4: return internalGetRequestHeaders(); + case 20: + return internalGetSecretVersionsForRequestHeaders(); case 9: return internalGetParameterMapping(); default: @@ -1275,328 +1464,122 @@ private HttpMethod(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod) } - public interface OAuthConfigOrBuilder + public interface SecretVersionHeaderValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue) com.google.protobuf.MessageOrBuilder { /** * * *
-       * Required. The client ID provided by the 3rd party platform.
-       * 
- * - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clientId. - */ - java.lang.String getClientId(); - - /** - * - * - *
-       * Required. The client ID provided by the 3rd party platform.
-       * 
- * - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clientId. - */ - com.google.protobuf.ByteString getClientIdBytes(); - - /** - * - * - *
-       * Optional. The client secret provided by the 3rd party platform.
-       * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clientSecret. - */ - java.lang.String getClientSecret(); - - /** - * - * - *
-       * Optional. The client secret provided by the 3rd party platform.
-       * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clientSecret. - */ - com.google.protobuf.ByteString getClientSecretBytes(); - - /** - * - * - *
-       * Required. The token endpoint provided by the 3rd party platform to
-       * exchange an access token.
-       * 
- * - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The tokenEndpoint. - */ - java.lang.String getTokenEndpoint(); - - /** - * - * - *
-       * Required. The token endpoint provided by the 3rd party platform to
-       * exchange an access token.
-       * 
- * - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for tokenEndpoint. - */ - com.google.protobuf.ByteString getTokenEndpointBytes(); - - /** - * - * - *
-       * Optional. The OAuth scopes to grant.
-       * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the scopes. - */ - java.util.List getScopesList(); - - /** - * - * - *
-       * Optional. The OAuth scopes to grant.
-       * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of scopes. - */ - int getScopesCount(); - - /** - * - * - *
-       * Optional. The OAuth scopes to grant.
+       * Required. The SecretManager secret version resource storing the header
+       * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param index The index of the element to return. - * @return The scopes at the given index. + * @return The secretVersion. */ - java.lang.String getScopes(int index); + java.lang.String getSecretVersion(); /** * * *
-       * Optional. The OAuth scopes to grant.
+       * Required. The SecretManager secret version resource storing the header
+       * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param index The index of the value to return. - * @return The bytes of the scopes at the given index. + * @return The bytes for secretVersion. */ - com.google.protobuf.ByteString getScopesBytes(int index); + com.google.protobuf.ByteString getSecretVersionBytes(); } /** * * *
-     * Represents configuration of OAuth client credential flow for 3rd party
-     * API authentication.
+     * Represents the value of an HTTP header stored in a SecretManager secret
+     * version.
      * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue} */ - public static final class OAuthConfig extends com.google.protobuf.GeneratedMessageV3 + public static final class SecretVersionHeaderValue + extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) - OAuthConfigOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue) + SecretVersionHeaderValueOrBuilder { private static final long serialVersionUID = 0L; - // Use OAuthConfig.newBuilder() to construct. - private OAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use SecretVersionHeaderValue.newBuilder() to construct. + private SecretVersionHeaderValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OAuthConfig() { - clientId_ = ""; - clientSecret_ = ""; - tokenEndpoint_ = ""; - scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + private SecretVersionHeaderValue() { + secretVersion_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OAuthConfig(); + return new SecretVersionHeaderValue(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.WebhookProto - .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.WebhookProto - .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.class, - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.Builder - .class); + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + .class, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + .Builder.class); } - public static final int CLIENT_ID_FIELD_NUMBER = 1; + public static final int SECRET_VERSION_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object clientId_ = ""; + private volatile java.lang.Object secretVersion_ = ""; /** * * *
-       * Required. The client ID provided by the 3rd party platform.
+       * Required. The SecretManager secret version resource storing the header
+       * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clientId. - */ - @java.lang.Override - public java.lang.String getClientId() { - java.lang.Object ref = clientId_; - 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(); - clientId_ = s; - return s; - } - } - - /** - * - * - *
-       * Required. The client ID provided by the 3rd party platform.
-       * 
- * - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clientId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClientIdBytes() { - java.lang.Object ref = clientId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clientId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLIENT_SECRET_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object clientSecret_ = ""; - - /** - * - * - *
-       * Optional. The client secret provided by the 3rd party platform.
-       * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clientSecret. - */ - @java.lang.Override - public java.lang.String getClientSecret() { - java.lang.Object ref = clientSecret_; - 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(); - clientSecret_ = s; - return s; - } - } - - /** - * - * - *
-       * Optional. The client secret provided by the 3rd party platform.
-       * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clientSecret. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClientSecretBytes() { - java.lang.Object ref = clientSecret_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clientSecret_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOKEN_ENDPOINT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object tokenEndpoint_ = ""; - - /** - * - * - *
-       * Required. The token endpoint provided by the 3rd party platform to
-       * exchange an access token.
-       * 
- * - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The tokenEndpoint. + * @return The secretVersion. */ @java.lang.Override - public java.lang.String getTokenEndpoint() { - java.lang.Object ref = tokenEndpoint_; + public java.lang.String getSecretVersion() { + java.lang.Object ref = secretVersion_; 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(); - tokenEndpoint_ = s; + secretVersion_ = s; return s; } } @@ -1605,95 +1588,29 @@ public java.lang.String getTokenEndpoint() { * * *
-       * Required. The token endpoint provided by the 3rd party platform to
-       * exchange an access token.
+       * Required. The SecretManager secret version resource storing the header
+       * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for tokenEndpoint. + * @return The bytes for secretVersion. */ @java.lang.Override - public com.google.protobuf.ByteString getTokenEndpointBytes() { - java.lang.Object ref = tokenEndpoint_; + public com.google.protobuf.ByteString getSecretVersionBytes() { + java.lang.Object ref = secretVersion_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tokenEndpoint_ = b; + secretVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int SCOPES_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList scopes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-       * Optional. The OAuth scopes to grant.
-       * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the scopes. - */ - public com.google.protobuf.ProtocolStringList getScopesList() { - return scopes_; - } - - /** - * - * - *
-       * Optional. The OAuth scopes to grant.
-       * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of scopes. - */ - public int getScopesCount() { - return scopes_.size(); - } - - /** - * - * - *
-       * Optional. The OAuth scopes to grant.
-       * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The scopes at the given index. - */ - public java.lang.String getScopes(int index) { - return scopes_.get(index); - } - - /** - * - * - *
-       * Optional. The OAuth scopes to grant.
-       * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the scopes at the given index. - */ - public com.google.protobuf.ByteString getScopesBytes(int index) { - return scopes_.getByteString(index); - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1708,17 +1625,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientSecret_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tokenEndpoint_); - } - for (int i = 0; i < scopes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, scopes_.getRaw(i)); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, secretVersion_); } getUnknownFields().writeTo(output); } @@ -1729,22 +1637,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientSecret_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tokenEndpoint_); - } - { - int dataSize = 0; - for (int i = 0; i < scopes_.size(); i++) { - dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); - } - size += dataSize; - size += 1 * getScopesList().size(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, secretVersion_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1757,16 +1651,15 @@ public boolean equals(final java.lang.Object obj) { return true; } if (!(obj - instanceof com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig)) { + instanceof + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig other = - (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) obj; + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue other = + (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue) + obj; - if (!getClientId().equals(other.getClientId())) return false; - if (!getClientSecret().equals(other.getClientSecret())) return false; - if (!getTokenEndpoint().equals(other.getTokenEndpoint())) return false; - if (!getScopesList().equals(other.getScopesList())) return false; + if (!getSecretVersion().equals(other.getSecretVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1778,41 +1671,37 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER; - hash = (53 * hash) + getClientId().hashCode(); - hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER; - hash = (53 * hash) + getClientSecret().hashCode(); - hash = (37 * hash) + TOKEN_ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getTokenEndpoint().hashCode(); - if (getScopesCount() > 0) { - hash = (37 * hash) + SCOPES_FIELD_NUMBER; - hash = (53 * hash) + getScopesList().hashCode(); - } + hash = (37 * hash) + SECRET_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getSecretVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue 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.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1820,23 +1709,27 @@ public int hashCode() { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue 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.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1845,12 +1738,14 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1859,12 +1754,14 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue 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.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1883,7 +1780,8 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig prototype) { + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -1903,35 +1801,38 @@ protected Builder newBuilderForType( * * *
-       * Represents configuration of OAuth client credential flow for 3rd party
-       * API authentication.
+       * Represents the value of an HTTP header stored in a SecretManager secret
+       * version.
        * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfigOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue) + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.WebhookProto - .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.WebhookProto - .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_fieldAccessorTable + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.class, - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.Builder - .class); + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue.class, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue.Builder.class); } // Construct using - // com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.newBuilder() + // com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -1942,30 +1843,28 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - clientId_ = ""; - clientSecret_ = ""; - tokenEndpoint_ = ""; - scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + secretVersion_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.WebhookProto - .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor; + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - .getDefaultInstance(); + return com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig build() { - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig result = - buildPartial(); + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + build() { + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1973,10 +1872,12 @@ public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig b } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue buildPartial() { - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig result = - new com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig(this); + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + result = + new com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -1985,20 +1886,11 @@ public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig b } private void buildPartial0( - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig result) { + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.clientId_ = clientId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.clientSecret_ = clientSecret_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.tokenEndpoint_ = tokenEndpoint_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - scopes_.makeImmutable(); - result.scopes_ = scopes_; + result.secretVersion_ = secretVersion_; } } @@ -2040,9 +1932,13 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other - instanceof com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) { + instanceof + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue) { return mergeFrom( - (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) other); + (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue) + other); } else { super.mergeFrom(other); return this; @@ -2050,35 +1946,16 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig other) { + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + other) { if (other - == com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - .getDefaultInstance()) return this; - if (!other.getClientId().isEmpty()) { - clientId_ = other.clientId_; + == com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue.getDefaultInstance()) return this; + if (!other.getSecretVersion().isEmpty()) { + secretVersion_ = other.secretVersion_; bitField0_ |= 0x00000001; onChanged(); } - if (!other.getClientSecret().isEmpty()) { - clientSecret_ = other.clientSecret_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTokenEndpoint().isEmpty()) { - tokenEndpoint_ = other.tokenEndpoint_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.scopes_.isEmpty()) { - if (scopes_.isEmpty()) { - scopes_ = other.scopes_; - bitField0_ |= 0x00000008; - } else { - ensureScopesIsMutable(); - scopes_.addAll(other.scopes_); - } - onChanged(); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2107,29 +1984,10 @@ public Builder mergeFrom( break; case 10: { - clientId_ = input.readStringRequireUtf8(); + secretVersion_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 - case 18: - { - clientSecret_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - tokenEndpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureScopesIsMutable(); - scopes_.add(s); - break; - } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2149,25 +2007,28 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object clientId_ = ""; + private java.lang.Object secretVersion_ = ""; /** * * *
-         * Required. The client ID provided by the 3rd party platform.
+         * Required. The SecretManager secret version resource storing the header
+         * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          * 
* - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The clientId. + * @return The secretVersion. */ - public java.lang.String getClientId() { - java.lang.Object ref = clientId_; + public java.lang.String getSecretVersion() { + java.lang.Object ref = secretVersion_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - clientId_ = s; + secretVersion_ = s; return s; } else { return (java.lang.String) ref; @@ -2178,19 +2039,22 @@ public java.lang.String getClientId() { * * *
-         * Required. The client ID provided by the 3rd party platform.
+         * Required. The SecretManager secret version resource storing the header
+         * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          * 
* - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for clientId. + * @return The bytes for secretVersion. */ - public com.google.protobuf.ByteString getClientIdBytes() { - java.lang.Object ref = clientId_; + public com.google.protobuf.ByteString getSecretVersionBytes() { + java.lang.Object ref = secretVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clientId_ = b; + secretVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -2201,19 +2065,22 @@ public com.google.protobuf.ByteString getClientIdBytes() { * * *
-         * Required. The client ID provided by the 3rd party platform.
+         * Required. The SecretManager secret version resource storing the header
+         * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          * 
* - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param value The clientId to set. + * @param value The secretVersion to set. * @return This builder for chaining. */ - public Builder setClientId(java.lang.String value) { + public Builder setSecretVersion(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - clientId_ = value; + secretVersion_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -2223,15 +2090,18 @@ public Builder setClientId(java.lang.String value) { * * *
-         * Required. The client ID provided by the 3rd party platform.
+         * Required. The SecretManager secret version resource storing the header
+         * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          * 
* - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ - public Builder clearClientId() { - clientId_ = getDefaultInstance().getClientId(); + public Builder clearSecretVersion() { + secretVersion_ = getDefaultInstance().getSecretVersion(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -2241,368 +2111,2477 @@ public Builder clearClientId() { * * *
-         * Required. The client ID provided by the 3rd party platform.
+         * Required. The SecretManager secret version resource storing the header
+         * value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          * 
* - * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param value The bytes for clientId to set. + * @param value The bytes for secretVersion to set. * @return This builder for chaining. */ - public Builder setClientIdBytes(com.google.protobuf.ByteString value) { + public Builder setSecretVersionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - clientId_ = value; + secretVersion_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object clientSecret_ = ""; - - /** - * - * - *
-         * Optional. The client secret provided by the 3rd party platform.
-         * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clientSecret. - */ - public java.lang.String getClientSecret() { - java.lang.Object ref = clientSecret_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clientSecret_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-         * Optional. The client secret provided by the 3rd party platform.
-         * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clientSecret. - */ - public com.google.protobuf.ByteString getClientSecretBytes() { - java.lang.Object ref = clientSecret_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clientSecret_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - /** - * - * - *
-         * Optional. The client secret provided by the 3rd party platform.
-         * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The clientSecret to set. - * @return This builder for chaining. - */ - public Builder setClientSecret(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - clientSecret_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - /** - * - * - *
-         * Optional. The client secret provided by the 3rd party platform.
-         * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearClientSecret() { - clientSecret_ = getDefaultInstance().getClientSecret(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue) + } - /** - * - * - *
-         * Optional. The client secret provided by the 3rd party platform.
-         * 
- * - * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for clientSecret to set. - * @return This builder for chaining. - */ - public Builder setClientSecretBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - clientSecret_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue) + private static final com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue + DEFAULT_INSTANCE; - private java.lang.Object tokenEndpoint_ = ""; + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue(); + } - /** - * - * - *
-         * Required. The token endpoint provided by the 3rd party platform to
-         * exchange an access token.
-         * 
- * - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The tokenEndpoint. - */ - public java.lang.String getTokenEndpoint() { - java.lang.Object ref = tokenEndpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tokenEndpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * - * - *
-         * Required. The token endpoint provided by the 3rd party platform to
-         * exchange an access token.
-         * 
- * - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecretVersionHeaderValue 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.v3.Webhook.GenericWebService.SecretVersionHeaderValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OAuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The client ID provided by the 3rd party platform.
+       * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + java.lang.String getClientId(); + + /** + * + * + *
+       * Required. The client ID provided by the 3rd party platform.
+       * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString getClientIdBytes(); + + /** + * + * + *
+       * Optional. The client secret provided by the 3rd party platform.
+       * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientSecret. + */ + java.lang.String getClientSecret(); + + /** + * + * + *
+       * Optional. The client secret provided by the 3rd party platform.
+       * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientSecret. + */ + com.google.protobuf.ByteString getClientSecretBytes(); + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the client secret. If this field is set, the `client_secret` field will
+       * be ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForClientSecret. + */ + java.lang.String getSecretVersionForClientSecret(); + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the client secret. If this field is set, the `client_secret` field will
+       * be ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForClientSecret. + */ + com.google.protobuf.ByteString getSecretVersionForClientSecretBytes(); + + /** + * + * + *
+       * Required. The token endpoint provided by the 3rd party platform to
+       * exchange an access token.
+       * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + java.lang.String getTokenEndpoint(); + + /** + * + * + *
+       * Required. The token endpoint provided by the 3rd party platform to
+       * exchange an access token.
+       * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + com.google.protobuf.ByteString getTokenEndpointBytes(); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + int getScopesCount(); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); + } + + /** + * + * + *
+     * Represents configuration of OAuth client credential flow for 3rd party
+     * API authentication.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} + */ + public static final class OAuthConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) + OAuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OAuthConfig.newBuilder() to construct. + private OAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OAuthConfig() { + clientId_ = ""; + clientSecret_ = ""; + secretVersionForClientSecret_ = ""; + tokenEndpoint_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OAuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.class, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.Builder + .class); + } + + public static final int CLIENT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; + + /** + * + * + *
+       * Required. The client ID provided by the 3rd party platform.
+       * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + 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(); + clientId_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. The client ID provided by the 3rd party platform.
+       * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_SECRET_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientSecret_ = ""; + + /** + * + * + *
+       * Optional. The client secret provided by the 3rd party platform.
+       * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientSecret. + */ + @java.lang.Override + public java.lang.String getClientSecret() { + java.lang.Object ref = clientSecret_; + 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(); + clientSecret_ = s; + return s; + } + } + + /** + * + * + *
+       * Optional. The client secret provided by the 3rd party platform.
+       * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientSecretBytes() { + java.lang.Object ref = clientSecret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_VERSION_FOR_CLIENT_SECRET_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object secretVersionForClientSecret_ = ""; + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the client secret. If this field is set, the `client_secret` field will
+       * be ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForClientSecret. + */ + @java.lang.Override + public java.lang.String getSecretVersionForClientSecret() { + java.lang.Object ref = secretVersionForClientSecret_; + 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(); + secretVersionForClientSecret_ = s; + return s; + } + } + + /** + * + * + *
+       * Optional. The name of the SecretManager secret version resource storing
+       * the client secret. If this field is set, the `client_secret` field will
+       * be ignored. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
+       * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForClientSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretVersionForClientSecretBytes() { + java.lang.Object ref = secretVersionForClientSecret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForClientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_ENDPOINT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object tokenEndpoint_ = ""; + + /** + * + * + *
+       * Required. The token endpoint provided by the 3rd party platform to
+       * exchange an access token.
+       * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + @java.lang.Override + public java.lang.String getTokenEndpoint() { + java.lang.Object ref = tokenEndpoint_; + 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(); + tokenEndpoint_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. The token endpoint provided by the 3rd party platform to
+       * exchange an access token.
+       * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTokenEndpointBytes() { + java.lang.Object ref = tokenEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tokenEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+       * Optional. The OAuth scopes to grant.
+       * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientSecret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tokenEndpoint_); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, scopes_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersionForClientSecret_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, secretVersionForClientSecret_); + } + 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(clientId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientSecret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tokenEndpoint_); + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersionForClientSecret_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 5, secretVersionForClientSecret_); + } + 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.v3.Webhook.GenericWebService.OAuthConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig other = + (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) obj; + + if (!getClientId().equals(other.getClientId())) return false; + if (!getClientSecret().equals(other.getClientSecret())) return false; + if (!getSecretVersionForClientSecret().equals(other.getSecretVersionForClientSecret())) + return false; + if (!getTokenEndpoint().equals(other.getTokenEndpoint())) return false; + if (!getScopesList().equals(other.getScopesList())) 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) + CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getClientId().hashCode(); + hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getClientSecret().hashCode(); + hash = (37 * hash) + SECRET_VERSION_FOR_CLIENT_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getSecretVersionForClientSecret().hashCode(); + hash = (37 * hash) + TOKEN_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getTokenEndpoint().hashCode(); + if (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + 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.v3.Webhook.GenericWebService.OAuthConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + 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.v3.Webhook.GenericWebService.OAuthConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + 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.v3.Webhook.GenericWebService.OAuthConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + 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.v3.Webhook.GenericWebService.OAuthConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + 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.v3.Webhook.GenericWebService.OAuthConfig + 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.v3.Webhook.GenericWebService.OAuthConfig + 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.v3.Webhook.GenericWebService.OAuthConfig 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; + } + + /** + * + * + *
+       * Represents configuration of OAuth client credential flow for 3rd party
+       * API authentication.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.class, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clientId_ = ""; + clientSecret_ = ""; + secretVersionForClientSecret_ = ""; + tokenEndpoint_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig build() { + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + buildPartial() { + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig result = + new com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientSecret_ = clientSecret_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.secretVersionForClientSecret_ = secretVersionForClientSecret_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tokenEndpoint_ = tokenEndpoint_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + scopes_.makeImmutable(); + result.scopes_ = scopes_; + } + } + + @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.v3.Webhook.GenericWebService.OAuthConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + .getDefaultInstance()) return this; + if (!other.getClientId().isEmpty()) { + clientId_ = other.clientId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getClientSecret().isEmpty()) { + clientSecret_ = other.clientSecret_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSecretVersionForClientSecret().isEmpty()) { + secretVersionForClientSecret_ = other.secretVersionForClientSecret_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTokenEndpoint().isEmpty()) { + tokenEndpoint_ = other.tokenEndpoint_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ |= 0x00000010; + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + 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: + { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + clientSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + tokenEndpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + break; + } // case 34 + case 42: + { + secretVersionForClientSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + 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 java.lang.Object clientId_ = ""; + + /** + * + * + *
+         * Required. The client ID provided by the 3rd party platform.
+         * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Required. The client ID provided by the 3rd party platform.
+         * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Required. The client ID provided by the 3rd party platform.
+         * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The client ID provided by the 3rd party platform.
+         * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClientId() { + clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The client ID provided by the 3rd party platform.
+         * 
+ * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object clientSecret_ = ""; + + /** + * + * + *
+         * Optional. The client secret provided by the 3rd party platform.
+         * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientSecret. + */ + public java.lang.String getClientSecret() { + java.lang.Object ref = clientSecret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientSecret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Optional. The client secret provided by the 3rd party platform.
+         * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientSecret. + */ + public com.google.protobuf.ByteString getClientSecretBytes() { + java.lang.Object ref = clientSecret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Optional. The client secret provided by the 3rd party platform.
+         * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The clientSecret to set. + * @return This builder for chaining. + */ + public Builder setClientSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientSecret_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The client secret provided by the 3rd party platform.
+         * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClientSecret() { + clientSecret_ = getDefaultInstance().getClientSecret(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The client secret provided by the 3rd party platform.
+         * 
+ * + * string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for clientSecret to set. + * @return This builder for chaining. + */ + public Builder setClientSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientSecret_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object secretVersionForClientSecret_ = ""; + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForClientSecret. + */ + public java.lang.String getSecretVersionForClientSecret() { + java.lang.Object ref = secretVersionForClientSecret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretVersionForClientSecret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForClientSecret. + */ + public com.google.protobuf.ByteString getSecretVersionForClientSecretBytes() { + java.lang.Object ref = secretVersionForClientSecret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForClientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The secretVersionForClientSecret to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionForClientSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + secretVersionForClientSecret_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSecretVersionForClientSecret() { + secretVersionForClientSecret_ = getDefaultInstance().getSecretVersionForClientSecret(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The name of the SecretManager secret version resource storing
+         * the client secret. If this field is set, the `client_secret` field will
+         * be ignored. Format:
+         * `projects/{project}/secrets/{secret}/versions/{version}`
+         * 
+ * + * + * string secret_version_for_client_secret = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for secretVersionForClientSecret to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionForClientSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + secretVersionForClientSecret_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object tokenEndpoint_ = ""; + + /** + * + * + *
+         * Required. The token endpoint provided by the 3rd party platform to
+         * exchange an access token.
+         * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + public java.lang.String getTokenEndpoint() { + java.lang.Object ref = tokenEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Required. The token endpoint provided by the 3rd party platform to
+         * exchange an access token.
+         * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + public com.google.protobuf.ByteString getTokenEndpointBytes() { + java.lang.Object ref = tokenEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tokenEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Required. The token endpoint provided by the 3rd party platform to
+         * exchange an access token.
+         * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tokenEndpoint to set. + * @return This builder for chaining. + */ + public Builder setTokenEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tokenEndpoint_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** * - * @return The bytes for tokenEndpoint. + * + *
+         * Required. The token endpoint provided by the 3rd party platform to
+         * exchange an access token.
+         * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getTokenEndpointBytes() { - java.lang.Object ref = tokenEndpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tokenEndpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder clearTokenEndpoint() { + tokenEndpoint_ = getDefaultInstance().getTokenEndpoint(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The token endpoint provided by the 3rd party platform to
+         * exchange an access token.
+         * 
+ * + * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tokenEndpoint to set. + * @return This builder for chaining. + */ + public Builder setTokenEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tokenEndpoint_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureScopesIsMutable() { + if (!scopes_.isModifiable()) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + scopes_.makeImmutable(); + return scopes_; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. The OAuth scopes to grant.
+         * 
+ * + * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000010; + 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.v3.Webhook.GenericWebService.OAuthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) + private static final com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OAuthConfig 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.v3.Webhook.GenericWebService.OAuthConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceAccountAuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The email address of the service account used to authenticate
+       * the webhook call. Dialogflow uses this service account to exchange an
+       * access token and the access token is then sent in the `Authorization`
+       * header of the webhook request.
+       *
+       * The service account must have the
+       * `roles/iam.serviceAccountTokenCreator` role granted to the
+       * [Dialogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + + /** + * + * + *
+       * Required. The email address of the service account used to authenticate
+       * the webhook call. Dialogflow uses this service account to exchange an
+       * access token and the access token is then sent in the `Authorization`
+       * header of the webhook request.
+       *
+       * The service account must have the
+       * `roles/iam.serviceAccountTokenCreator` role granted to the
+       * [Dialogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + } + + /** + * + * + *
+     * Configuration for authentication using a service account.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig} + */ + public static final class ServiceAccountAuthConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig) + ServiceAccountAuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ServiceAccountAuthConfig.newBuilder() to construct. + private ServiceAccountAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceAccountAuthConfig() { + serviceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServiceAccountAuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .class, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .Builder.class); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + + /** + * + * + *
+       * Required. The email address of the service account used to authenticate
+       * the webhook call. Dialogflow uses this service account to exchange an
+       * access token and the access token is then sent in the `Authorization`
+       * header of the webhook request.
+       *
+       * The service account must have the
+       * `roles/iam.serviceAccountTokenCreator` role granted to the
+       * [Dialogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + + /** + * + * + *
+       * Required. The email address of the service account used to authenticate
+       * the webhook call. Dialogflow uses this service account to exchange an
+       * access token and the access token is then sent in the `Authorization`
+       * header of the webhook request.
+       *
+       * The service account must have the
+       * `roles/iam.serviceAccountTokenCreator` role granted to the
+       * [Dialogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccount_); + } + 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(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccount_); + } + 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.v3.Webhook.GenericWebService.ServiceAccountAuthConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig other = + (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig) + obj; + + if (!getServiceAccount().equals(other.getServiceAccount())) 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) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + 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.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + 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.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + 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.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + 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.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + 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.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + 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.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig + 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.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + 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; + } + + /** + * + * + *
+       * Configuration for authentication using a service account.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig) + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig.class, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceAccount_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + build() { + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - /** - * - * - *
-         * Required. The token endpoint provided by the 3rd party platform to
-         * exchange an access token.
-         * 
- * - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The tokenEndpoint to set. - * @return This builder for chaining. - */ - public Builder setTokenEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + buildPartial() { + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + result = + new com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); } - tokenEndpoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + onBuilt(); + return result; } - /** - * - * - *
-         * Required. The token endpoint provided by the 3rd party platform to
-         * exchange an access token.
-         * 
- * - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTokenEndpoint() { - tokenEndpoint_ = getDefaultInstance().getTokenEndpoint(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceAccount_ = serviceAccount_; + } } - /** - * - * - *
-         * Required. The token endpoint provided by the 3rd party platform to
-         * exchange an access token.
-         * 
- * - * string token_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for tokenEndpoint to set. - * @return This builder for chaining. - */ - public Builder setTokenEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + @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.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig) + other); + } else { + super.mergeFrom(other); + return this; } - checkByteStringIsUtf8(value); - tokenEndpoint_ = value; - bitField0_ |= 0x00000004; + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + other) { + if (other + == com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig.getDefaultInstance()) return this; + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } - private com.google.protobuf.LazyStringArrayList scopes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureScopesIsMutable() { - if (!scopes_.isModifiable()) { - scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); - } - bitField0_ |= 0x00000008; + @java.lang.Override + public final boolean isInitialized() { + return true; } - /** - * - * - *
-         * Optional. The OAuth scopes to grant.
-         * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the scopes. - */ - public com.google.protobuf.ProtocolStringList getScopesList() { - scopes_.makeImmutable(); - return scopes_; + @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: + { + serviceAccount_ = input.readStringRequireUtf8(); + 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; } - /** - * - * - *
-         * Optional. The OAuth scopes to grant.
-         * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of scopes. - */ - public int getScopesCount() { - return scopes_.size(); - } + private int bitField0_; - /** - * - * - *
-         * Optional. The OAuth scopes to grant.
-         * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The scopes at the given index. - */ - public java.lang.String getScopes(int index) { - return scopes_.get(index); - } + private java.lang.Object serviceAccount_ = ""; /** * * *
-         * Optional. The OAuth scopes to grant.
+         * Required. The email address of the service account used to authenticate
+         * the webhook call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the webhook request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          * 
* - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @param index The index of the value to return. - * @return The bytes of the scopes at the given index. + * @return The serviceAccount. */ - public com.google.protobuf.ByteString getScopesBytes(int index) { - return scopes_.getByteString(index); + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-         * Optional. The OAuth scopes to grant.
+         * Required. The email address of the service account used to authenticate
+         * the webhook call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the webhook request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          * 
* - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @param index The index to set the value at. - * @param value The scopes to set. - * @return This builder for chaining. + * @return The bytes for serviceAccount. */ - public Builder setScopes(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - ensureScopesIsMutable(); - scopes_.set(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; } /** * * *
-         * Optional. The OAuth scopes to grant.
+         * Required. The email address of the service account used to authenticate
+         * the webhook call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the webhook request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          * 
* - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @param value The scopes to add. + * @param value The serviceAccount to set. * @return This builder for chaining. */ - public Builder addScopes(java.lang.String value) { + public Builder setServiceAccount(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureScopesIsMutable(); - scopes_.add(value); - bitField0_ |= 0x00000008; + serviceAccount_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2611,37 +4590,24 @@ public Builder addScopes(java.lang.String value) { * * *
-         * Optional. The OAuth scopes to grant.
-         * 
- * - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The scopes to add. - * @return This builder for chaining. - */ - public Builder addAllScopes(java.lang.Iterable values) { - ensureScopesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * + * Required. The email address of the service account used to authenticate + * the webhook call. Dialogflow uses this service account to exchange an + * access token and the access token is then sent in the `Authorization` + * header of the webhook request. * - *
-         * Optional. The OAuth scopes to grant.
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          * 
* - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ - public Builder clearScopes() { - scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - ; + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -2650,22 +4616,29 @@ public Builder clearScopes() { * * *
-         * Optional. The OAuth scopes to grant.
+         * Required. The email address of the service account used to authenticate
+         * the webhook call. Dialogflow uses this service account to exchange an
+         * access token and the access token is then sent in the `Authorization`
+         * header of the webhook request.
+         *
+         * The service account must have the
+         * `roles/iam.serviceAccountTokenCreator` role granted to the
+         * [Dialogflow service
+         * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          * 
* - * repeated string scopes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string service_account = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @param value The bytes of the scopes to add. + * @param value The bytes for serviceAccount to set. * @return This builder for chaining. */ - public Builder addScopesBytes(com.google.protobuf.ByteString value) { + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureScopesIsMutable(); - scopes_.add(value); - bitField0_ |= 0x00000008; + serviceAccount_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2682,27 +4655,30 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) - private static final com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig) + private static final com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = - new com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig(); + new com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig(); } - public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public static com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public OAuthConfig parsePartialFrom( + public ServiceAccountAuthConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2722,17 +4698,17 @@ public OAuthConfig parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -2809,7 +4785,7 @@ public com.google.protobuf.ByteString getUriBytes() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 * @return The username. */ @java.lang.Override @@ -2836,7 +4812,7 @@ public java.lang.String getUsername() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 * @return The bytes for username. */ @java.lang.Override @@ -2868,7 +4844,7 @@ public com.google.protobuf.ByteString getUsernameBytes() { * string password = 3 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 * @return The password. */ @java.lang.Override @@ -2895,7 +4871,7 @@ public java.lang.String getPassword() { * string password = 3 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 * @return The bytes for password. */ @java.lang.Override @@ -2912,6 +4888,67 @@ public com.google.protobuf.ByteString getPasswordBytes() { } } + public static final int SECRET_VERSION_FOR_USERNAME_PASSWORD_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object secretVersionForUsernamePassword_ = ""; + + /** + * + * + *
+     * Optional. The SecretManager secret version resource storing the
+     * username:password pair for HTTP Basic authentication. Format:
+     * `projects/{project}/secrets/{secret}/versions/{version}`
+     * 
+ * + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The secretVersionForUsernamePassword. + */ + @java.lang.Override + public java.lang.String getSecretVersionForUsernamePassword() { + java.lang.Object ref = secretVersionForUsernamePassword_; + 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(); + secretVersionForUsernamePassword_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The SecretManager secret version resource storing the
+     * username:password pair for HTTP Basic authentication. Format:
+     * `projects/{project}/secrets/{secret}/versions/{version}`
+     * 
+ * + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for secretVersionForUsernamePassword. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretVersionForUsernamePasswordBytes() { + java.lang.Object ref = secretVersionForUsernamePassword_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersionForUsernamePassword_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int REQUEST_HEADERS_FIELD_NUMBER = 4; private static final class RequestHeadersDefaultEntryHolder { @@ -2932,71 +4969,226 @@ private static final class RequestHeadersDefaultEntryHolder { internalGetRequestHeaders() { if (requestHeaders_ == null) { return com.google.protobuf.MapField.emptyMapField( - RequestHeadersDefaultEntryHolder.defaultEntry); + RequestHeadersDefaultEntryHolder.defaultEntry); + } + return requestHeaders_; + } + + public int getRequestHeadersCount() { + return internalGetRequestHeaders().getMap().size(); + } + + /** + * + * + *
+     * The HTTP request headers to send together with webhook requests.
+     * 
+ * + * map<string, string> request_headers = 4; + */ + @java.lang.Override + public boolean containsRequestHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRequestHeaders().getMap().containsKey(key); + } + + /** Use {@link #getRequestHeadersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRequestHeaders() { + return getRequestHeadersMap(); + } + + /** + * + * + *
+     * The HTTP request headers to send together with webhook requests.
+     * 
+ * + * map<string, string> request_headers = 4; + */ + @java.lang.Override + public java.util.Map getRequestHeadersMap() { + return internalGetRequestHeaders().getMap(); + } + + /** + * + * + *
+     * The HTTP request headers to send together with webhook requests.
+     * 
+ * + * map<string, string> request_headers = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRequestHeadersOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRequestHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * The HTTP request headers to send together with webhook requests.
+     * 
+ * + * map<string, string> request_headers = 4; + */ + @java.lang.Override + public java.lang.String getRequestHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRequestHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SECRET_VERSIONS_FOR_REQUEST_HEADERS_FIELD_NUMBER = 20; + + private static final class SecretVersionsForRequestHeadersDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.dialogflow.cx.v3.WebhookProto + .internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionsForRequestHeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + secretVersionsForRequestHeaders_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + internalGetSecretVersionsForRequestHeaders() { + if (secretVersionsForRequestHeaders_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SecretVersionsForRequestHeadersDefaultEntryHolder.defaultEntry); } - return requestHeaders_; + return secretVersionsForRequestHeaders_; } - public int getRequestHeadersCount() { - return internalGetRequestHeaders().getMap().size(); + public int getSecretVersionsForRequestHeadersCount() { + return internalGetSecretVersionsForRequestHeaders().getMap().size(); } /** * * *
-     * The HTTP request headers to send together with webhook requests.
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
      * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public boolean containsRequestHeaders(java.lang.String key) { + public boolean containsSecretVersionsForRequestHeaders(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetRequestHeaders().getMap().containsKey(key); + return internalGetSecretVersionsForRequestHeaders().getMap().containsKey(key); } - /** Use {@link #getRequestHeadersMap()} instead. */ + /** Use {@link #getSecretVersionsForRequestHeadersMap()} instead. */ @java.lang.Override @java.lang.Deprecated - public java.util.Map getRequestHeaders() { - return getRequestHeadersMap(); + public java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + getSecretVersionsForRequestHeaders() { + return getSecretVersionsForRequestHeadersMap(); } /** * * *
-     * The HTTP request headers to send together with webhook requests.
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
      * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public java.util.Map getRequestHeadersMap() { - return internalGetRequestHeaders().getMap(); + public java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + getSecretVersionsForRequestHeadersMap() { + return internalGetSecretVersionsForRequestHeaders().getMap(); } /** * * *
-     * The HTTP request headers to send together with webhook requests.
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
      * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public /* nullable */ java.lang.String getRequestHeadersOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { + public /* nullable */ com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue + getSecretVersionsForRequestHeadersOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + defaultValue) { if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetRequestHeaders().getMap(); + java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + map = internalGetSecretVersionsForRequestHeaders().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } @@ -3004,17 +5196,28 @@ public java.util.Map getRequestHeadersMap() * * *
-     * The HTTP request headers to send together with webhook requests.
+     * Optional. The HTTP request headers to send together with webhook
+     * requests. Header values are stored in SecretManager secret versions.
+     *
+     * When the same header name is specified in both `request_headers` and
+     * `secret_versions_for_request_headers`, the value in
+     * `secret_versions_for_request_headers` will be used.
      * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public java.lang.String getRequestHeadersOrThrow(java.lang.String key) { + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + getSecretVersionsForRequestHeadersOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetRequestHeaders().getMap(); + java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + map = internalGetSecretVersionsForRequestHeaders().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } @@ -3228,6 +5431,71 @@ public int getServiceAgentAuthValue() { : result; } + public static final int SERVICE_ACCOUNT_AUTH_CONFIG_FIELD_NUMBER = 18; + private com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + serviceAccountAuthConfig_; + + /** + * + * + *
+     * Optional. Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceAccountAuthConfig field is set. + */ + @java.lang.Override + public boolean hasServiceAccountAuthConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAccountAuthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + getServiceAccountAuthConfig() { + return serviceAccountAuthConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .getDefaultInstance() + : serviceAccountAuthConfig_; + } + + /** + * + * + *
+     * Optional. Configuration for service account authentication.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfigOrBuilder + getServiceAccountAuthConfigOrBuilder() { + return serviceAccountAuthConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .getDefaultInstance() + : serviceAccountAuthConfig_; + } + public static final int WEBHOOK_TYPE_FIELD_NUMBER = 6; private int webhookType_ = 0; @@ -3562,6 +5830,19 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(12, serviceAgentAuth_); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(18, getServiceAccountAuthConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty( + secretVersionForUsernamePassword_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 19, secretVersionForUsernamePassword_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetSecretVersionsForRequestHeaders(), + SecretVersionsForRequestHeadersDefaultEntryHolder.defaultEntry, + 20); getUnknownFields().writeTo(output); } @@ -3633,6 +5914,35 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, serviceAgentAuth_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getServiceAccountAuthConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty( + secretVersionForUsernamePassword_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 19, secretVersionForUsernamePassword_); + } + for (java.util.Map.Entry< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + entry : internalGetSecretVersionsForRequestHeaders().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue> + secretVersionsForRequestHeaders__ = + SecretVersionsForRequestHeadersDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, secretVersionsForRequestHeaders__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3652,13 +5962,22 @@ public boolean equals(final java.lang.Object obj) { if (!getUri().equals(other.getUri())) return false; if (!getUsername().equals(other.getUsername())) return false; if (!getPassword().equals(other.getPassword())) return false; + if (!getSecretVersionForUsernamePassword() + .equals(other.getSecretVersionForUsernamePassword())) return false; if (!internalGetRequestHeaders().equals(other.internalGetRequestHeaders())) return false; + if (!internalGetSecretVersionsForRequestHeaders() + .equals(other.internalGetSecretVersionsForRequestHeaders())) return false; if (!getAllowedCaCertsList().equals(other.getAllowedCaCertsList())) return false; if (hasOauthConfig() != other.hasOauthConfig()) return false; if (hasOauthConfig()) { if (!getOauthConfig().equals(other.getOauthConfig())) return false; } if (serviceAgentAuth_ != other.serviceAgentAuth_) return false; + if (hasServiceAccountAuthConfig() != other.hasServiceAccountAuthConfig()) return false; + if (hasServiceAccountAuthConfig()) { + if (!getServiceAccountAuthConfig().equals(other.getServiceAccountAuthConfig())) + return false; + } if (webhookType_ != other.webhookType_) return false; if (httpMethod_ != other.httpMethod_) return false; if (!getRequestBody().equals(other.getRequestBody())) return false; @@ -3680,10 +5999,16 @@ public int hashCode() { hash = (53 * hash) + getUsername().hashCode(); hash = (37 * hash) + PASSWORD_FIELD_NUMBER; hash = (53 * hash) + getPassword().hashCode(); + hash = (37 * hash) + SECRET_VERSION_FOR_USERNAME_PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getSecretVersionForUsernamePassword().hashCode(); if (!internalGetRequestHeaders().getMap().isEmpty()) { hash = (37 * hash) + REQUEST_HEADERS_FIELD_NUMBER; hash = (53 * hash) + internalGetRequestHeaders().hashCode(); } + if (!internalGetSecretVersionsForRequestHeaders().getMap().isEmpty()) { + hash = (37 * hash) + SECRET_VERSIONS_FOR_REQUEST_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetSecretVersionsForRequestHeaders().hashCode(); + } if (getAllowedCaCertsCount() > 0) { hash = (37 * hash) + ALLOWED_CA_CERTS_FIELD_NUMBER; hash = (53 * hash) + getAllowedCaCertsList().hashCode(); @@ -3694,6 +6019,10 @@ public int hashCode() { } hash = (37 * hash) + SERVICE_AGENT_AUTH_FIELD_NUMBER; hash = (53 * hash) + serviceAgentAuth_; + if (hasServiceAccountAuthConfig()) { + hash = (37 * hash) + SERVICE_ACCOUNT_AUTH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountAuthConfig().hashCode(); + } hash = (37 * hash) + WEBHOOK_TYPE_FIELD_NUMBER; hash = (53 * hash) + webhookType_; hash = (37 * hash) + HTTP_METHOD_FIELD_NUMBER; @@ -3832,6 +6161,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 4: return internalGetRequestHeaders(); + case 20: + return internalGetSecretVersionsForRequestHeaders(); case 9: return internalGetParameterMapping(); default: @@ -3845,6 +6176,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi switch (number) { case 4: return internalGetMutableRequestHeaders(); + case 20: + return internalGetMutableSecretVersionsForRequestHeaders(); case 9: return internalGetMutableParameterMapping(); default: @@ -3875,6 +6208,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getOauthConfigFieldBuilder(); + getServiceAccountAuthConfigFieldBuilder(); } } @@ -3885,7 +6219,9 @@ public Builder clear() { uri_ = ""; username_ = ""; password_ = ""; + secretVersionForUsernamePassword_ = ""; internalGetMutableRequestHeaders().clear(); + internalGetMutableSecretVersionsForRequestHeaders().clear(); allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class); oauthConfig_ = null; if (oauthConfigBuilder_ != null) { @@ -3893,6 +6229,11 @@ public Builder clear() { oauthConfigBuilder_ = null; } serviceAgentAuth_ = 0; + serviceAccountAuthConfig_ = null; + if (serviceAccountAuthConfigBuilder_ != null) { + serviceAccountAuthConfigBuilder_.dispose(); + serviceAccountAuthConfigBuilder_ = null; + } webhookType_ = 0; httpMethod_ = 0; requestBody_ = ""; @@ -3945,32 +6286,47 @@ private void buildPartial0( result.password_ = password_; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.secretVersionForUsernamePassword_ = secretVersionForUsernamePassword_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.requestHeaders_ = internalGetRequestHeaders(); result.requestHeaders_.makeImmutable(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { + result.secretVersionsForRequestHeaders_ = + internalGetSecretVersionsForRequestHeaders() + .build(SecretVersionsForRequestHeadersDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000040) != 0)) { allowedCaCerts_.makeImmutable(); result.allowedCaCerts_ = allowedCaCerts_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.oauthConfig_ = oauthConfigBuilder_ == null ? oauthConfig_ : oauthConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.serviceAgentAuth_ = serviceAgentAuth_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { + result.serviceAccountAuthConfig_ = + serviceAccountAuthConfigBuilder_ == null + ? serviceAccountAuthConfig_ + : serviceAccountAuthConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000400) != 0)) { result.webhookType_ = webhookType_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.httpMethod_ = httpMethod_; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.requestBody_ = requestBody_; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.parameterMapping_ = internalGetParameterMapping(); result.parameterMapping_.makeImmutable(); } @@ -4041,13 +6397,21 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebSer bitField0_ |= 0x00000004; onChanged(); } + if (!other.getSecretVersionForUsernamePassword().isEmpty()) { + secretVersionForUsernamePassword_ = other.secretVersionForUsernamePassword_; + bitField0_ |= 0x00000008; + onChanged(); + } internalGetMutableRequestHeaders().mergeFrom(other.internalGetRequestHeaders()); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; + internalGetMutableSecretVersionsForRequestHeaders() + .mergeFrom(other.internalGetSecretVersionsForRequestHeaders()); + bitField0_ |= 0x00000020; if (!other.allowedCaCerts_.isEmpty()) { if (allowedCaCerts_.isEmpty()) { allowedCaCerts_ = other.allowedCaCerts_; allowedCaCerts_.makeImmutable(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; } else { ensureAllowedCaCertsIsMutable(); allowedCaCerts_.addAll(other.allowedCaCerts_); @@ -4060,6 +6424,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebSer if (other.serviceAgentAuth_ != 0) { setServiceAgentAuthValue(other.getServiceAgentAuthValue()); } + if (other.hasServiceAccountAuthConfig()) { + mergeServiceAccountAuthConfig(other.getServiceAccountAuthConfig()); + } if (other.webhookType_ != 0) { setWebhookTypeValue(other.getWebhookTypeValue()); } @@ -4068,11 +6435,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebSer } if (!other.getRequestBody().isEmpty()) { requestBody_ = other.requestBody_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00001000; onChanged(); } internalGetMutableParameterMapping().mergeFrom(other.internalGetParameterMapping()); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4127,7 +6494,7 @@ public Builder mergeFrom( internalGetMutableRequestHeaders() .getMutableMap() .put(requestHeaders__.getKey(), requestHeaders__.getValue()); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 34 case 42: @@ -4140,19 +6507,19 @@ public Builder mergeFrom( case 48: { webhookType_ = input.readEnum(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000400; break; } // case 48 case 56: { httpMethod_ = input.readEnum(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000800; break; } // case 56 case 66: { requestBody_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00001000; break; } // case 66 case 74: @@ -4165,21 +6532,53 @@ public Builder mergeFrom( internalGetMutableParameterMapping() .getMutableMap() .put(parameterMapping__.getKey(), parameterMapping__.getValue()); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; break; } // case 74 case 90: { input.readMessage(getOauthConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; break; } // case 90 case 96: { serviceAgentAuth_ = input.readEnum(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; break; } // case 96 + case 146: + { + input.readMessage( + getServiceAccountAuthConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 146 + case 154: + { + secretVersionForUsernamePassword_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 154 + case 162: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue> + secretVersionsForRequestHeaders__ = + input.readMessage( + SecretVersionsForRequestHeadersDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableSecretVersionsForRequestHeaders() + .ensureBuilderMap() + .put( + secretVersionsForRequestHeaders__.getKey(), + secretVersionsForRequestHeaders__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 162 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4327,7 +6726,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 * @return The username. */ @java.lang.Deprecated @@ -4353,7 +6752,7 @@ public java.lang.String getUsername() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 * @return The bytes for username. */ @java.lang.Deprecated @@ -4376,20 +6775,146 @@ public com.google.protobuf.ByteString getUsernameBytes() { * The user name for HTTP Basic authentication. *
* - * string username = 2 [deprecated = true]; + * string username = 2 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 + * @param value The username to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + username_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The user name for HTTP Basic authentication.
+       * 
+ * + * string username = 2 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * The user name for HTTP Basic authentication.
+       * 
+ * + * string username = 2 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=225 + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + + /** + * + * + *
+       * The password for HTTP Basic authentication.
+       * 
+ * + * string password = 3 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 + * @return The password. + */ + @java.lang.Deprecated + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The password for HTTP Basic authentication.
+       * 
+ * + * string password = 3 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 + * @return The bytes for password. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The password for HTTP Basic authentication.
+       * 
+ * + * string password = 3 [deprecated = true]; * - * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 - * @param value The username to set. + * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 + * @param value The password to set. * @return This builder for chaining. */ @java.lang.Deprecated - public Builder setUsername(java.lang.String value) { + public Builder setPassword(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - username_ = value; - bitField0_ |= 0x00000002; + password_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -4398,19 +6923,19 @@ public Builder setUsername(java.lang.String value) { * * *
-       * The user name for HTTP Basic authentication.
+       * The password for HTTP Basic authentication.
        * 
* - * string username = 2 [deprecated = true]; + * string password = 3 [deprecated = true]; * - * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 + * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 * @return This builder for chaining. */ @java.lang.Deprecated - public Builder clearUsername() { - username_ = getDefaultInstance().getUsername(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearPassword() { + password_ = getDefaultInstance().getPassword(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -4419,50 +6944,51 @@ public Builder clearUsername() { * * *
-       * The user name for HTTP Basic authentication.
+       * The password for HTTP Basic authentication.
        * 
* - * string username = 2 [deprecated = true]; + * string password = 3 [deprecated = true]; * - * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.username is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=187 - * @param value The bytes for username to set. + * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. + * See google/cloud/dialogflow/cx/v3/webhook.proto;l=228 + * @param value The bytes for password to set. * @return This builder for chaining. */ @java.lang.Deprecated - public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + public Builder setPasswordBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - username_ = value; - bitField0_ |= 0x00000002; + password_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } - private java.lang.Object password_ = ""; + private java.lang.Object secretVersionForUsernamePassword_ = ""; /** * * *
-       * The password for HTTP Basic authentication.
+       * Optional. The SecretManager secret version resource storing the
+       * username:password pair for HTTP Basic authentication. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * string password = 3 [deprecated = true]; + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 - * @return The password. + * @return The secretVersionForUsernamePassword. */ - @java.lang.Deprecated - public java.lang.String getPassword() { - java.lang.Object ref = password_; + public java.lang.String getSecretVersionForUsernamePassword() { + java.lang.Object ref = secretVersionForUsernamePassword_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - password_ = s; + secretVersionForUsernamePassword_ = s; return s; } else { return (java.lang.String) ref; @@ -4473,22 +6999,23 @@ public java.lang.String getPassword() { * * *
-       * The password for HTTP Basic authentication.
+       * Optional. The SecretManager secret version resource storing the
+       * username:password pair for HTTP Basic authentication. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * string password = 3 [deprecated = true]; + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 - * @return The bytes for password. + * @return The bytes for secretVersionForUsernamePassword. */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getPasswordBytes() { - java.lang.Object ref = password_; + public com.google.protobuf.ByteString getSecretVersionForUsernamePasswordBytes() { + java.lang.Object ref = secretVersionForUsernamePassword_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - password_ = b; + secretVersionForUsernamePassword_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -4499,23 +7026,24 @@ public com.google.protobuf.ByteString getPasswordBytes() { * * *
-       * The password for HTTP Basic authentication.
+       * Optional. The SecretManager secret version resource storing the
+       * username:password pair for HTTP Basic authentication. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * string password = 3 [deprecated = true]; + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 - * @param value The password to set. + * @param value The secretVersionForUsernamePassword to set. * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder setPassword(java.lang.String value) { + public Builder setSecretVersionForUsernamePassword(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - password_ = value; - bitField0_ |= 0x00000004; + secretVersionForUsernamePassword_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -4524,19 +7052,21 @@ public Builder setPassword(java.lang.String value) { * * *
-       * The password for HTTP Basic authentication.
+       * Optional. The SecretManager secret version resource storing the
+       * username:password pair for HTTP Basic authentication. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * string password = 3 [deprecated = true]; + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder clearPassword() { - password_ = getDefaultInstance().getPassword(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder clearSecretVersionForUsernamePassword() { + secretVersionForUsernamePassword_ = + getDefaultInstance().getSecretVersionForUsernamePassword(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -4545,24 +7075,26 @@ public Builder clearPassword() { * * *
-       * The password for HTTP Basic authentication.
+       * Optional. The SecretManager secret version resource storing the
+       * username:password pair for HTTP Basic authentication. Format:
+       * `projects/{project}/secrets/{secret}/versions/{version}`
        * 
* - * string password = 3 [deprecated = true]; + * + * string secret_version_for_username_password = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @deprecated google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.password is deprecated. - * See google/cloud/dialogflow/cx/v3/webhook.proto;l=190 - * @param value The bytes for password to set. + * @param value The bytes for secretVersionForUsernamePassword to set. * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder setPasswordBytes(com.google.protobuf.ByteString value) { + public Builder setSecretVersionForUsernamePasswordBytes( + com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - password_ = value; - bitField0_ |= 0x00000004; + secretVersionForUsernamePassword_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -4588,7 +7120,7 @@ public Builder setPasswordBytes(com.google.protobuf.ByteString value) { if (!requestHeaders_.isMutable()) { requestHeaders_ = requestHeaders_.copy(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return requestHeaders_; } @@ -4631,57 +7163,338 @@ public java.util.Map getRequestHeaders() { * map<string, string> request_headers = 4; */ @java.lang.Override - public java.util.Map getRequestHeadersMap() { - return internalGetRequestHeaders().getMap(); + public java.util.Map getRequestHeadersMap() { + return internalGetRequestHeaders().getMap(); + } + + /** + * + * + *
+       * The HTTP request headers to send together with webhook requests.
+       * 
+ * + * map<string, string> request_headers = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRequestHeadersOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetRequestHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+       * The HTTP request headers to send together with webhook requests.
+       * 
+ * + * map<string, string> request_headers = 4; + */ + @java.lang.Override + public java.lang.String getRequestHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetRequestHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRequestHeaders() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableRequestHeaders().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+       * The HTTP request headers to send together with webhook requests.
+       * 
+ * + * map<string, string> request_headers = 4; + */ + public Builder removeRequestHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableRequestHeaders().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableRequestHeaders() { + bitField0_ |= 0x00000010; + return internalGetMutableRequestHeaders().getMutableMap(); + } + + /** + * + * + *
+       * The HTTP request headers to send together with webhook requests.
+       * 
+ * + * map<string, string> request_headers = 4; + */ + public Builder putRequestHeaders(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableRequestHeaders().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+       * The HTTP request headers to send together with webhook requests.
+       * 
+ * + * map<string, string> request_headers = 4; + */ + public Builder putAllRequestHeaders( + java.util.Map values) { + internalGetMutableRequestHeaders().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private static final class SecretVersionsForRequestHeadersConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue> { + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + build( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder + val) { + if (val + instanceof + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue) { + return (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue) + val; + } + return ((com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue.Builder) + val) + .build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue> + defaultEntry() { + return SecretVersionsForRequestHeadersDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final SecretVersionsForRequestHeadersConverter + secretVersionsForRequestHeadersConverter = new SecretVersionsForRequestHeadersConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + .Builder> + secretVersionsForRequestHeaders_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + .Builder> + internalGetSecretVersionsForRequestHeaders() { + if (secretVersionsForRequestHeaders_ == null) { + return new com.google.protobuf.MapFieldBuilder<>( + secretVersionsForRequestHeadersConverter); + } + return secretVersionsForRequestHeaders_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + .Builder> + internalGetMutableSecretVersionsForRequestHeaders() { + if (secretVersionsForRequestHeaders_ == null) { + secretVersionsForRequestHeaders_ = + new com.google.protobuf.MapFieldBuilder<>(secretVersionsForRequestHeadersConverter); + } + bitField0_ |= 0x00000020; + onChanged(); + return secretVersionsForRequestHeaders_; + } + + public int getSecretVersionsForRequestHeadersCount() { + return internalGetSecretVersionsForRequestHeaders().ensureBuilderMap().size(); + } + + /** + * + * + *
+       * Optional. The HTTP request headers to send together with webhook
+       * requests. Header values are stored in SecretManager secret versions.
+       *
+       * When the same header name is specified in both `request_headers` and
+       * `secret_versions_for_request_headers`, the value in
+       * `secret_versions_for_request_headers` will be used.
+       * 
+ * + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsSecretVersionsForRequestHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSecretVersionsForRequestHeaders().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getSecretVersionsForRequestHeadersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + getSecretVersionsForRequestHeaders() { + return getSecretVersionsForRequestHeadersMap(); + } + + /** + * + * + *
+       * Optional. The HTTP request headers to send together with webhook
+       * requests. Header values are stored in SecretManager secret versions.
+       *
+       * When the same header name is specified in both `request_headers` and
+       * `secret_versions_for_request_headers`, the value in
+       * `secret_versions_for_request_headers` will be used.
+       * 
+ * + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + getSecretVersionsForRequestHeadersMap() { + return internalGetSecretVersionsForRequestHeaders().getImmutableMap(); } /** * * *
-       * The HTTP request headers to send together with webhook requests.
+       * Optional. The HTTP request headers to send together with webhook
+       * requests. Header values are stored in SecretManager secret versions.
+       *
+       * When the same header name is specified in both `request_headers` and
+       * `secret_versions_for_request_headers`, the value in
+       * `secret_versions_for_request_headers` will be used.
        * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public /* nullable */ java.lang.String getRequestHeadersOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { + public /* nullable */ com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue + getSecretVersionsForRequestHeadersOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + defaultValue) { if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetRequestHeaders().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder> + map = internalGetMutableSecretVersionsForRequestHeaders().ensureBuilderMap(); + return map.containsKey(key) + ? secretVersionsForRequestHeadersConverter.build(map.get(key)) + : defaultValue; } /** * * *
-       * The HTTP request headers to send together with webhook requests.
+       * Optional. The HTTP request headers to send together with webhook
+       * requests. Header values are stored in SecretManager secret versions.
+       *
+       * When the same header name is specified in both `request_headers` and
+       * `secret_versions_for_request_headers`, the value in
+       * `secret_versions_for_request_headers` will be used.
        * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public java.lang.String getRequestHeadersOrThrow(java.lang.String key) { + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + getSecretVersionsForRequestHeadersOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetRequestHeaders().getMap(); + java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder> + map = internalGetMutableSecretVersionsForRequestHeaders().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return secretVersionsForRequestHeadersConverter.build(map.get(key)); } - public Builder clearRequestHeaders() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableRequestHeaders().getMutableMap().clear(); + public Builder clearSecretVersionsForRequestHeaders() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableSecretVersionsForRequestHeaders().clear(); return this; } @@ -4689,44 +7502,64 @@ public Builder clearRequestHeaders() { * * *
-       * The HTTP request headers to send together with webhook requests.
+       * Optional. The HTTP request headers to send together with webhook
+       * requests. Header values are stored in SecretManager secret versions.
+       *
+       * When the same header name is specified in both `request_headers` and
+       * `secret_versions_for_request_headers`, the value in
+       * `secret_versions_for_request_headers` will be used.
        * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder removeRequestHeaders(java.lang.String key) { + public Builder removeSecretVersionsForRequestHeaders(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableRequestHeaders().getMutableMap().remove(key); + internalGetMutableSecretVersionsForRequestHeaders().ensureBuilderMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated - public java.util.Map getMutableRequestHeaders() { - bitField0_ |= 0x00000008; - return internalGetMutableRequestHeaders().getMutableMap(); + public java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> + getMutableSecretVersionsForRequestHeaders() { + bitField0_ |= 0x00000020; + return internalGetMutableSecretVersionsForRequestHeaders().ensureMessageMap(); } /** * * *
-       * The HTTP request headers to send together with webhook requests.
+       * Optional. The HTTP request headers to send together with webhook
+       * requests. Header values are stored in SecretManager secret versions.
+       *
+       * When the same header name is specified in both `request_headers` and
+       * `secret_versions_for_request_headers`, the value in
+       * `secret_versions_for_request_headers` will be used.
        * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder putRequestHeaders(java.lang.String key, java.lang.String value) { + public Builder putSecretVersionsForRequestHeaders( + java.lang.String key, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableRequestHeaders().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; + internalGetMutableSecretVersionsForRequestHeaders().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000020; return this; } @@ -4734,18 +7567,86 @@ public Builder putRequestHeaders(java.lang.String key, java.lang.String value) { * * *
-       * The HTTP request headers to send together with webhook requests.
+       * Optional. The HTTP request headers to send together with webhook
+       * requests. Header values are stored in SecretManager secret versions.
+       *
+       * When the same header name is specified in both `request_headers` and
+       * `secret_versions_for_request_headers`, the value in
+       * `secret_versions_for_request_headers` will be used.
        * 
* - * map<string, string> request_headers = 4; + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder putAllRequestHeaders( - java.util.Map values) { - internalGetMutableRequestHeaders().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; + public Builder putAllSecretVersionsForRequestHeaders( + java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue> + values) { + for (java.util.Map.Entry< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableSecretVersionsForRequestHeaders().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000020; return this; } + /** + * + * + *
+       * Optional. The HTTP request headers to send together with webhook
+       * requests. Header values are stored in SecretManager secret versions.
+       *
+       * When the same header name is specified in both `request_headers` and
+       * `secret_versions_for_request_headers`, the value in
+       * `secret_versions_for_request_headers` will be used.
+       * 
+ * + * + * map<string, .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue> secret_versions_for_request_headers = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + .Builder + putSecretVersionsForRequestHeadersBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder> + builderMap = internalGetMutableSecretVersionsForRequestHeaders().ensureBuilderMap(); + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValueOrBuilder + entry = builderMap.get(key); + if (entry == null) { + entry = + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + .newBuilder(); + builderMap.put(key, entry); + } + if (entry + instanceof + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue) { + entry = + ((com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .SecretVersionHeaderValue) + entry) + .toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + .Builder) + entry; + } + private com.google.protobuf.Internal.ProtobufList allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class); @@ -4753,7 +7654,7 @@ private void ensureAllowedCaCertsIsMutable() { if (!allowedCaCerts_.isModifiable()) { allowedCaCerts_ = makeMutableCopy(allowedCaCerts_); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; } /** @@ -4866,7 +7767,7 @@ public Builder setAllowedCaCerts(int index, com.google.protobuf.ByteString value } ensureAllowedCaCertsIsMutable(); allowedCaCerts_.set(index, value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4900,7 +7801,7 @@ public Builder addAllowedCaCerts(com.google.protobuf.ByteString value) { } ensureAllowedCaCertsIsMutable(); allowedCaCerts_.add(value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4932,7 +7833,7 @@ public Builder addAllAllowedCaCerts( java.lang.Iterable values) { ensureAllowedCaCertsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedCaCerts_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4961,7 +7862,7 @@ public Builder addAllAllowedCaCerts( */ public Builder clearAllowedCaCerts() { allowedCaCerts_ = emptyList(com.google.protobuf.ByteString.class); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -4989,7 +7890,7 @@ public Builder clearAllowedCaCerts() { * @return Whether the oauthConfig field is set. */ public boolean hasOauthConfig() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** @@ -5042,7 +7943,7 @@ public Builder setOauthConfig( } else { oauthConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -5068,7 +7969,7 @@ public Builder setOauthConfig( } else { oauthConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -5089,7 +7990,7 @@ public Builder setOauthConfig( public Builder mergeOauthConfig( com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig value) { if (oauthConfigBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000080) != 0) && oauthConfig_ != null && oauthConfig_ != com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig @@ -5102,7 +8003,7 @@ public Builder mergeOauthConfig( oauthConfigBuilder_.mergeFrom(value); } if (oauthConfig_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); } return this; @@ -5122,7 +8023,7 @@ public Builder mergeOauthConfig( *
*/ public Builder clearOauthConfig() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); oauthConfig_ = null; if (oauthConfigBuilder_ != null) { oauthConfigBuilder_.dispose(); @@ -5147,7 +8048,7 @@ public Builder clearOauthConfig() { */ public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.Builder getOauthConfigBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); return getOauthConfigFieldBuilder().getBuilder(); } @@ -5249,7 +8150,7 @@ public int getServiceAgentAuthValue() { */ public Builder setServiceAgentAuthValue(int value) { serviceAgentAuth_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -5304,7 +8205,7 @@ public Builder setServiceAgentAuth( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; serviceAgentAuth_ = value.getNumber(); onChanged(); return this; @@ -5327,12 +8228,248 @@ public Builder setServiceAgentAuth( * @return This builder for chaining. */ public Builder clearServiceAgentAuth() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000100); serviceAgentAuth_ = 0; onChanged(); return this; } + private com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + serviceAccountAuthConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfigOrBuilder> + serviceAccountAuthConfigBuilder_; + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceAccountAuthConfig field is set. + */ + public boolean hasServiceAccountAuthConfig() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAccountAuthConfig. + */ + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + getServiceAccountAuthConfig() { + if (serviceAccountAuthConfigBuilder_ == null) { + return serviceAccountAuthConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .getDefaultInstance() + : serviceAccountAuthConfig_; + } else { + return serviceAccountAuthConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceAccountAuthConfig( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + value) { + if (serviceAccountAuthConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountAuthConfig_ = value; + } else { + serviceAccountAuthConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceAccountAuthConfig( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .Builder + builderForValue) { + if (serviceAccountAuthConfigBuilder_ == null) { + serviceAccountAuthConfig_ = builderForValue.build(); + } else { + serviceAccountAuthConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeServiceAccountAuthConfig( + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + value) { + if (serviceAccountAuthConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && serviceAccountAuthConfig_ != null + && serviceAccountAuthConfig_ + != com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig.getDefaultInstance()) { + getServiceAccountAuthConfigBuilder().mergeFrom(value); + } else { + serviceAccountAuthConfig_ = value; + } + } else { + serviceAccountAuthConfigBuilder_.mergeFrom(value); + } + if (serviceAccountAuthConfig_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearServiceAccountAuthConfig() { + bitField0_ = (bitField0_ & ~0x00000200); + serviceAccountAuthConfig_ = null; + if (serviceAccountAuthConfigBuilder_ != null) { + serviceAccountAuthConfigBuilder_.dispose(); + serviceAccountAuthConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .Builder + getServiceAccountAuthConfigBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getServiceAccountAuthConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfigOrBuilder + getServiceAccountAuthConfigOrBuilder() { + if (serviceAccountAuthConfigBuilder_ != null) { + return serviceAccountAuthConfigBuilder_.getMessageOrBuilder(); + } else { + return serviceAccountAuthConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .getDefaultInstance() + : serviceAccountAuthConfig_; + } + } + + /** + * + * + *
+       * Optional. Configuration for service account authentication.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig service_account_auth_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfigOrBuilder> + getServiceAccountAuthConfigFieldBuilder() { + if (serviceAccountAuthConfigBuilder_ == null) { + serviceAccountAuthConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + .ServiceAccountAuthConfigOrBuilder>( + getServiceAccountAuthConfig(), getParentForChildren(), isClean()); + serviceAccountAuthConfig_ = null; + } + return serviceAccountAuthConfigBuilder_; + } + private int webhookType_ = 0; /** @@ -5369,7 +8506,7 @@ public int getWebhookTypeValue() { */ public Builder setWebhookTypeValue(int value) { webhookType_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5417,7 +8554,7 @@ public Builder setWebhookType( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000400; webhookType_ = value.getNumber(); onChanged(); return this; @@ -5437,7 +8574,7 @@ public Builder setWebhookType( * @return This builder for chaining. */ public Builder clearWebhookType() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000400); webhookType_ = 0; onChanged(); return this; @@ -5481,7 +8618,7 @@ public int getHttpMethodValue() { */ public Builder setHttpMethodValue(int value) { httpMethod_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -5531,7 +8668,7 @@ public Builder setHttpMethod( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000800; httpMethod_ = value.getNumber(); onChanged(); return this; @@ -5552,7 +8689,7 @@ public Builder setHttpMethod( * @return This builder for chaining. */ public Builder clearHttpMethod() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000800); httpMethod_ = 0; onChanged(); return this; @@ -5626,7 +8763,7 @@ public Builder setRequestBody(java.lang.String value) { throw new NullPointerException(); } requestBody_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -5645,7 +8782,7 @@ public Builder setRequestBody(java.lang.String value) { */ public Builder clearRequestBody() { requestBody_ = getDefaultInstance().getRequestBody(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -5669,7 +8806,7 @@ public Builder setRequestBodyBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); requestBody_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -5695,7 +8832,7 @@ public Builder setRequestBodyBytes(com.google.protobuf.ByteString value) { if (!parameterMapping_.isMutable()) { parameterMapping_ = parameterMapping_.copy(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; onChanged(); return parameterMapping_; } @@ -5807,7 +8944,7 @@ public java.lang.String getParameterMappingOrThrow(java.lang.String key) { } public Builder clearParameterMapping() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00002000); internalGetMutableParameterMapping().getMutableMap().clear(); return this; } @@ -5837,7 +8974,7 @@ public Builder removeParameterMapping(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableParameterMapping() { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; return internalGetMutableParameterMapping().getMutableMap(); } @@ -5863,7 +9000,7 @@ public Builder putParameterMapping(java.lang.String key, java.lang.String value) throw new NullPointerException("map value"); } internalGetMutableParameterMapping().getMutableMap().put(key, value); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; return this; } @@ -5884,7 +9021,7 @@ public Builder putParameterMapping(java.lang.String key, java.lang.String value) public Builder putAllParameterMapping( java.util.Map values) { internalGetMutableParameterMapping().getMutableMap().putAll(values); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00002000; return this; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java index 5377221cdfd7..003e558fb16a 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java @@ -36,14 +36,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_RequestHeadersEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_RequestHeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionsForRequestHeadersEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionsForRequestHeadersEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ParameterMappingEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -149,7 +161,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "roto\032\031google/api/resource.proto\0324google/" + "cloud/dialogflow/cx/v3/response_message." + "proto\032\036google/protobuf/duration.proto\032\033google/protobuf/empty.proto\032" - + " google/protobuf/field_mask.proto\032\034google/protobuf/struct.proto\"\316\016\n" + + " google/protobuf/field_mask.proto\032\034google/protobuf/struct.proto\"\334\024\n" + "\007Webhook\022\014\n" + "\004name\030\001 \001(\t\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022W\n" @@ -158,33 +170,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021service_directory\030\007 \001(\0132=.google.cloud.dialo" + "gflow.cx.v3.Webhook.ServiceDirectoryConfigH\000\022*\n" + "\007timeout\030\006 \001(\0132\031.google.protobuf.Duration\022\020\n" - + "\010disabled\030\005 \001(\010\032\364\t\n" + + "\010disabled\030\005 \001(\010\032\202\020\n" + "\021GenericWebService\022\020\n" + "\003uri\030\001 \001(\tB\003\340A\002\022\024\n" + "\010username\030\002 \001(\tB\002\030\001\022\024\n" - + "\010password\030\003 \001(\tB\002\030\001\022e\n" - + "\017request_headers\030\004 \003(\0132L.google.cloud.dialogflo" - + "w.cx.v3.Webhook.GenericWebService.RequestHeadersEntry\022\035\n" + + "\010password\030\003 \001(\tB\002\030\001\022`\n" + + "$secret_version_for_username_password\030\023 \001(\tB2\340A\001\372A,\n" + + "*secretmanager.googleapis.com/SecretVersion\022e\n" + + "\017request_headers\030\004 \003(\0132L.goog" + + "le.cloud.dialogflow.cx.v3.Webhook.GenericWebService.RequestHeadersEntry\022\217\001\n" + + "#secret_versions_for_request_headers\030\024 \003(\0132]." + + "google.cloud.dialogflow.cx.v3.Webhook.Ge" + + "nericWebService.SecretVersionsForRequestHeadersEntryB\003\340A\001\022\035\n" + "\020allowed_ca_certs\030\005 \003(\014B\003\340A\001\022_\n" - + "\014oauth_config\030\013 \001(\0132D.google.clou" - + "d.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfigB\003\340A\001\022j\n" - + "\022service_agent_auth\030\014 \001(\0162I.google.cloud.dialogflow.cx.v" - + "3.Webhook.GenericWebService.ServiceAgentAuthB\003\340A\001\022_\n" - + "\014webhook_type\030\006 \001(\0162D.google" - + ".cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookTypeB\003\340A\001\022]\n" - + "\013http_method\030\007 \001(\0162C.google.cloud.dialogflow.cx.v3." - + "Webhook.GenericWebService.HttpMethodB\003\340A\001\022\031\n" + + "\014oauth_config\030\013 \001(\0132D.google." + + "cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfigB\003\340A\001\022j\n" + + "\022service_agent_auth\030\014 \001(\0162I.google.cloud.dialogflow." + + "cx.v3.Webhook.GenericWebService.ServiceAgentAuthB\003\340A\001\022{\n" + + "\033service_account_auth_config\030\022 \001(\0132Q.google.cloud.dialogflow.cx." + + "v3.Webhook.GenericWebService.ServiceAccountAuthConfigB\003\340A\001\022_\n" + + "\014webhook_type\030\006 \001(\016" + + "2D.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookTypeB\003\340A\001\022]\n" + + "\013http_method\030\007 \001(\0162C.google.cloud.dialogfl" + + "ow.cx.v3.Webhook.GenericWebService.HttpMethodB\003\340A\001\022\031\n" + "\014request_body\030\010 \001(\tB\003\340A\001\022n\n" - + "\021parameter_mapping\030\t \003(\0132N.google.cloud.dialogflo" - + "w.cx.v3.Webhook.GenericWebService.ParameterMappingEntryB\003\340A\001\032s\n" + + "\021parameter_mapping\030\t \003(\0132N.google.cloud." + + "dialogflow.cx.v3.Webhook.GenericWebService.ParameterMappingEntryB\003\340A\001\032f\n" + + "\030SecretVersionHeaderValue\022J\n" + + "\016secret_version\030\001 \001(\tB2\340A\002\372A,\n" + + "*secretmanager.googleapis.com/SecretVersion\032\321\001\n" + "\013OAuthConfig\022\026\n" + "\tclient_id\030\001 \001(\tB\003\340A\002\022\032\n\r" - + "client_secret\030\002 \001(\tB\003\340A\001\022\033\n" + + "client_secret\030\002 \001(\tB\003\340A\001\022\\\n" + + " secret_version_for_client_secret\030\005 \001(\tB2\340A\001\372A,\n" + + "*secretmanager.googleapis.com/SecretVersion\022\033\n" + "\016token_endpoint\030\003 \001(\tB\003\340A\002\022\023\n" - + "\006scopes\030\004 \003(\tB\003\340A\001\0325\n" + + "\006scopes\030\004 \003(\tB\003\340A\001\0328\n" + + "\030ServiceAccountAuthConfig\022\034\n" + + "\017service_account\030\001 \001(\tB\003\340A\002\0325\n" + "\023RequestHeadersEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\0327\n" + + "\005value\030\002 \001(\t:\0028\001\032\231\001\n" + + "$SecretVersionsForRequestHeadersEntry\022\013\n" + + "\003key\030\001 \001(\t\022`\n" + + "\005value\030\002 \001(\0132Q.google.cloud.dialogflow.cx.v3." + + "Webhook.GenericWebService.SecretVersionHeaderValue:\0028\001\0327\n" + "\025ParameterMappingEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"`\n" @@ -209,10 +239,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\026ServiceDirectoryConfig\022@\n" + "\007service\030\001 \001(\tB/\340A\002\372A)\n" + "\'servicedirectory.googleapis.com/Service\022U\n" - + "\023generic_web_service\030\002 \001(\01328.google.cloud.dialo" - + "gflow.cx.v3.Webhook.GenericWebService:q\352An\n" - + "!dialogflow.googleapis.com/Webhook\022Ip" - + "rojects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}B\t\n" + + "\023generic_web_service\030\002 \001(" + + "\01328.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService:q\352An\n" + + "!dialogflow.googleapis.com/Webhook\022Iprojects/{project}/" + + "locations/{location}/agents/{agent}/webhooks/{webhook}B\t\n" + "\007webhook\"w\n" + "\023ListWebhooksRequest\0229\n" + "\006parent\030\001 \001(" @@ -228,11 +258,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024CreateWebhookRequest\0229\n" + "\006parent\030\001 \001(" + "\tB)\340A\002\372A#\022!dialogflow.googleapis.com/Webhook\022<\n" - + "\007webhook\030\002" - + " \001(\0132&.google.cloud.dialogflow.cx.v3.WebhookB\003\340A\002\"\205\001\n" + + "\007webhook\030\002 \001(\0132&.googl" + + "e.cloud.dialogflow.cx.v3.WebhookB\003\340A\002\"\205\001\n" + "\024UpdateWebhookRequest\022<\n" - + "\007webhook\030\001" - + " \001(\0132&.google.cloud.dialogflow.cx.v3.WebhookB\003\340A\002\022/\n" + + "\007webhook\030\001 \001(\0132" + + "&.google.cloud.dialogflow.cx.v3.WebhookB\003\340A\002\022/\n" + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"^\n" + "\024DeleteWebhookRequest\0227\n" + "\004name\030\001 \001(\tB)\340A\002\372A#\n" @@ -248,16 +278,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "trigger_event\030\016 \001(\tH\000\022\025\n" + "\013dtmf_digits\030\021 \001(\tH\000\022\025\n\r" + "language_code\030\017 \001(\t\022W\n" - + "\020fulfillment_info\030\006 \001(\0132=.google.cloud.dia" - + "logflow.cx.v3.WebhookRequest.FulfillmentInfo\022M\n" - + "\013intent_info\030\003 \001(\01328.google.cloud" - + ".dialogflow.cx.v3.WebhookRequest.IntentInfo\022:\n" + + "\020fulfillment_info\030\006 " + + "\001(\0132=.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo\022M\n" + + "\013intent_info\030\003" + + " \001(\01328.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo\022:\n" + "\tpage_info\030\004 \001(\0132\'.google.cloud.dialogflow.cx.v3.PageInfo\022@\n" + "\014session_info\030\005 \001(\0132*.google.cloud.dialogflow.cx.v3.SessionInfo\022@\n" + "\010messages\030\007 \003(\0132..google.cloud.dialogflow.cx.v3.ResponseMessage\022(\n" + "\007payload\030\010 \001(\0132\027.google.protobuf.Struct\022h\n" - + "\031sentiment_analysis_result\030\t \001(\0132E.googl" - + "e.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult\022B\n\r" + + "\031sentiment_analysis_result\030\t \001(\0132E.google.cloud.dialogflow" + + ".cx.v3.WebhookRequest.SentimentAnalysisResult\022B\n\r" + "language_info\030\022 \001(\0132+.google.cloud.dialogflow.cx.v3.LanguageInfo\032\036\n" + "\017FulfillmentInfo\022\013\n" + "\003tag\030\001 \001(\t\032\273\003\n\n" @@ -265,23 +295,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023last_matched_intent\030\001 \001(\tB%\372A\"\n" + " dialogflow.googleapis.com/Intent\022\024\n" + "\014display_name\030\003 \001(\t\022\\\n\n" - + "parameters\030\002 \003(\0132H.google.cloud.dialogflow.cx.v3" - + ".WebhookRequest.IntentInfo.ParametersEntry\022\022\n\n" + + "parameters\030\002 \003(\0132H.google." + + "cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.ParametersEntry\022\022\n\n" + "confidence\030\004 \001(\002\032^\n" + "\024IntentParameterValue\022\026\n" + "\016original_value\030\001 \001(\t\022.\n" + "\016resolved_value\030\002 \001(\0132\026.google.protobuf.Value\032\200\001\n" + "\017ParametersEntry\022\013\n" + "\003key\030\001 \001(\t\022\\\n" - + "\005value\030\002 \001(\0132M.google.cloud.dialogflow.cx.v3.W" - + "ebhookRequest.IntentInfo.IntentParameterValue:\0028\001\032;\n" + + "\005value\030\002 \001(\0132M.google.cl" + + "oud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue:\0028\001\032;\n" + "\027SentimentAnalysisResult\022\r\n" + "\005score\030\001 \001(\002\022\021\n" + "\tmagnitude\030\002 \001(\002B\007\n" + "\005query\"\257\005\n" + "\017WebhookResponse\022`\n" - + "\024fulfillment_response\030\001" - + " \001(\0132B.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse\022:\n" + + "\024fulfillment_response\030\001 \001(\0132B.google" + + ".cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse\022:\n" + "\tpage_info\030\002 \001(\0132\'.google.cloud.dialogflow.cx.v3.PageInfo\022@\n" + "\014session_info\030\003 \001(\0132*.google.cloud.dialogflow.cx.v3.SessionInfo\022(\n" + "\007payload\030\004 \001(\0132\027.google.protobuf.Struct\022:\n" @@ -291,8 +321,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036dialogflow.googleapis.com/FlowH\000\032\213\002\n" + "\023FulfillmentResponse\022@\n" + "\010messages\030\001 \003(\0132..google.cloud.dialogflow.cx.v3.ResponseMessage\022h\n" - + "\016merge_behavior\030\002 \001(\0162P.google.cloud.dialogflow.cx.v3.WebhookR" - + "esponse.FulfillmentResponse.MergeBehavior\"H\n\r" + + "\016merge_behavior\030\002 \001(\0162P.google.cloud.dia" + + "logflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior\"H\n\r" + "MergeBehavior\022\036\n" + "\032MERGE_BEHAVIOR_UNSPECIFIED\020\000\022\n\n" + "\006APPEND\020\001\022\013\n" @@ -302,16 +332,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014current_page\030\001 \001(\tB#\372A \n" + "\036dialogflow.googleapis.com/Page\022\024\n" + "\014display_name\030\004 \001(\t\022C\n" - + "\tform_info\030\003 \001" - + "(\01320.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo\032\220\003\n" + + "\tform_info\030\003" + + " \001(\01320.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo\032\220\003\n" + "\010FormInfo\022V\n" - + "\016parameter_info\030\002" - + " \003(\0132>.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo\032\253\002\n\r" + + "\016parameter_info\030\002 \003(\0132>.google" + + ".cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo\032\253\002\n\r" + "ParameterInfo\022\024\n" + "\014display_name\030\001 \001(\t\022\020\n" + "\010required\030\002 \001(\010\022\\\n" - + "\005state\030\003 \001(\0162M.google.clou" - + "d.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState\022%\n" + + "\005state\030\003 \001(\0162M.google.cloud.dialogflow.cx.v3" + + ".PageInfo.FormInfo.ParameterInfo.ParameterState\022%\n" + "\005value\030\004 \001(\0132\026.google.protobuf.Value\022\026\n" + "\016just_collected\030\005 \001(\010\"U\n" + "\016ParameterState\022\037\n" @@ -322,8 +352,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013SessionInfo\0227\n" + "\007session\030\001 \001(\tB&\372A#\n" + "!dialogflow.googleapis.com/Session\022N\n\n" - + "parameters\030\002 \003(\0132:.google.cl" - + "oud.dialogflow.cx.v3.SessionInfo.ParametersEntry\032I\n" + + "parameters\030\002" + + " \003(\0132:.google.cloud.dialogflow.cx.v3.SessionInfo.ParametersEntry\032I\n" + "\017ParametersEntry\022\013\n" + "\003key\030\001 \001(\t\022%\n" + "\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028\001\"e\n" @@ -332,33 +362,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\026resolved_language_code\030\002 \001(\t\022\030\n" + "\020confidence_score\030\003 \001(\0022\267\010\n" + "\010Webhooks\022\277\001\n" - + "\014ListWebhooks\0222.google.cloud.dialogflow.cx.v3.ListWebhooksRequest\0323.google.cl" - + "oud.dialogflow.cx.v3.ListWebhooksRespons" - + "e\"F\332A\006parent\202\323\344\223\0027\0225/v3/{parent=projects/*/locations/*/agents/*}/webhooks\022\254\001\n\n" - + "GetWebhook\0220.google.cloud.dialogflow.cx.v3" - + ".GetWebhookRequest\032&.google.cloud.dialog" - + "flow.cx.v3.Webhook\"D\332A\004name\202\323\344\223\0027\0225/v3/{" - + "name=projects/*/locations/*/agents/*/webhooks/*}\022\305\001\n\r" - + "CreateWebhook\0223.google.cloud.dialogflow.cx.v3.CreateWebhookRequest\032" - + "&.google.cloud.dialogflow.cx.v3.Webhook\"" - + "W\332A\016parent,webhook\202\323\344\223\002@\"5/v3/{parent=pr" - + "ojects/*/locations/*/agents/*}/webhooks:\007webhook\022\322\001\n\r" - + "UpdateWebhook\0223.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest\032" - + "&.google.cloud.dialogflow.cx.v3.Webhook\"" - + "d\332A\023webhook,update_mask\202\323\344\223\002H2=/v3/{webh" - + "ook.name=projects/*/locations/*/agents/*/webhooks/*}:\007webhook\022\242\001\n\r" - + "DeleteWebhook\0223.google.cloud.dialogflow.cx.v3.DeleteWe" - + "bhookRequest\032\026.google.protobuf.Empty\"D\332A" - + "\004name\202\323\344\223\0027*5/v3/{name=projects/*/locati" - + "ons/*/agents/*/webhooks/*}\032x\312A\031dialogflo" - + "w.googleapis.com\322AYhttps://www.googleapi" - + "s.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\256\002\n" - + "!com.google.cloud.dialogflow.cx.v3B\014WebhookProto" - + "P\001Z1cloud.google.com/go/dialogflow/cx/ap" - + "iv3/cxpb;cxpb\242\002\002DF\252\002\035Google.Cloud.Dialog" - + "flow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3\352A|\n" - + "\'servicedirectory.googleapis.com/Service\022Qprojects/{project}/locations" - + "/{location}/namespaces/{namespace}/services/{service}b\006proto3" + + "\014ListWebhooks\0222.google.cloud.dialogflow.cx.v3.ListWebho" + + "oksRequest\0323.google.cloud.dialogflow.cx." + + "v3.ListWebhooksResponse\"F\332A\006parent\202\323\344\223\0027" + + "\0225/v3/{parent=projects/*/locations/*/agents/*}/webhooks\022\254\001\n\n" + + "GetWebhook\0220.google.cloud.dialogflow.cx.v3.GetWebhookRequest" + + "\032&.google.cloud.dialogflow.cx.v3.Webhook" + + "\"D\332A\004name\202\323\344\223\0027\0225/v3/{name=projects/*/locations/*/agents/*/webhooks/*}\022\305\001\n\r" + + "CreateWebhook\0223.google.cloud.dialogflow.cx.v3" + + ".CreateWebhookRequest\032&.google.cloud.dia" + + "logflow.cx.v3.Webhook\"W\332A\016parent,webhook" + + "\202\323\344\223\002@\"5/v3/{parent=projects/*/locations/*/agents/*}/webhooks:\007webhook\022\322\001\n\r" + + "UpdateWebhook\0223.google.cloud.dialogflow.cx.v3" + + ".UpdateWebhookRequest\032&.google.cloud.dia" + + "logflow.cx.v3.Webhook\"d\332A\023webhook,update" + + "_mask\202\323\344\223\002H2=/v3/{webhook.name=projects/" + + "*/locations/*/agents/*/webhooks/*}:\007webhook\022\242\001\n\r" + + "DeleteWebhook\0223.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest\032\026.goo" + + "gle.protobuf.Empty\"D\332A\004name\202\323\344\223\0027*5/v3/{" + + "name=projects/*/locations/*/agents/*/web" + + "hooks/*}\032x\312A\031dialogflow.googleapis.com\322A" + + "Yhttps://www.googleapis.com/auth/cloud-p" + + "latform,https://www.googleapis.com/auth/dialogflowB\256\002\n" + + "!com.google.cloud.dialogflow.cx.v3B\014WebhookProtoP\001Z1cloud.google.c" + + "om/go/dialogflow/cx/apiv3/cxpb;cxpb\242\002\002DF" + + "\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V3\352A|\n" + + "\'servicedirectory.googleapis.com/Service\022Qprojec" + + "ts/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -397,39 +427,72 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Uri", "Username", "Password", + "SecretVersionForUsernamePassword", "RequestHeaders", + "SecretVersionsForRequestHeaders", "AllowedCaCerts", "OauthConfig", "ServiceAgentAuth", + "ServiceAccountAuthConfig", "WebhookType", "HttpMethod", "RequestBody", "ParameterMapping", }); - internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_descriptor = internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_descriptor .getNestedTypes() .get(0); + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionHeaderValue_descriptor, + new java.lang.String[] { + "SecretVersion", + }); + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_descriptor + .getNestedTypes() + .get(1); internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_OAuthConfig_descriptor, new java.lang.String[] { - "ClientId", "ClientSecret", "TokenEndpoint", "Scopes", + "ClientId", "ClientSecret", "SecretVersionForClientSecret", "TokenEndpoint", "Scopes", + }); + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ServiceAccountAuthConfig_descriptor, + new java.lang.String[] { + "ServiceAccount", }); internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_RequestHeadersEntry_descriptor = internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_descriptor .getNestedTypes() - .get(1); + .get(3); internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_RequestHeadersEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_RequestHeadersEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionsForRequestHeadersEntry_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionsForRequestHeadersEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_SecretVersionsForRequestHeadersEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ParameterMappingEntry_descriptor = internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_descriptor .getNestedTypes() - .get(2); + .get(5); internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ParameterMappingEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_Webhook_GenericWebService_ParameterMappingEntry_descriptor, diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/advanced_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/advanced_settings.proto index 91ce1aacbf39..0d8e5dff8cc5 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/advanced_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/advanced_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto index 686de252afab..0dc2abe49609 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -345,14 +345,31 @@ message Agent { // Speech recognition related settings. SpeechToTextSettings speech_to_text_settings = 13; - // Immutable. Name of the start flow in this agent. A start flow will be - // automatically created when the agent is created, and can only be deleted by - // deleting the agent. Format: - // `projects//locations//agents//flows/`. - string start_flow = 16 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } - ]; + // The resource to start the conversations with for the agent. + oneof session_entry_resource { + // Name of the start flow in this agent. A start flow will be automatically + // created when the agent is created, and can only be deleted by deleting + // the agent. + // Format: + // `projects//locations//agents//flows/`. + // Currently only the default start flow with id + // "00000000-0000-0000-0000-000000000000" is allowed. + string start_flow = 16 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; + + // Name of the start playbook in this agent. A start playbook will be + // automatically created when the agent is created, and can only be deleted + // by deleting the agent. + // Format: + // `projects//locations//agents//playbooks/`. + // Currently only the + // default playbook with id + // "00000000-0000-0000-0000-000000000000" is allowed. + string start_playbook = 39 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + }]; + } // Name of the // [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index 6b7add8f93b4..c29a088c3040 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ enum AudioEncoding { AUDIO_ENCODING_UNSPECIFIED = 0; // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // LINT: LEGACY_NAMES AUDIO_ENCODING_LINEAR_16 = 1; // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio @@ -310,12 +311,14 @@ enum OutputAudioEncoding { // Uncompressed 16-bit signed little-endian samples (Linear PCM). // Audio content returned as LINEAR16 also contains a WAV header. + // LINT: LEGACY_NAMES OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; // MP3 audio at 32kbps. OUTPUT_AUDIO_ENCODING_MP3 = 2; // MP3 audio at 64kbps. + // LINT: LEGACY_NAMES OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; // Opus encoded audio wrapped in an ogg container. The result will be a diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/changelog.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/changelog.proto index c4bd12eaed53..f5c186b9f689 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/changelog.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/changelog.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/code_block.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/code_block.proto new file mode 100644 index 000000000000..e6eeb36a96a1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/code_block.proto @@ -0,0 +1,32 @@ +// Copyright 2026 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.v3; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "CodeBlockProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Represents a code block. +message CodeBlock { + // Optional. Source code of the block in Python. + string code = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/data_store_connection.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/data_store_connection.proto index 3abe98aee159..727fdc6b6820 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/data_store_connection.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/data_store_connection.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; import "google/api/field_behavior.proto"; +import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; @@ -89,6 +90,9 @@ message DataStoreConnectionSignals { // Text included in the prompt. string text = 3; + + // Metadata associated with the document. + google.protobuf.Struct metadata = 5; } // Diagnostic info related to the answer generation model call. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/deployment.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/deployment.proto index 0e93779603b3..5893d5782fcd 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/deployment.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/deployment.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto index 33f7b0035590..676737b95203 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto index ec167872b04c..61e45323653f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -200,11 +200,13 @@ message Environment { // Configuration for the version. message VersionConfig { - // Required. Both flow and playbook versions are supported. + // Required. Flow, playbook and tool versions are supported. // Format for flow version: // projects//locations//agents//flows//versions/. // Format for playbook version: // projects//locations//agents//playbooks//versions/. + // Format for tool version: + // projects//locations//agents//tools//versions/. string version = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/example.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/example.proto new file mode 100644 index 000000000000..9c8467a586ee --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/example.proto @@ -0,0 +1,237 @@ +// Copyright 2026 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.v3; + +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/v3/trace.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ExampleProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example]. +service Examples { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates an example in the specified playbook. + rpc CreateExample(CreateExampleRequest) returns (Example) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples" + body: "example" + }; + option (google.api.method_signature) = "parent,example"; + } + + // Deletes the specified example. + rpc DeleteExample(DeleteExampleRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of examples in the specified playbook. + rpc ListExamples(ListExamplesRequest) returns (ListExamplesResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified example. + rpc GetExample(GetExampleRequest) returns (Example) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Update the specified example. + rpc UpdateExample(UpdateExampleRequest) returns (Example) { + option (google.api.http) = { + patch: "/v3/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + body: "example" + }; + option (google.api.method_signature) = "example,update_mask"; + } +} + +// The request message for +// [Examples.CreateExample][google.cloud.dialogflow.cx.v3.Examples.CreateExample]. +message CreateExampleRequest { + // Required. The playbook to create an example for. + // Format: + // `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Example" + } + ]; + + // Required. The example to create. + Example example = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Examples.DeleteExample][google.cloud.dialogflow.cx.v3.Examples.DeleteExample]. +message DeleteExampleRequest { + // Required. The name of the example to delete. + // Format: + // `projects//locations//agents//playbooks//examples/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Example" + } + ]; +} + +// The request message for +// [Examples.ListExamples][google.cloud.dialogflow.cx.v3.Examples.ListExamples]. +message ListExamplesRequest { + // Required. The playbook to list the examples from. + // Format: + // `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Example" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The [next_page_token][ListExampleResponse.next_page_token] value + // returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The language to list examples for. + // If not specified, list all examples under the playbook. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Examples.ListExamples][google.cloud.dialogflow.cx.v3.Examples.ListExamples]. +message ListExamplesResponse { + // The list of examples. There will be a maximum number of items returned + // based on the + // [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size] + // field in the request. + repeated Example examples = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Examples.GetExample][google.cloud.dialogflow.cx.v3.Examples.GetExample]. +message GetExampleRequest { + // Required. The name of the example. + // Format: + // `projects//locations//agents//playbooks//examples/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Example" + } + ]; +} + +// The request message for +// [Examples.UpdateExample][google.cloud.dialogflow.cx.v3.Examples.UpdateExample]. +message UpdateExampleRequest { + // Required. The example to update. + Example example = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Example represents a sample execution of the playbook in the conversation. +// +// An example consists of a list of ordered actions performed by end user +// or Dialogflow agent according the playbook instructions to fulfill the task. +message Example { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Example" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}" + plural: "examples" + singular: "example" + }; + + // The unique identifier of the playbook example. + // Format: + // `projects//locations//agents//playbooks//examples/`. + string name = 1; + + // Optional. The input to the playbook in the example. + PlaybookInput playbook_input = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The output of the playbook in the example. + PlaybookOutput playbook_output = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The ordered list of actions performed by the end user and the + // Dialogflow agent. + repeated Action actions = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The display name of the example. + string display_name = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The high level concise description of the example. The max number + // of characters is 200. + string description = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Estimated number of tokes current example takes when sent to + // the LLM. + int64 token_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of initial example creation. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the example was updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Example's output state. + OutputState conversation_state = 12 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language code of the example. + // If not specified, the agent's default language is used. + // Note: languages must be enabled in the agent before they can be used. + // Note: example's language code is not currently used in dialogflow agents. + string language_code = 13 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto index 4eed26bc1fca..87b45ad9c98f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto index e65bab6e3919..c49afdc619c3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/import_strategy.proto"; import "google/cloud/dialogflow/cx/v3/page.proto"; +import "google/cloud/dialogflow/cx/v3/parameter_definition.proto"; import "google/cloud/dialogflow/cx/v3/validation_message.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -350,6 +351,14 @@ message Flow { KnowledgeConnectorSettings knowledge_connector_settings = 18 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Defined structured input parameters for this flow. + repeated ParameterDefinition input_parameter_definitions = 26 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defined structured output parameters for this flow. + repeated ParameterDefinition output_parameter_definitions = 27 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Multi-lingual agent settings for this flow. MultiLanguageSettings multi_language_settings = 28 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto index 2635a3ca7039..6b29e1bca452 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/gcs.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/gcs.proto index 98e903e00568..096e8c888c21 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/gcs.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/gcs.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto index 923cfc3d3c3f..fa0d740193b4 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -103,4 +103,16 @@ message GenerativeSettings { // Language for this settings. string language_code = 4; + + // LLM model settings. + LlmModelSettings llm_model_settings = 8; +} + +// Settings for LLM models. +message LlmModelSettings { + // The selected LLM model. + string model = 1; + + // The custom prompt to use. + string prompt_text = 2; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generator.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generator.proto index 105cc37b59b7..d491055b73e6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generator.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generator.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -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/v3/generative_settings.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -148,6 +149,9 @@ message Generator { repeated Placeholder placeholders = 5 [(google.api.field_behavior) = OPTIONAL]; + // The LLM model settings. + LlmModelSettings llm_model_settings = 9; + // Parameters passed to the LLM to configure its behavior. ModelParameter model_parameter = 8; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/import_strategy.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/import_strategy.proto index 8828b9e682d4..a16daf0abc0b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/import_strategy.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/import_strategy.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/inline.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/inline.proto index fd1073b9260d..e641aeda0e6f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/inline.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/inline.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto index 5050672ab659..3fa8505106cb 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto index 33e2715b52a7..f97178266454 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -349,6 +349,13 @@ message EventHandler { string target_flow = 3 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }]; + + // The target playbook to transition to. + // Format: + // `projects//locations//agents//playbooks/`. + string target_playbook = 7 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + }]; } } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/parameter_definition.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/parameter_definition.proto new file mode 100644 index 000000000000..03839000be14 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/parameter_definition.proto @@ -0,0 +1,119 @@ +// Copyright 2026 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.v3; + +import "google/api/field_behavior.proto"; + +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ParameterDefinitionProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; + +// Defines the properties of a parameter. +// Used to define parameters used in the agent and the +// input / output parameters for each fulfillment. +message ParameterDefinition { + // Parameter types are used for validation. + // These types are consistent with + // [google.protobuf.Value][google.protobuf.Value]. + enum ParameterType { + // Not specified. No validation will be performed. + PARAMETER_TYPE_UNSPECIFIED = 0; + + // Represents any string value. + STRING = 1; + + // Represents any number value. + NUMBER = 2; + + // Represents a boolean value. + BOOLEAN = 3; + + // Represents a null value. + NULL = 4; + + // Represents any object value. + OBJECT = 5; + + // Represents a repeated value. + LIST = 6; + } + + // Required. Name of parameter. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Type of parameter. + ParameterType type = 2 [deprecated = true]; + + // Optional. Type schema of parameter. + TypeSchema type_schema = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Human-readable description of the parameter. Limited to 300 characters. + string description = 3; +} + +// Encapsulates different type schema variations: either a reference to an +// a schema that's already defined by a tool, or an inline definition. +message TypeSchema { + // A reference to the schema of an existing tool. + message SchemaReference { + // The tool that contains this schema definition. + // Format: + // `projects//locations//agents//tools/`. + string tool = 1; + + // The name of the schema. + string schema = 2; + } + + // The encapsulated schema. + oneof schema { + // Set if this is an inline schema definition. + InlineSchema inline_schema = 1; + + // Set if this is a schema reference. + SchemaReference schema_reference = 2; + } +} + +// A type schema object that's specified inline. +message InlineSchema { + // Data type of the schema. + DataType type = 1; + + // Schema of the elements if this is an ARRAY type. + TypeSchema items = 2; +} + +// Defines data types that are supported for inlined schemas. These types are +// consistent with [google.protobuf.Value][google.protobuf.Value]. +enum DataType { + // Not specified. + DATA_TYPE_UNSPECIFIED = 0; + + // Represents any string value. + STRING = 1; + + // Represents any number value. + NUMBER = 2; + + // Represents a boolean value. + BOOLEAN = 3; + + // Represents a repeated value. + ARRAY = 6; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/playbook.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/playbook.proto new file mode 100644 index 000000000000..fe8f373e79be --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/playbook.proto @@ -0,0 +1,706 @@ +// Copyright 2026 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.v3; + +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/v3/code_block.proto"; +import "google/cloud/dialogflow/cx/v3/example.proto"; +import "google/cloud/dialogflow/cx/v3/fulfillment.proto"; +import "google/cloud/dialogflow/cx/v3/generative_settings.proto"; +import "google/cloud/dialogflow/cx/v3/import_strategy.proto"; +import "google/cloud/dialogflow/cx/v3/parameter_definition.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "PlaybookProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook]. +service Playbooks { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates a playbook in a specified agent. + rpc CreatePlaybook(CreatePlaybookRequest) returns (Playbook) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/playbooks" + body: "playbook" + }; + option (google.api.method_signature) = "parent,playbook"; + } + + // Deletes a specified playbook. + rpc DeletePlaybook(DeletePlaybookRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of playbooks in the specified agent. + rpc ListPlaybooks(ListPlaybooksRequest) returns (ListPlaybooksResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/playbooks" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified Playbook. + rpc GetPlaybook(GetPlaybookRequest) returns (Playbook) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Exports the specified playbook to a binary file. + // + // Note that resources (e.g. examples, tools) that the playbook + // references will also be exported. + rpc ExportPlaybook(ExportPlaybookRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportPlaybookResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Imports the specified playbook to the specified agent from a binary file. + rpc ImportPlaybook(ImportPlaybookRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/playbooks:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ImportPlaybookResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Updates the specified Playbook. + rpc UpdatePlaybook(UpdatePlaybookRequest) returns (Playbook) { + option (google.api.http) = { + patch: "/v3/{playbook.name=projects/*/locations/*/agents/*/playbooks/*}" + body: "playbook" + }; + option (google.api.method_signature) = "playbook,update_mask"; + } + + // Creates a version for the specified Playbook. + rpc CreatePlaybookVersion(CreatePlaybookVersionRequest) + returns (PlaybookVersion) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions" + body: "playbook_version" + }; + option (google.api.method_signature) = "parent,playbook_version"; + } + + // Retrieves the specified version of the Playbook. + rpc GetPlaybookVersion(GetPlaybookVersionRequest) returns (PlaybookVersion) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves the specified version of the Playbook and stores it as the + // current playbook draft, returning the playbook with resources updated. + rpc RestorePlaybookVersion(RestorePlaybookVersionRequest) + returns (RestorePlaybookVersionResponse) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists versions for the specified Playbook. + rpc ListPlaybookVersions(ListPlaybookVersionsRequest) + returns (ListPlaybookVersionsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes the specified version of the Playbook. + rpc DeletePlaybookVersion(DeletePlaybookVersionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for +// [Playbooks.CreatePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybook]. +message CreatePlaybookRequest { + // Required. The agent to create a playbook for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Required. The playbook to create. + Playbook playbook = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Playbooks.DeletePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybook]. +message DeletePlaybookRequest { + // Required. The name of the playbook to delete. + // Format: + // `projects//locations//agents//playbooks/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; +} + +// The request message for +// [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks]. +message ListPlaybooksRequest { + // Required. The agent to list playbooks from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for +// [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks]. +message ListPlaybooksResponse { + // The list of playbooks. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated Playbook playbooks = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Playbooks.GetPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybook]. +message GetPlaybookRequest { + // Required. The name of the playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; +} + +// The request message for +// [Playbooks.UpdatePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.UpdatePlaybook]. +message UpdatePlaybookRequest { + // Required. The playbook to update. + Playbook playbook = 1 [(google.api.field_behavior) = REQUIRED]; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Playbook is the basic building block to instruct the LLM how to execute a +// certain task. +// +// A playbook consists of a goal to accomplish, an optional list of step by step +// instructions (the step instruction may refers to name of the custom or +// default plugin tools to use) to perform the task, +// a list of contextual input data to be passed in at the beginning of the +// invoked, and a list of output parameters to store the playbook result. +message Playbook { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Playbook" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}" + }; + + // Message of single step execution. + message Step { + // Instruction on how to execute current step. + oneof instruction { + // Step instruction in text format. + string text = 1; + } + + // Sub-processing needed to execute the current step. + repeated Step steps = 2; + } + + // Message of the Instruction of the playbook. + message Instruction { + // General guidelines for the playbook. These are unstructured instructions + // that are not directly part of the goal, e.g. "Always be polite". It's + // valid for this text to be long and used instead of steps altogether. + string guidelines = 1; + + // Ordered list of step by step execution instructions to accomplish + // target goal. + repeated Step steps = 2; + } + + // Type of the playbook. + enum PlaybookType { + // Unspecified type. Default to TASK. + PLAYBOOK_TYPE_UNSPECIFIED = 0; + + // Task playbook. + TASK = 1; + + // Routine playbook. + ROUTINE = 3; + } + + // The unique identifier of the playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string name = 1; + + // Required. The human-readable name of the playbook, unique within an agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. High level description of the goal the playbook intend to + // accomplish. A goal should be concise since it's visible to other playbooks + // that may reference this playbook. + string goal = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Defined structured input parameters for this playbook. + repeated ParameterDefinition input_parameter_definitions = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defined structured output parameters for this playbook. + repeated ParameterDefinition output_parameter_definitions = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Instruction to accomplish target goal. + Instruction instruction = 17; + + // Output only. Estimated number of tokes current playbook takes when sent to + // the LLM. + int64 token_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of initial playbook creation. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the playbook version was updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of other playbooks referenced by the current + // playbook in the instructions. + repeated string referenced_playbooks = 11 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Output only. The resource name of flows referenced by the current playbook + // in the instructions. + repeated string referenced_flows = 12 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + ]; + + // Optional. The resource name of tools referenced by the current playbook in + // the instructions. If not provided explicitly, they are will + // be implied using the tool being referenced in goal and steps. + repeated string referenced_tools = 13 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Optional. Output only. Names of inline actions scoped to this playbook. + // These actions are in addition to those belonging to referenced tools, child + // playbooks, and flows, e.g. actions that are defined in the playbook's code + // block. + repeated string inline_actions = 22 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The playbook's scoped code block, which may implement handlers + // and actions. + CodeBlock code_block = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Llm model settings for the playbook. + LlmModelSettings llm_model_settings = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of registered handlers to execuate based on the specified + // triggers. + repeated Handler handlers = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the playbook. + PlaybookType playbook_type = 19 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for +// [Playbooks.CreatePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookVersion]. +message CreatePlaybookVersionRequest { + // Required. The playbook to create a version for. + // Format: + // `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; + + // Required. The playbook version to create. + PlaybookVersion playbook_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Playbook version is a snapshot of the playbook at certain timestamp. +message PlaybookVersion { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}" + plural: "playbookVersions" + singular: "playbookVersion" + }; + + // The unique identifier of the playbook version. + // Format: + // `projects//locations//agents//playbooks//versions/`. + string name = 1; + + // Optional. The description of the playbook version. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Snapshot of the playbook when the playbook version is created. + Playbook playbook = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the examples belonging to the playbook when the + // playbook version is created. + repeated Example examples = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the playbook version was created or modified. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for +// [Playbooks.GetPlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookVersion]. +message GetPlaybookVersionRequest { + // Required. The name of the playbook version. + // Format: + // `projects//locations//agents//playbooks//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; +} + +// The request message for +// [Playbooks.RestorePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion]. +message RestorePlaybookVersionRequest { + // Required. The name of the playbook version. + // Format: + // `projects//locations//agents//playbooks//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; +} + +// The response message for +// [Playbooks.RestorePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion]. +message RestorePlaybookVersionResponse { + // The updated playbook. + Playbook playbook = 2; +} + +// The request message for +// [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions]. +message ListPlaybookVersionsRequest { + // Required. The playbook to list versions for. + // Format: + // `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions]. +message ListPlaybookVersionsResponse { + // The list of playbook version. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated PlaybookVersion playbook_versions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Playbooks.DeletePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookVersion]. +message DeletePlaybookVersionRequest { + // Required. The name of the playbook version to delete. + // Format: + // `projects//locations//agents//playbooks//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; +} + +// The request message for +// [Playbooks.ExportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook]. +message ExportPlaybookRequest { + // Data format of the exported playbook. + enum DataFormat { + // Unspecified format. + DATA_FORMAT_UNSPECIFIED = 0; + + // Flow content will be exported as raw bytes. + BLOB = 1; + + // Flow content will be exported in JSON format. + JSON = 2; + } + + // Required. The name of the playbook to export. + // Format: + // `projects//locations//agents//playbooks/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Optional. The [Google Cloud + // Storage](https://cloud.google.com/storage/docs/) URI to export the playbook + // to. The format of this URI must be `gs:///`. If + // left unspecified, the serialized playbook is returned inline. + // + // 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 playbook_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The data format of the exported agent. If not specified, `BLOB` + // is assumed. + DataFormat data_format = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for +// [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook]. +message ImportPlaybookRequest { + // Required. The agent to import the playbook into. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Required. The playbook to import. + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import playbook 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 + oneof playbook { + // [Dialogflow access + // control] + // (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string playbook_uri = 2; + + // Uncompressed raw byte content for playbook. + bytes playbook_content = 3; + } + + // Optional. Specifies the import strategy used when resolving resource + // conflicts. + PlaybookImportStrategy import_strategy = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The playbook import strategy used for resource conflict resolution associated +// with an +// [ImportPlaybookRequest][google.cloud.dialogflow.cx.v3.ImportPlaybookRequest]. +message PlaybookImportStrategy { + // Optional. Specifies the import strategy used when resolving conflicts with + // the main playbook. If not specified, 'CREATE_NEW' is assumed. + ImportStrategy main_playbook_import_strategy = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the import strategy used when resolving referenced + // playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed. + ImportStrategy nested_resource_import_strategy = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the import strategy used when resolving tool conflicts. + // If not specified, 'CREATE_NEW' is assumed. This will be applied after the + // main playbook and nested resource import strategies, meaning if the + // playbook that references the tool is skipped, the tool will also be + // skipped. + ImportStrategy tool_import_strategy = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook]. +message ImportPlaybookResponse { + // Conflicting resources detected during the import process. Only filled when + // [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] is set in the + // request and there are conflicts in the display names. + message ConflictingResources { + // Display name of conflicting main playbook. + string main_playbook_display_name = 1; + + // Display names of conflicting nested playbooks. + repeated string nested_playbook_display_names = 2; + + // Display names of conflicting tools. + repeated string tool_display_names = 3; + } + + // The unique identifier of the new playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string playbook = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + }]; + + // Info which resources have conflicts when + // [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy + // is set for all resources in ImportPlaybookRequest. + ConflictingResources conflicting_resources = 2; +} + +// The response message for +// [Playbooks.ExportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook]. +message ExportPlaybookResponse { + // The exported playbook. + oneof playbook { + // The URI to a file containing the exported playbook. This field is + // populated only if `playbook_uri` is specified in + // [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest]. + string playbook_uri = 1; + + // Uncompressed raw byte content for playbook. + bytes playbook_content = 2; + } +} + +// Handler can be used to define custom logic to be executed based on the +// user-specified triggers. +message Handler { + // A handler that is triggered by the specified + // [event][google.cloud.dialogflow.cx.v3.Handler.EventHandler.event]. + message EventHandler { + // Required. The name of the event that triggers this handler. + string event = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The condition that must be satisfied to trigger this handler. + string condition = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The fulfillment to call when the event occurs. + Fulfillment fulfillment = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A handler that is triggered on the specific + // [lifecycle_stage][google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.lifecycle_stage] + // of the playbook execution. + message LifecycleHandler { + // Required. The name of the lifecycle stage that triggers this handler. + // Supported values: + // * `playbook-start` + // * `pre-action-selection` + // * `pre-action-execution` + string lifecycle_stage = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The condition that must be satisfied to trigger this handler. + string condition = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The fulfillment to call when this handler is triggered. + Fulfillment fulfillment = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies the type of handler to invoke. + oneof handler { + // A handler triggered by event. + EventHandler event_handler = 1; + + // A handler triggered during specific lifecycle of the playbook execution. + LifecycleHandler lifecycle_handler = 3; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto index 766da97b6efd..776be9f43a09 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; import "google/api/field_behavior.proto"; +import "google/cloud/dialogflow/cx/v3/tool_call.proto"; import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; @@ -256,6 +257,10 @@ message ResponseMessage { // Represents info card for knowledge answers, to be better rendered in // Dialogflow Messenger. KnowledgeInfoCard knowledge_info_card = 20; + + // Returns the definition of a tool call that should be executed by the + // client. + ToolCall tool_call = 22; } // Response type. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/safety_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/safety_settings.proto index 3381b2a3d95d..34ca5de09908 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/safety_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/safety_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -37,6 +37,97 @@ message SafetySettings { string language_code = 2 [(google.api.field_behavior) = REQUIRED]; } + // Strategy for matching phrases. + enum PhraseMatchStrategy { + // Unspecified, defaults to PARTIAL_MATCH. + PHRASE_MATCH_STRATEGY_UNSPECIFIED = 0; + + // Text that contains the phrase as a substring will be matched, e.g. "foo" + // will match "afoobar". + PARTIAL_MATCH = 1; + + // Text that contains the tokenized words of the phrase will be matched, + // e.g. "foo" will match "a foo bar" and "foo bar", but not "foobar". + WORD_MATCH = 2; + } + + // Settings for Responsible AI. + message RaiSettings { + // Sensitivity level for RAI categories. + enum SafetyFilterLevel { + // Unspecified -- uses default sensitivity levels. + SAFETY_FILTER_LEVEL_UNSPECIFIED = 0; + + // Block no text -- effectively disables the category. + BLOCK_NONE = 1; + + // Block a few suspicious texts. + BLOCK_FEW = 2; + + // Block some suspicious texts. + BLOCK_SOME = 3; + + // Block most suspicious texts. + BLOCK_MOST = 4; + } + + // RAI categories to configure. + enum SafetyCategory { + // Unspecified. + SAFETY_CATEGORY_UNSPECIFIED = 0; + + // Dangerous content. + DANGEROUS_CONTENT = 1; + + // Hate speech. + HATE_SPEECH = 2; + + // Harassment. + HARASSMENT = 3; + + // Sexually explicit content. + SEXUALLY_EXPLICIT_CONTENT = 4; + } + + // Configuration of the sensitivity level for blocking an RAI category. + message CategoryFilter { + // RAI category to configure. + SafetyCategory category = 1; + + // Blocking sensitivity level to configure for the RAI category. + SafetyFilterLevel filter_level = 2; + } + + // Optional. RAI blocking configurations. + repeated CategoryFilter category_filters = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Settings for prompt security checks. + message PromptSecuritySettings { + // Optional. Enable prompt security checks. + bool enable_prompt_security = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Default phrase match strategy for banned phrases. + PhraseMatchStrategy default_banned_phrase_match_strategy = 4 + [(google.api.field_behavior) = OPTIONAL]; + // Banned phrases for generated text. repeated Phrase banned_phrases = 1; + + // Optional. Settings for Responsible AI checks. + RaiSettings rai_settings = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Immutable. Default RAI settings to be annotated on the agent, so + // that users will be able to restore their RAI configurations to the default + // settings. Read-only field for the API proto only. + RaiSettings default_rai_settings = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Settings for prompt security checks. + PromptSecuritySettings prompt_security_settings = 8 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto index 3d1d0e08bc4a..f322265e6378 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -264,6 +264,9 @@ message SecuritySettings { string gcs_bucket = 1; // Filename pattern for exported audio. + // {conversation} and {timestamp} are placeholders that will be replaced + // with the conversation ID and epoch micros of the conversation. + // For example, "{conversation}/recording_{timestamp}.mulaw". string audio_export_pattern = 2; // Enable audio redaction if it is true. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto index 44e33da28f0a..37dbb8ab3538 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,10 +24,12 @@ import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/audio_config.proto"; import "google/cloud/dialogflow/cx/v3/data_store_connection.proto"; import "google/cloud/dialogflow/cx/v3/flow.proto"; +import "google/cloud/dialogflow/cx/v3/generative_settings.proto"; import "google/cloud/dialogflow/cx/v3/intent.proto"; import "google/cloud/dialogflow/cx/v3/page.proto"; import "google/cloud/dialogflow/cx/v3/response_message.proto"; import "google/cloud/dialogflow/cx/v3/session_entity_type.proto"; +import "google/cloud/dialogflow/cx/v3/tool_call.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; @@ -246,6 +248,12 @@ message DetectIntentRequest { // Instructs the speech synthesizer how to generate the output audio. OutputAudioConfig output_audio_config = 4; + + // Optional. Specifies which fields in the + // [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + // set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + DetectIntentResponseView response_view = 9 + [(google.api.field_behavior) = OPTIONAL]; } // The message returned from the DetectIntent method. @@ -369,6 +377,12 @@ message StreamingDetectIntentRequest { // If true, `StreamingDetectIntentResponse.debugging_info` will get populated. bool enable_debugging_info = 8; + + // Optional. Specifies which fields in the + // [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + // set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + DetectIntentResponseView response_view = 16 + [(google.api.field_behavior) = OPTIONAL]; } // Cloud conversation info for easier debugging. @@ -633,6 +647,14 @@ message QueryParameters { // use parameter value. google.protobuf.Struct parameters = 5; + // Scope for the parameters. If not specified, parameters will be treated as + // session parameters. Parameters with custom scope will not be put into + // [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + // + // You can reference the parameters with custom scope in the agent with the + // following format: $parameter-scope.params.parameter-id. + string parameter_scope = 12; + // The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to // override the [current page][QueryResult.current_page] in the session. // Format: @@ -679,6 +701,24 @@ message QueryParameters { type: "dialogflow.googleapis.com/Version" }]; + // Optional. The unique identifier of the + // [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + // session with. If `current_playbook` is specified, the previous state of the + // session will be ignored by Dialogflow. + // + // Format: + // `projects//locations//agents//playbooks/`. + string current_playbook = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Optional. Use the specified LLM model settings for processing the request. + LlmModelSettings llm_model_settings = 21 + [(google.api.field_behavior) = OPTIONAL]; + // The channel which this query is for. // // If specified, only the @@ -943,6 +983,9 @@ message QueryInput { // The DTMF event to be handled. DtmfInput dtmf = 7; + + // The results of a tool executed by the client. + ToolCallResult tool_call_result = 11; } // Required. The language of the input. See [Language @@ -1010,18 +1053,6 @@ message QueryResult { // to drive complex logic. repeated ResponseMessage response_messages = 4; - // The list of webhook ids in the order of call sequence. - repeated string webhook_ids = 25; - - // The list of webhook display names in the order of call sequence. - repeated string webhook_display_names = 26; - - // The list of webhook latencies in the order of call sequence. - repeated google.protobuf.Duration webhook_latencies = 27; - - // The list of webhook tags in the order of call sequence. - repeated string webhook_tags = 29; - // The list of webhook call status in the order of call sequence. repeated google.rpc.Status webhook_statuses = 13; @@ -1186,7 +1217,8 @@ message Match { // The query was matched to a Knowledge Connector answer. KNOWLEDGE_CONNECTOR = 8; - // The query was handled by a [`Playbook`][Playbook]. + // The query was handled by a + // [`Playbook`][google.cloud.dialogflow.cx.v3.Playbook]. PLAYBOOK = 9; } @@ -1353,3 +1385,23 @@ message SentimentAnalysisResult { // magnitude of sentiment, regardless of score (positive or negative). float magnitude = 2; } + +// The response view specifies which fields in the +// [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. +enum DetectIntentResponseView { + // Not specified. `DETECT_INTENT_RESPONSE_VIEW_DEFAULT` will be used. + DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED = 0; + + // Full response view includes all fields. + DETECT_INTENT_RESPONSE_VIEW_FULL = 1; + + // Basic response view omits the following fields: + // - + // [QueryResult.diagnostic_info][google.cloud.dialogflow.cx.v3.QueryResult.diagnostic_info] + DETECT_INTENT_RESPONSE_VIEW_BASIC = 2; + + // Default response view omits the following fields: + // - + // [QueryResult.trace_blocks][google.cloud.dialogflow.cx.v3.QueryResult.trace_blocks] + DETECT_INTENT_RESPONSE_VIEW_DEFAULT = 3; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto index e76d841bf833..1dd4b057f690 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto index 89de21acef29..e445e090a734 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/tool.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/tool.proto new file mode 100644 index 000000000000..1a66b277f8e2 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/tool.proto @@ -0,0 +1,686 @@ +// Copyright 2026 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.v3; + +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/v3/data_store_connection.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ToolProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool]. +service Tools { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified + // agent. + rpc CreateTool(CreateToolRequest) returns (Tool) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/tools" + body: "tool" + }; + option (google.api.method_signature) = "parent,tool"; + } + + // Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the + // specified agent. + rpc ListTools(ListToolsRequest) returns (ListToolsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/tools" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc GetTool(GetToolRequest) returns (Tool) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/tools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc UpdateTool(UpdateToolRequest) returns (Tool) { + option (google.api.http) = { + patch: "/v3/{tool.name=projects/*/locations/*/agents/*/tools/*}" + body: "tool" + }; + option (google.api.method_signature) = "tool,update_mask"; + } + + // Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc DeleteTool(DeleteToolRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/tools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc ListToolVersions(ListToolVersionsRequest) + returns (ListToolVersionsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a version for the specified + // [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc CreateToolVersion(CreateToolVersionRequest) returns (ToolVersion) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions" + body: "tool_version" + }; + option (google.api.method_signature) = "parent,tool_version"; + } + + // Retrieves the specified version of the + // [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc GetToolVersion(GetToolVersionRequest) returns (ToolVersion) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes the specified version of the + // [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc DeleteToolVersion(DeleteToolVersionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves the specified version of the Tool and stores it as the + // current tool draft, returning the tool with resources updated. + rpc RestoreToolVersion(RestoreToolVersionRequest) + returns (RestoreToolVersionResponse) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for +// [Tools.CreateTool][google.cloud.dialogflow.cx.v3.Tools.CreateTool]. +message CreateToolRequest { + // Required. The agent to create a Tool for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Tool" + } + ]; + + // Required. The Tool to be created. + Tool tool = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Tools.ListTools][google.cloud.dialogflow.cx.v3.Tools.ListTools]. +message ListToolsRequest { + // Required. The agent to list the Tools from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Tool" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for +// [Tools.ListTools][google.cloud.dialogflow.cx.v3.Tools.ListTools]. +message ListToolsResponse { + // The list of Tools. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated Tool tools = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Tools.GetTool][google.cloud.dialogflow.cx.v3.Tools.GetTool]. +message GetToolRequest { + // Required. The name of the Tool. + // Format: + // `projects//locations//agents//tools/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; +} + +// The request message for +// [Tools.UpdateTool][google.cloud.dialogflow.cx.v3.Tools.UpdateTool]. +message UpdateToolRequest { + // Required. The Tool to be updated. + Tool tool = 1 [(google.api.field_behavior) = REQUIRED]; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request message for +// [Tools.DeleteTool][google.cloud.dialogflow.cx.v3.Tools.DeleteTool]. +message DeleteToolRequest { + // Required. The name of the Tool to be deleted. + // Format: + // `projects//locations//agents//tools/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // This field has no effect for Tools not being used. + // For Tools that are used: + // + // * If `force` is set to false, an error will be returned with message + // indicating the referenced resources. + // * If `force` is set to true, Dialogflow will remove the tool, as well + // as any references to the tool. + bool force = 2; +} + +// A tool provides a list of actions which are available to the +// [Playbook][google.cloud.dialogflow.cx.v3.Playbook] to attain its goal. A Tool +// consists of a description of the tool's usage and a specification of the tool +// which contains the schema and authentication information. +message Tool { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Tool" + pattern: "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}" + }; + + // An OpenAPI tool is a way to provide the Tool specifications in the Open API + // schema format. + message OpenApiTool { + // Schema representation. + oneof schema { + // Required. The OpenAPI schema specified as a text. + string text_schema = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. Authentication information required by the API. + Authentication authentication = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. TLS configuration for the HTTPS verification. + TLSConfig tls_config = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Service Directory configuration. + ServiceDirectoryConfig service_directory_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // A DataStoreTool is a way to provide specifications needed to search a + // list of data stores. + message DataStoreTool { + // A FallbackPrompt is a way to provide specifications for the Data Store + // fallback prompt when generating responses. + message FallbackPrompt {} + + // Required. List of data stores to search. + repeated DataStoreConnection data_store_connections = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Fallback prompt configurations to use. + FallbackPrompt fallback_prompt = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // A Function tool describes the functions to be invoked on the client side. + message FunctionTool { + // Optional. The JSON schema is encapsulated in a + // [google.protobuf.Struct][google.protobuf.Struct] to describe the input of + // the function. This input is a JSON object that contains the function's + // parameters as properties of the object. + google.protobuf.Struct input_schema = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The JSON schema is encapsulated in a + // [google.protobuf.Struct][google.protobuf.Struct] to describe the output + // of the function. This output is a JSON object that contains the + // function's parameters as properties of the object. + google.protobuf.Struct output_schema = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Authentication information required for API calls + message Authentication { + // Config for authentication with API key. + message ApiKeyConfig { + // Required. The parameter name or the header name of the API key. + // E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. + string key_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The API key. If the `secret_version_for_api_key` field is + // set, this field will be ignored. + string api_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the SecretManager secret version resource storing + // the API key. If this field is set, the `api_key` field will be ignored. + // Format: `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_api_key = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Required. Key location in the request. + RequestLocation request_location = 3 + [(google.api.field_behavior) = REQUIRED]; + } + + // The location of the API key in the request. + enum RequestLocation { + // Default value. This value is unused. + REQUEST_LOCATION_UNSPECIFIED = 0; + + // Represents the key in http header. + HEADER = 1; + + // Represents the key in query string. + QUERY_STRING = 2; + } + + // Config for authentication with OAuth. + message OAuthConfig { + // OAuth grant types. Only [client credential + // grant](https://oauth.net/2/grant-types/client-credentials) is + // supported. + enum OauthGrantType { + // Default value. This value is unused. + OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + + // Represents the [client credential + // flow](https://oauth.net/2/grant-types/client-credentials). + CLIENT_CREDENTIAL = 1; + } + + // Required. OAuth grant types. + OauthGrantType oauth_grant_type = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The client ID from the OAuth provider. + string client_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The client secret from the OAuth provider. If the + // `secret_version_for_client_secret` field is set, this field will be + // ignored. + string client_secret = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the SecretManager secret version resource storing + // the client secret. If this field is set, the `client_secret` field will + // be ignored. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_client_secret = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Required. The token endpoint in the OAuth provider to exchange for an + // access token. + string token_endpoint = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The OAuth scopes to grant. + repeated string scopes = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Config for auth using [Diglogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + message ServiceAgentAuthConfig { + // Indicate the auth token type generated from the [Diglogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + enum ServiceAgentAuth { + // Service agent auth type unspecified. Default to ID_TOKEN. + SERVICE_AGENT_AUTH_UNSPECIFIED = 0; + + // Use [ID + // token](https://cloud.google.com/docs/authentication/token-types#id) + // generated from service agent. This can be used to access Cloud + // Function and Cloud Run after you grant Invoker role to + // `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + ID_TOKEN = 1; + + // Use [access + // token](https://cloud.google.com/docs/authentication/token-types#access) + // generated from service agent. This can be used to access other Google + // Cloud APIs after you grant required roles to + // `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + ACCESS_TOKEN = 2; + } + + // Optional. Indicate the auth token type generated from the [Diglogflow + // service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + // The generated token is sent in the Authorization header. + ServiceAgentAuth service_agent_auth = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Config for authentication using bearer token. + message BearerTokenConfig { + // Optional. The text token appended to the text `Bearer` to the request + // Authorization header. + // [Session parameters + // reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) + // can be used to pass the token dynamically, e.g. + // `$session.params.parameter-id`. + string token = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the SecretManager secret version resource storing + // the Bearer token. If this field is set, the `token` field will be + // ignored. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_token = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + } + + // Configuration for authentication using a service account. + message ServiceAccountAuthConfig { + // Required. The email address of the service account used to authenticate + // the tool call. Dialogflow uses this service account to exchange an + // access token and the access token is then sent in the `Authorization` + // header of the tool request. + // + // The service account must have the + // `roles/iam.serviceAccountTokenCreator` role granted to the + // [Dialogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + string service_account = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The auth configuration. + oneof auth_config { + // Config for API key auth. + ApiKeyConfig api_key_config = 1; + + // Config for OAuth. + OAuthConfig oauth_config = 2; + + // Config for [Diglogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) + // auth. + ServiceAgentAuthConfig service_agent_auth_config = 3; + + // Config for bearer token auth. + BearerTokenConfig bearer_token_config = 4; + + // Configuration for service account authentication. + ServiceAccountAuthConfig service_account_auth_config = 5; + } + } + + // The TLS configuration. + message TLSConfig { + // The CA certificate. + message CACert { + // Required. The name of the allowed custom CA certificates. This + // can be used to disambiguate the custom CA certificates. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The allowed custom CA certificates (in DER format) for + // HTTPS verification. This overrides the default SSL trust store. If this + // is empty or unspecified, Dialogflow will use Google's default trust + // store to verify certificates. N.B. Make sure the HTTPS server + // certificates are signed with "subject alt name". For instance a + // certificate can be self-signed using the following command: + // + // ``` + // openssl x509 -req -days 200 -in example.com.csr \ + // -signkey example.com.key \ + // -out example.com.crt \ + // -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + // ``` + bytes cert = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Specifies a list of allowed custom CA certificates for HTTPS + // verification. + repeated CACert ca_certs = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for tools using Service Directory. + message ServiceDirectoryConfig { + // Required. The name of [Service + // Directory](https://cloud.google.com/service-directory) service. + // Format: + // `projects//locations//namespaces//services/`. + // `LocationID` of the service directory must be the same as the location + // of the agent. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Service" + } + ]; + } + + // Represents the type of the tool. + enum ToolType { + // Default value. This value is unused. + TOOL_TYPE_UNSPECIFIED = 0; + + // Customer provided tool. + CUSTOMIZED_TOOL = 1; + + // First party built-in tool created by Dialogflow which cannot be modified. + BUILTIN_TOOL = 2; + } + + // The unique identifier of the Tool. + // Format: + // `projects//locations//agents//tools/`. + string name = 1; + + // Required. The human-readable name of the Tool, unique within an agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. High level description of the Tool and its usage. + string description = 3 [(google.api.field_behavior) = REQUIRED]; + + // Specification of the Tool. + oneof specification { + // OpenAPI specification of the Tool. + OpenApiTool open_api_spec = 4; + + // Data store search tool specification. + DataStoreTool data_store_spec = 8; + + // Client side executed function specification. + FunctionTool function_spec = 13; + } + + // Output only. The tool type. + ToolType tool_type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for +// [Tools.ListToolVersions][google.cloud.dialogflow.cx.v3.Tools.ListToolVersions]. +message ListToolVersionsRequest { + // Required. The parent of the tool versions. + // Format: + // `projects//locations//agents//tools/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/ToolVersion" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Tools.ListToolVersions][google.cloud.dialogflow.cx.v3.Tools.ListToolVersions]. +message ListToolVersionsResponse { + // The list of tool versions. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated ToolVersion tool_versions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Tools.CreateToolVersion][google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion]. +// The request message for +// [Tools.CreateToolVersion][google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion]. +message CreateToolVersionRequest { + // Required. The tool to create a version for. + // Format: + // `projects//locations//agents//tools/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/ToolVersion" + } + ]; + + // Required. The tool version to create. + ToolVersion tool_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Tools.GetToolVersion][google.cloud.dialogflow.cx.v3.Tools.GetToolVersion]. +message GetToolVersionRequest { + // Required. The name of the tool version. + // Format: + // `projects//locations//agents//tools//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ToolVersion" + } + ]; +} + +// The request message for +// [Tools.DeleteToolVersion][google.cloud.dialogflow.cx.v3.Tools.DeleteToolVersion]. +message DeleteToolVersionRequest { + // Required. The name of the tool version to delete. + // Format: + // `projects//locations//agents//tools//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ToolVersion" + } + ]; + + // Optional. This field has no effect for Tools not being used. + // For Tools that are used: + // + // * If `force` is set to false, an error will be returned with message + // indicating the referenced resources. + // * If `force` is set to true, Dialogflow will remove the tool, as well + // as any references to the tool. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for +// [Tools.RestoreToolVersion][google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion]. +message RestoreToolVersionRequest { + // Required. The name of the tool version. + // Format: + // `projects//locations//agents//tools//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ToolVersion" + } + ]; +} + +// The response message for +// [Tools.RestoreToolVersion][google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion]. +message RestoreToolVersionResponse { + // The updated tool. + Tool tool = 2; +} + +// Tool version is a snapshot of the tool at certain timestamp. +message ToolVersion { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/ToolVersion" + pattern: "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}" + plural: "toolVersions" + singular: "toolVersion" + }; + + // Identifier. The unique identifier of the tool version. + // Format: + // `projects//locations//agents//tools//versions/`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The display name of the tool version. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Snapshot of the tool to be associated with this version. + Tool tool = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Last time the tool version was created or modified. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the tool version was created or modified. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/tool_call.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/tool_call.proto new file mode 100644 index 000000000000..c2773853f769 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/tool_call.proto @@ -0,0 +1,76 @@ +// Copyright 2026 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.v3; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ToolCallProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Represents a call of a specific tool's action with the specified inputs. +message ToolCall { + // Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + // this call. Format: + // `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Required. The name of the tool's action associated with this call. + string action = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The action's input parameters. + google.protobuf.Struct input_parameters = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The result of calling a tool's action that has been executed by the client. +message ToolCallResult { + // An error produced by the tool call. + message Error { + // Optional. The error message of the function. + string message = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + // this call. Format: + // `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Required. The name of the tool's action associated with this call. + string action = 2 [(google.api.field_behavior) = REQUIRED]; + + // The tool call's result. + oneof result { + // The tool call's error. + Error error = 3; + + // The tool call's output parameters. + google.protobuf.Struct output_parameters = 4; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/trace.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/trace.proto new file mode 100644 index 000000000000..797f9b2e85a9 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/trace.proto @@ -0,0 +1,209 @@ +// Copyright 2026 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.v3; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "TraceProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Input of the playbook. +message PlaybookInput { + // Optional. Summary string of the preceding conversation for the child + // playbook invocation. + string preceding_conversation_summary = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Output of the playbook. +message PlaybookOutput { + // Optional. Summary string of the execution result of the child playbook. + string execution_summary = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Action performed by end user or Dialogflow agent in the conversation. +message Action { + // Action details. + oneof action { + // Optional. Agent obtained a message from the customer. + UserUtterance user_utterance = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed by the agent as a message. + AgentUtterance agent_utterance = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by calling a plugin + // tool. + ToolUse tool_use = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by invoking a child + // playbook. + PlaybookInvocation playbook_invocation = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by invoking a CX flow. + FlowInvocation flow_invocation = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by transitioning to a + // target playbook. + PlaybookTransition playbook_transition = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by transitioning to a + // target CX flow. + FlowTransition flow_transition = 13 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// UserUtterance represents one message sent by the customer. +message UserUtterance { + // Required. Message content in text. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// AgentUtterance represents one message sent by the agent. +message AgentUtterance { + // Required. Message content in text. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the invocation of an action supported by a tool. +message ToolUse { + // Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be + // used. Format: + // `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Output only. The display name of the tool. + string display_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Name of the action to be called during the tool use. + string action = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of input parameters for the action. + google.protobuf.Struct input_action_parameters = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of output parameters generated by the action. + google.protobuf.Struct output_action_parameters = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Stores metadata of the invocation of a child playbook. +message PlaybookInvocation { + // Required. The unique identifier of the playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string playbook = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Output only. The display name of the playbook. + string display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Input of the child playbook invocation. + PlaybookInput playbook_input = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output of the child playbook invocation. + PlaybookOutput playbook_output = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Playbook invocation's output state. + OutputState playbook_state = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the invocation of a CX flow. +message FlowInvocation { + // Required. The unique identifier of the flow. + // Format: + // `projects//locations//agents//flows/`. + string flow = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + ]; + + // Output only. The display name of the flow. + string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Flow invocation's output state. + OutputState flow_state = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the transition to another target playbook. Playbook +// transition actions exit the caller playbook and enter the target playbook. +message PlaybookTransition { + // Required. The unique identifier of the playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string playbook = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Output only. The display name of the playbook. + string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Stores metadata of the transition to a target CX flow. Flow transition +// actions exit the caller playbook and enter the child flow. +message FlowTransition { + // Required. The unique identifier of the flow. + // Format: + // `projects//locations//agents/`. + string flow = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + ]; + + // Output only. The display name of the flow. + string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Output state. +enum OutputState { + // Unspecified output. + OUTPUT_STATE_UNSPECIFIED = 0; + + // Succeeded. + OUTPUT_STATE_OK = 1; + + // Cancelled. + OUTPUT_STATE_CANCELLED = 2; + + // Failed. + OUTPUT_STATE_FAILED = 3; + + // Escalated. + OUTPUT_STATE_ESCALATED = 4; + + // Pending. + OUTPUT_STATE_PENDING = 5; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto index 98763bfbcfeb..40523f9132d4 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/transition_route_group.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto index 11840cf63582..cd81683a32dd 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/validation_message.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto index d9a23dd67f1e..c79f4ecd359d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto index d14e9ceb5a32..099436a64c06 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -100,6 +100,19 @@ message Webhook { // Represents configuration for a generic web service. message GenericWebService { + // Represents the value of an HTTP header stored in a SecretManager secret + // version. + message SecretVersionHeaderValue { + // Required. The SecretManager secret version resource storing the header + // value. Format: `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + } + // Represents configuration of OAuth client credential flow for 3rd party // API authentication. message OAuthConfig { @@ -109,6 +122,17 @@ message Webhook { // Optional. The client secret provided by the 3rd party platform. string client_secret = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The name of the SecretManager secret version resource storing + // the client secret. If this field is set, the `client_secret` field will + // be ignored. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_client_secret = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + // Required. The token endpoint provided by the 3rd party platform to // exchange an access token. string token_endpoint = 3 [(google.api.field_behavior) = REQUIRED]; @@ -141,6 +165,20 @@ message Webhook { ACCESS_TOKEN = 3; } + // Configuration for authentication using a service account. + message ServiceAccountAuthConfig { + // Required. The email address of the service account used to authenticate + // the webhook call. Dialogflow uses this service account to exchange an + // access token and the access token is then sent in the `Authorization` + // header of the webhook request. + // + // The service account must have the + // `roles/iam.serviceAccountTokenCreator` role granted to the + // [Dialogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + string service_account = 1 [(google.api.field_behavior) = REQUIRED]; + } + // Represents the type of webhook configuration. enum WebhookType { // Default value. This value is unused. @@ -190,9 +228,28 @@ message Webhook { // The password for HTTP Basic authentication. string password = 3 [deprecated = true]; + // Optional. The SecretManager secret version resource storing the + // username:password pair for HTTP Basic authentication. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_username_password = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + // The HTTP request headers to send together with webhook requests. map request_headers = 4; + // Optional. The HTTP request headers to send together with webhook + // requests. Header values are stored in SecretManager secret versions. + // + // When the same header name is specified in both `request_headers` and + // `secret_versions_for_request_headers`, the value in + // `secret_versions_for_request_headers` will be used. + map secret_versions_for_request_headers = + 20 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Specifies a list of allowed custom CA certificates (in DER // format) for HTTPS verification. This overrides the default SSL trust // store. If this is empty or unspecified, Dialogflow will use Google's @@ -220,6 +277,10 @@ message Webhook { ServiceAgentAuth service_agent_auth = 12 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Configuration for service account authentication. + ServiceAccountAuthConfig service_account_auth_config = 18 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Type of the webhook. WebhookType webhook_type = 6 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateSetCredentialsProvider.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..62baa88c1a5c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.ExamplesSettings; +import com.google.cloud.dialogflow.cx.v3.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + ExamplesSettings examplesSettings = + ExamplesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ExamplesClient examplesClient = ExamplesClient.create(examplesSettings); + } +} +// [END dialogflow_v3_generated_Examples_Create_SetCredentialsProvider_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateSetEndpoint.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..fadaafb84031 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_Create_SetEndpoint_sync] +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.ExamplesSettings; +import com.google.cloud.dialogflow.cx.v3.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + ExamplesSettings examplesSettings = + ExamplesSettings.newBuilder().setEndpoint(myEndpoint).build(); + ExamplesClient examplesClient = ExamplesClient.create(examplesSettings); + } +} +// [END dialogflow_v3_generated_Examples_Create_SetEndpoint_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateUseHttpJsonTransport.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..06a14c5dea72 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,39 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_Create_UseHttpJsonTransport_sync] +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.ExamplesSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + ExamplesSettings examplesSettings = ExamplesSettings.newHttpJsonBuilder().build(); + ExamplesClient examplesClient = ExamplesClient.create(examplesSettings); + } +} +// [END dialogflow_v3_generated_Examples_Create_UseHttpJsonTransport_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/AsyncCreateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/AsyncCreateExample.java new file mode 100644 index 000000000000..960fee81c783 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/AsyncCreateExample.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_CreateExample_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; + +public class AsyncCreateExample { + + public static void main(String[] args) throws Exception { + asyncCreateExample(); + } + + public static void asyncCreateExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + CreateExampleRequest request = + CreateExampleRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setExample(Example.newBuilder().build()) + .build(); + ApiFuture future = examplesClient.createExampleCallable().futureCall(request); + // Do something. + Example response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Examples_CreateExample_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExample.java new file mode 100644 index 000000000000..f64422fdeb2e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExample.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_CreateExample_sync] +import com.google.cloud.dialogflow.cx.v3.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; + +public class SyncCreateExample { + + public static void main(String[] args) throws Exception { + syncCreateExample(); + } + + public static void syncCreateExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + CreateExampleRequest request = + CreateExampleRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setExample(Example.newBuilder().build()) + .build(); + Example response = examplesClient.createExample(request); + } + } +} +// [END dialogflow_v3_generated_Examples_CreateExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExamplePlaybooknameExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExamplePlaybooknameExample.java new file mode 100644 index 000000000000..09b616e2d8f9 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExamplePlaybooknameExample.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_CreateExample_PlaybooknameExample_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; + +public class SyncCreateExamplePlaybooknameExample { + + public static void main(String[] args) throws Exception { + syncCreateExamplePlaybooknameExample(); + } + + public static void syncCreateExamplePlaybooknameExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + Example response = examplesClient.createExample(parent, example); + } + } +} +// [END dialogflow_v3_generated_Examples_CreateExample_PlaybooknameExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExampleStringExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExampleStringExample.java new file mode 100644 index 000000000000..0835a86546e1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/createexample/SyncCreateExampleStringExample.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_CreateExample_StringExample_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; + +public class SyncCreateExampleStringExample { + + public static void main(String[] args) throws Exception { + syncCreateExampleStringExample(); + } + + public static void syncCreateExampleStringExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + String parent = + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + Example example = Example.newBuilder().build(); + Example response = examplesClient.createExample(parent, example); + } + } +} +// [END dialogflow_v3_generated_Examples_CreateExample_StringExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/AsyncDeleteExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/AsyncDeleteExample.java new file mode 100644 index 000000000000..d5e6e3806ada --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/AsyncDeleteExample.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_DeleteExample_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3.ExampleName; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteExample { + + public static void main(String[] args) throws Exception { + asyncDeleteExample(); + } + + public static void asyncDeleteExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + DeleteExampleRequest request = + DeleteExampleRequest.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .build(); + ApiFuture future = examplesClient.deleteExampleCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3_generated_Examples_DeleteExample_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExample.java new file mode 100644 index 000000000000..e03402ac84a2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExample.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_DeleteExample_sync] +import com.google.cloud.dialogflow.cx.v3.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3.ExampleName; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteExample { + + public static void main(String[] args) throws Exception { + syncDeleteExample(); + } + + public static void syncDeleteExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + DeleteExampleRequest request = + DeleteExampleRequest.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .build(); + examplesClient.deleteExample(request); + } + } +} +// [END dialogflow_v3_generated_Examples_DeleteExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExampleExamplename.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExampleExamplename.java new file mode 100644 index 000000000000..ff5fe9a79ebc --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExampleExamplename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_DeleteExample_Examplename_sync] +import com.google.cloud.dialogflow.cx.v3.ExampleName; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteExampleExamplename { + + public static void main(String[] args) throws Exception { + syncDeleteExampleExamplename(); + } + + public static void syncDeleteExampleExamplename() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + examplesClient.deleteExample(name); + } + } +} +// [END dialogflow_v3_generated_Examples_DeleteExample_Examplename_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExampleString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExampleString.java new file mode 100644 index 000000000000..0550d645f47a --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/deleteexample/SyncDeleteExampleString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_DeleteExample_String_sync] +import com.google.cloud.dialogflow.cx.v3.ExampleName; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteExampleString { + + public static void main(String[] args) throws Exception { + syncDeleteExampleString(); + } + + public static void syncDeleteExampleString() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + String name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString(); + examplesClient.deleteExample(name); + } + } +} +// [END dialogflow_v3_generated_Examples_DeleteExample_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/AsyncGetExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/AsyncGetExample.java new file mode 100644 index 000000000000..5faebf0453aa --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/AsyncGetExample.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_GetExample_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExampleName; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.GetExampleRequest; + +public class AsyncGetExample { + + public static void main(String[] args) throws Exception { + asyncGetExample(); + } + + public static void asyncGetExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + GetExampleRequest request = + GetExampleRequest.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .build(); + ApiFuture future = examplesClient.getExampleCallable().futureCall(request); + // Do something. + Example response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Examples_GetExample_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExample.java new file mode 100644 index 000000000000..15380c73d6e5 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExample.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_GetExample_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExampleName; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.GetExampleRequest; + +public class SyncGetExample { + + public static void main(String[] args) throws Exception { + syncGetExample(); + } + + public static void syncGetExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + GetExampleRequest request = + GetExampleRequest.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .build(); + Example response = examplesClient.getExample(request); + } + } +} +// [END dialogflow_v3_generated_Examples_GetExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExampleExamplename.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExampleExamplename.java new file mode 100644 index 000000000000..92ab5c70b44c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExampleExamplename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_GetExample_Examplename_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExampleName; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; + +public class SyncGetExampleExamplename { + + public static void main(String[] args) throws Exception { + syncGetExampleExamplename(); + } + + public static void syncGetExampleExamplename() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + Example response = examplesClient.getExample(name); + } + } +} +// [END dialogflow_v3_generated_Examples_GetExample_Examplename_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExampleString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExampleString.java new file mode 100644 index 000000000000..b45dcf10e6cc --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getexample/SyncGetExampleString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_GetExample_String_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExampleName; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; + +public class SyncGetExampleString { + + public static void main(String[] args) throws Exception { + syncGetExampleString(); + } + + public static void syncGetExampleString() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + String name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString(); + Example response = examplesClient.getExample(name); + } + } +} +// [END dialogflow_v3_generated_Examples_GetExample_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getlocation/AsyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..5a6737ba7f95 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = examplesClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Examples_GetLocation_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getlocation/SyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..007f4168521c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_GetLocation_sync] +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = examplesClient.getLocation(request); + } + } +} +// [END dialogflow_v3_generated_Examples_GetLocation_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/AsyncListExamples.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/AsyncListExamples.java new file mode 100644 index 000000000000..6fcfe44aa77d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/AsyncListExamples.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_ListExamples_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; + +public class AsyncListExamples { + + public static void main(String[] args) throws Exception { + asyncListExamples(); + } + + public static void asyncListExamples() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListExamplesRequest request = + ListExamplesRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + ApiFuture future = examplesClient.listExamplesPagedCallable().futureCall(request); + // Do something. + for (Example element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Examples_ListExamples_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/AsyncListExamplesPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/AsyncListExamplesPaged.java new file mode 100644 index 000000000000..60fcddd5c780 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/AsyncListExamplesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_ListExamples_Paged_async] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.common.base.Strings; + +public class AsyncListExamplesPaged { + + public static void main(String[] args) throws Exception { + asyncListExamplesPaged(); + } + + public static void asyncListExamplesPaged() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListExamplesRequest request = + ListExamplesRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + while (true) { + ListExamplesResponse response = examplesClient.listExamplesCallable().call(request); + for (Example element : response.getExamplesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3_generated_Examples_ListExamples_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamples.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamples.java new file mode 100644 index 000000000000..42ff7b9e9246 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamples.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_ListExamples_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; + +public class SyncListExamples { + + public static void main(String[] args) throws Exception { + syncListExamples(); + } + + public static void syncListExamples() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListExamplesRequest request = + ListExamplesRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + for (Example element : examplesClient.listExamples(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Examples_ListExamples_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamplesPlaybookname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamplesPlaybookname.java new file mode 100644 index 000000000000..a781d88f3816 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamplesPlaybookname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_ListExamples_Playbookname_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; + +public class SyncListExamplesPlaybookname { + + public static void main(String[] args) throws Exception { + syncListExamplesPlaybookname(); + } + + public static void syncListExamplesPlaybookname() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + for (Example element : examplesClient.listExamples(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Examples_ListExamples_Playbookname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamplesString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamplesString.java new file mode 100644 index 000000000000..1f4223c162cd --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listexamples/SyncListExamplesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_ListExamples_String_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; + +public class SyncListExamplesString { + + public static void main(String[] args) throws Exception { + syncListExamplesString(); + } + + public static void syncListExamplesString() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + String parent = + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + for (Example element : examplesClient.listExamples(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Examples_ListExamples_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/AsyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..c394a95c22b6 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = examplesClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Examples_ListLocations_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/AsyncListLocationsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..d0436343183e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_ListLocations_Paged_async] +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = examplesClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3_generated_Examples_ListLocations_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/SyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..6e06366a798b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_ListLocations_sync] +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : examplesClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Examples_ListLocations_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/AsyncUpdateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/AsyncUpdateExample.java new file mode 100644 index 000000000000..47ae5e1c9ad4 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/AsyncUpdateExample.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_UpdateExample_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateExample { + + public static void main(String[] args) throws Exception { + asyncUpdateExample(); + } + + public static void asyncUpdateExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + UpdateExampleRequest request = + UpdateExampleRequest.newBuilder() + .setExample(Example.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = examplesClient.updateExampleCallable().futureCall(request); + // Do something. + Example response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Examples_UpdateExample_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/SyncUpdateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/SyncUpdateExample.java new file mode 100644 index 000000000000..b0cbc2ababcc --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/SyncUpdateExample.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_UpdateExample_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3.UpdateExampleRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateExample { + + public static void main(String[] args) throws Exception { + syncUpdateExample(); + } + + public static void syncUpdateExample() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + UpdateExampleRequest request = + UpdateExampleRequest.newBuilder() + .setExample(Example.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Example response = examplesClient.updateExample(request); + } + } +} +// [END dialogflow_v3_generated_Examples_UpdateExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/SyncUpdateExampleExampleFieldmask.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/SyncUpdateExampleExampleFieldmask.java new file mode 100644 index 000000000000..f5b6e65c29d1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examples/updateexample/SyncUpdateExampleExampleFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Examples_UpdateExample_ExampleFieldmask_sync] +import com.google.cloud.dialogflow.cx.v3.Example; +import com.google.cloud.dialogflow.cx.v3.ExamplesClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateExampleExampleFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateExampleExampleFieldmask(); + } + + public static void syncUpdateExampleExampleFieldmask() 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + Example example = Example.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Example response = examplesClient.updateExample(example, updateMask); + } + } +} +// [END dialogflow_v3_generated_Examples_UpdateExample_ExampleFieldmask_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examplessettings/createexample/SyncCreateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examplessettings/createexample/SyncCreateExample.java new file mode 100644 index 000000000000..12e37497c443 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/examplessettings/createexample/SyncCreateExample.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_ExamplesSettings_CreateExample_sync] +import com.google.cloud.dialogflow.cx.v3.ExamplesSettings; +import java.time.Duration; + +public class SyncCreateExample { + + public static void main(String[] args) throws Exception { + syncCreateExample(); + } + + public static void syncCreateExample() 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 + ExamplesSettings.Builder examplesSettingsBuilder = ExamplesSettings.newBuilder(); + examplesSettingsBuilder + .createExampleSettings() + .setRetrySettings( + examplesSettingsBuilder + .createExampleSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + ExamplesSettings examplesSettings = examplesSettingsBuilder.build(); + } +} +// [END dialogflow_v3_generated_ExamplesSettings_CreateExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateSetCredentialsProvider.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ef1743f1fab5 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.PlaybooksSettings; +import com.google.cloud.dialogflow.cx.v3.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + PlaybooksSettings playbooksSettings = + PlaybooksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings); + } +} +// [END dialogflow_v3_generated_Playbooks_Create_SetCredentialsProvider_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateSetEndpoint.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..43071fb9ed3e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_Create_SetEndpoint_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.PlaybooksSettings; +import com.google.cloud.dialogflow.cx.v3.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + PlaybooksSettings playbooksSettings = + PlaybooksSettings.newBuilder().setEndpoint(myEndpoint).build(); + PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings); + } +} +// [END dialogflow_v3_generated_Playbooks_Create_SetEndpoint_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateUseHttpJsonTransport.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..9f076b6d7fae --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,39 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_Create_UseHttpJsonTransport_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.PlaybooksSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + PlaybooksSettings playbooksSettings = PlaybooksSettings.newHttpJsonBuilder().build(); + PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings); + } +} +// [END dialogflow_v3_generated_Playbooks_Create_UseHttpJsonTransport_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/AsyncCreatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/AsyncCreatePlaybook.java new file mode 100644 index 000000000000..488fdaa3515d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/AsyncCreatePlaybook.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_CreatePlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class AsyncCreatePlaybook { + + public static void main(String[] args) throws Exception { + asyncCreatePlaybook(); + } + + public static void asyncCreatePlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + CreatePlaybookRequest request = + CreatePlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPlaybook(Playbook.newBuilder().build()) + .build(); + ApiFuture future = playbooksClient.createPlaybookCallable().futureCall(request); + // Do something. + Playbook response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybook.java new file mode 100644 index 000000000000..670456805240 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybook.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_CreatePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncCreatePlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybook(); + } + + public static void syncCreatePlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + CreatePlaybookRequest request = + CreatePlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPlaybook(Playbook.newBuilder().build()) + .build(); + Playbook response = playbooksClient.createPlaybook(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybookAgentnamePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybookAgentnamePlaybook.java new file mode 100644 index 000000000000..2e4d89caab24 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybookAgentnamePlaybook.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_CreatePlaybook_AgentnamePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncCreatePlaybookAgentnamePlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookAgentnamePlaybook(); + } + + public static void syncCreatePlaybookAgentnamePlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + Playbook response = playbooksClient.createPlaybook(parent, playbook); + } + } +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybook_AgentnamePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybookStringPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybookStringPlaybook.java new file mode 100644 index 000000000000..83f7849ada3e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybook/SyncCreatePlaybookStringPlaybook.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_CreatePlaybook_StringPlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncCreatePlaybookStringPlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookStringPlaybook(); + } + + public static void syncCreatePlaybookStringPlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + Playbook playbook = Playbook.newBuilder().build(); + Playbook response = playbooksClient.createPlaybook(parent, playbook); + } + } +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybook_StringPlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/AsyncCreatePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/AsyncCreatePlaybookVersion.java new file mode 100644 index 000000000000..ac6f0238e5ec --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/AsyncCreatePlaybookVersion.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class AsyncCreatePlaybookVersion { + + public static void main(String[] args) throws Exception { + asyncCreatePlaybookVersion(); + } + + public static void asyncCreatePlaybookVersion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + CreatePlaybookVersionRequest request = + CreatePlaybookVersionRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookVersion(PlaybookVersion.newBuilder().build()) + .build(); + ApiFuture future = + playbooksClient.createPlaybookVersionCallable().futureCall(request); + // Do something. + PlaybookVersion response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersion.java new file mode 100644 index 000000000000..45fe31cc6870 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersion.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_sync] +import com.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncCreatePlaybookVersion { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookVersion(); + } + + public static void syncCreatePlaybookVersion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + CreatePlaybookVersionRequest request = + CreatePlaybookVersionRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookVersion(PlaybookVersion.newBuilder().build()) + .build(); + PlaybookVersion response = playbooksClient.createPlaybookVersion(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersionPlaybooknamePlaybookversion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersionPlaybooknamePlaybookversion.java new file mode 100644 index 000000000000..71b013ca9e98 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersionPlaybooknamePlaybookversion.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_PlaybooknamePlaybookversion_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncCreatePlaybookVersionPlaybooknamePlaybookversion { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookVersionPlaybooknamePlaybookversion(); + } + + public static void syncCreatePlaybookVersionPlaybooknamePlaybookversion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + PlaybookVersion response = playbooksClient.createPlaybookVersion(parent, playbookVersion); + } + } +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_PlaybooknamePlaybookversion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersionStringPlaybookversion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersionStringPlaybookversion.java new file mode 100644 index 000000000000..abb2a71ba713 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/createplaybookversion/SyncCreatePlaybookVersionStringPlaybookversion.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_StringPlaybookversion_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncCreatePlaybookVersionStringPlaybookversion { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookVersionStringPlaybookversion(); + } + + public static void syncCreatePlaybookVersionStringPlaybookversion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String parent = + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + PlaybookVersion response = playbooksClient.createPlaybookVersion(parent, playbookVersion); + } + } +} +// [END dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_StringPlaybookversion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/AsyncDeletePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/AsyncDeletePlaybook.java new file mode 100644 index 000000000000..2f2d8c545393 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/AsyncDeletePlaybook.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_DeletePlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Empty; + +public class AsyncDeletePlaybook { + + public static void main(String[] args) throws Exception { + asyncDeletePlaybook(); + } + + public static void asyncDeletePlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + DeletePlaybookRequest request = + DeletePlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .build(); + ApiFuture future = playbooksClient.deletePlaybookCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybook.java new file mode 100644 index 000000000000..de55f5d09e53 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybook.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_DeletePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybook { + + public static void main(String[] args) throws Exception { + syncDeletePlaybook(); + } + + public static void syncDeletePlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + DeletePlaybookRequest request = + DeletePlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .build(); + playbooksClient.deletePlaybook(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybookPlaybookname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybookPlaybookname.java new file mode 100644 index 000000000000..227aaf0ce5d1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybookPlaybookname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_DeletePlaybook_Playbookname_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookPlaybookname { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookPlaybookname(); + } + + public static void syncDeletePlaybookPlaybookname() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + playbooksClient.deletePlaybook(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybook_Playbookname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybookString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybookString.java new file mode 100644 index 000000000000..02e236a75948 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybook/SyncDeletePlaybookString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_DeletePlaybook_String_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookString { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookString(); + } + + public static void syncDeletePlaybookString() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + playbooksClient.deletePlaybook(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybook_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/AsyncDeletePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/AsyncDeletePlaybookVersion.java new file mode 100644 index 000000000000..6f5137e8d6a2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/AsyncDeletePlaybookVersion.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Empty; + +public class AsyncDeletePlaybookVersion { + + public static void main(String[] args) throws Exception { + asyncDeletePlaybookVersion(); + } + + public static void asyncDeletePlaybookVersion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + DeletePlaybookVersionRequest request = + DeletePlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + ApiFuture future = playbooksClient.deletePlaybookVersionCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersion.java new file mode 100644 index 000000000000..90e834771e4c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersion.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_sync] +import com.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookVersion { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookVersion(); + } + + public static void syncDeletePlaybookVersion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + DeletePlaybookVersionRequest request = + DeletePlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + playbooksClient.deletePlaybookVersion(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionPlaybookversionname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionPlaybookversionname.java new file mode 100644 index 000000000000..6baebd71e611 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionPlaybookversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_Playbookversionname_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookVersionPlaybookversionname { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookVersionPlaybookversionname(); + } + + public static void syncDeletePlaybookVersionPlaybookversionname() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + playbooksClient.deletePlaybookVersion(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_Playbookversionname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionString.java new file mode 100644 index 000000000000..46f090b11c06 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_String_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookVersionString { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookVersionString(); + } + + public static void syncDeletePlaybookVersionString() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString(); + playbooksClient.deletePlaybookVersion(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/AsyncExportPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/AsyncExportPlaybook.java new file mode 100644 index 000000000000..1e91e1359550 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/AsyncExportPlaybook.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ExportPlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.longrunning.Operation; + +public class AsyncExportPlaybook { + + public static void main(String[] args) throws Exception { + asyncExportPlaybook(); + } + + public static void asyncExportPlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ExportPlaybookRequest request = + ExportPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookUri("playbookUri2118184975") + .build(); + ApiFuture future = playbooksClient.exportPlaybookCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_ExportPlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/AsyncExportPlaybookLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/AsyncExportPlaybookLRO.java new file mode 100644 index 000000000000..5b694a3363cc --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/AsyncExportPlaybookLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ExportPlaybook_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Struct; + +public class AsyncExportPlaybookLRO { + + public static void main(String[] args) throws Exception { + asyncExportPlaybookLRO(); + } + + public static void asyncExportPlaybookLRO() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ExportPlaybookRequest request = + ExportPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookUri("playbookUri2118184975") + .build(); + OperationFuture future = + playbooksClient.exportPlaybookOperationCallable().futureCall(request); + // Do something. + ExportPlaybookResponse response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_ExportPlaybook_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/SyncExportPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/SyncExportPlaybook.java new file mode 100644 index 000000000000..252641220ffe --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/exportplaybook/SyncExportPlaybook.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ExportPlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncExportPlaybook { + + public static void main(String[] args) throws Exception { + syncExportPlaybook(); + } + + public static void syncExportPlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ExportPlaybookRequest request = + ExportPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookUri("playbookUri2118184975") + .build(); + ExportPlaybookResponse response = playbooksClient.exportPlaybookAsync(request).get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_ExportPlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getlocation/AsyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..a9d54d8e4b2f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = playbooksClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetLocation_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getlocation/SyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..3b658fd1338b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetLocation_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = playbooksClient.getLocation(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetLocation_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/AsyncGetPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/AsyncGetPlaybook.java new file mode 100644 index 000000000000..0f312a253eb1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/AsyncGetPlaybook.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetPlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class AsyncGetPlaybook { + + public static void main(String[] args) throws Exception { + asyncGetPlaybook(); + } + + public static void asyncGetPlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetPlaybookRequest request = + GetPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .build(); + ApiFuture future = playbooksClient.getPlaybookCallable().futureCall(request); + // Do something. + Playbook response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybook.java new file mode 100644 index 000000000000..486a516cf4bd --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybook.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetPlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncGetPlaybook { + + public static void main(String[] args) throws Exception { + syncGetPlaybook(); + } + + public static void syncGetPlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetPlaybookRequest request = + GetPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .build(); + Playbook response = playbooksClient.getPlaybook(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybookPlaybookname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybookPlaybookname.java new file mode 100644 index 000000000000..76deed988f4e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybookPlaybookname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetPlaybook_Playbookname_sync] +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncGetPlaybookPlaybookname { + + public static void main(String[] args) throws Exception { + syncGetPlaybookPlaybookname(); + } + + public static void syncGetPlaybookPlaybookname() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Playbook response = playbooksClient.getPlaybook(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybook_Playbookname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybookString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybookString.java new file mode 100644 index 000000000000..98a704af3b88 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybook/SyncGetPlaybookString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetPlaybook_String_sync] +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncGetPlaybookString { + + public static void main(String[] args) throws Exception { + syncGetPlaybookString(); + } + + public static void syncGetPlaybookString() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + Playbook response = playbooksClient.getPlaybook(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybook_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/AsyncGetPlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/AsyncGetPlaybookVersion.java new file mode 100644 index 000000000000..a1d8eae19d92 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/AsyncGetPlaybookVersion.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetPlaybookVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class AsyncGetPlaybookVersion { + + public static void main(String[] args) throws Exception { + asyncGetPlaybookVersion(); + } + + public static void asyncGetPlaybookVersion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetPlaybookVersionRequest request = + GetPlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + ApiFuture future = + playbooksClient.getPlaybookVersionCallable().futureCall(request); + // Do something. + PlaybookVersion response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybookVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersion.java new file mode 100644 index 000000000000..21d4c0608e9c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersion.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetPlaybookVersion_sync] +import com.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncGetPlaybookVersion { + + public static void main(String[] args) throws Exception { + syncGetPlaybookVersion(); + } + + public static void syncGetPlaybookVersion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetPlaybookVersionRequest request = + GetPlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + PlaybookVersion response = playbooksClient.getPlaybookVersion(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybookVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersionPlaybookversionname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersionPlaybookversionname.java new file mode 100644 index 000000000000..61a0e9e8c503 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersionPlaybookversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetPlaybookVersion_Playbookversionname_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncGetPlaybookVersionPlaybookversionname { + + public static void main(String[] args) throws Exception { + syncGetPlaybookVersionPlaybookversionname(); + } + + public static void syncGetPlaybookVersionPlaybookversionname() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + PlaybookVersion response = playbooksClient.getPlaybookVersion(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybookVersion_Playbookversionname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersionString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersionString.java new file mode 100644 index 000000000000..c9071f8ee825 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/getplaybookversion/SyncGetPlaybookVersionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_GetPlaybookVersion_String_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncGetPlaybookVersionString { + + public static void main(String[] args) throws Exception { + syncGetPlaybookVersionString(); + } + + public static void syncGetPlaybookVersionString() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString(); + PlaybookVersion response = playbooksClient.getPlaybookVersion(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_GetPlaybookVersion_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/AsyncImportPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/AsyncImportPlaybook.java new file mode 100644 index 000000000000..ceeb2857f1b5 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/AsyncImportPlaybook.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ImportPlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.longrunning.Operation; + +public class AsyncImportPlaybook { + + public static void main(String[] args) throws Exception { + asyncImportPlaybook(); + } + + public static void asyncImportPlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ImportPlaybookRequest request = + ImportPlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setImportStrategy(PlaybookImportStrategy.newBuilder().build()) + .build(); + ApiFuture future = playbooksClient.importPlaybookCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_ImportPlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/AsyncImportPlaybookLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/AsyncImportPlaybookLRO.java new file mode 100644 index 000000000000..c907ca384db0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/AsyncImportPlaybookLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ImportPlaybook_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.Struct; + +public class AsyncImportPlaybookLRO { + + public static void main(String[] args) throws Exception { + asyncImportPlaybookLRO(); + } + + public static void asyncImportPlaybookLRO() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ImportPlaybookRequest request = + ImportPlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setImportStrategy(PlaybookImportStrategy.newBuilder().build()) + .build(); + OperationFuture future = + playbooksClient.importPlaybookOperationCallable().futureCall(request); + // Do something. + ImportPlaybookResponse response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_ImportPlaybook_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/SyncImportPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/SyncImportPlaybook.java new file mode 100644 index 000000000000..5b51e0990dbd --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/importplaybook/SyncImportPlaybook.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ImportPlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse; +import com.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncImportPlaybook { + + public static void main(String[] args) throws Exception { + syncImportPlaybook(); + } + + public static void syncImportPlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ImportPlaybookRequest request = + ImportPlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setImportStrategy(PlaybookImportStrategy.newBuilder().build()) + .build(); + ImportPlaybookResponse response = playbooksClient.importPlaybookAsync(request).get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_ImportPlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/AsyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..84fbb6ac2d52 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = playbooksClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListLocations_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/AsyncListLocationsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..887b2eb35ac4 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListLocations_Paged_async] +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = playbooksClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListLocations_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/SyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..4134b585841d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListLocations_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : playbooksClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListLocations_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/AsyncListPlaybooks.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/AsyncListPlaybooks.java new file mode 100644 index 000000000000..0baa47f2a1af --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/AsyncListPlaybooks.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybooks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class AsyncListPlaybooks { + + public static void main(String[] args) throws Exception { + asyncListPlaybooks(); + } + + public static void asyncListPlaybooks() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybooksRequest request = + ListPlaybooksRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = playbooksClient.listPlaybooksPagedCallable().futureCall(request); + // Do something. + for (Playbook element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybooks_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/AsyncListPlaybooksPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/AsyncListPlaybooksPaged.java new file mode 100644 index 000000000000..63181458f8a6 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/AsyncListPlaybooksPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybooks_Paged_async] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.common.base.Strings; + +public class AsyncListPlaybooksPaged { + + public static void main(String[] args) throws Exception { + asyncListPlaybooksPaged(); + } + + public static void asyncListPlaybooksPaged() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybooksRequest request = + ListPlaybooksRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPlaybooksResponse response = playbooksClient.listPlaybooksCallable().call(request); + for (Playbook element : response.getPlaybooksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybooks_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooks.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooks.java new file mode 100644 index 000000000000..a12ee31bbbce --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooks.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybooks_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncListPlaybooks { + + public static void main(String[] args) throws Exception { + syncListPlaybooks(); + } + + public static void syncListPlaybooks() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybooksRequest request = + ListPlaybooksRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Playbook element : playbooksClient.listPlaybooks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybooks_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooksAgentname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooksAgentname.java new file mode 100644 index 000000000000..f0a539f118d9 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooksAgentname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybooks_Agentname_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncListPlaybooksAgentname { + + public static void main(String[] args) throws Exception { + syncListPlaybooksAgentname(); + } + + public static void syncListPlaybooksAgentname() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + for (Playbook element : playbooksClient.listPlaybooks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybooks_Agentname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooksString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooksString.java new file mode 100644 index 000000000000..a1e81461073e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybooks/SyncListPlaybooksString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybooks_String_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncListPlaybooksString { + + public static void main(String[] args) throws Exception { + syncListPlaybooksString(); + } + + public static void syncListPlaybooksString() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + for (Playbook element : playbooksClient.listPlaybooks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybooks_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/AsyncListPlaybookVersions.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/AsyncListPlaybookVersions.java new file mode 100644 index 000000000000..cbcab7262b81 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/AsyncListPlaybookVersions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybookVersions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class AsyncListPlaybookVersions { + + public static void main(String[] args) throws Exception { + asyncListPlaybookVersions(); + } + + public static void asyncListPlaybookVersions() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + playbooksClient.listPlaybookVersionsPagedCallable().futureCall(request); + // Do something. + for (PlaybookVersion element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybookVersions_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/AsyncListPlaybookVersionsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/AsyncListPlaybookVersionsPaged.java new file mode 100644 index 000000000000..7a407fe17178 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/AsyncListPlaybookVersionsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybookVersions_Paged_async] +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.common.base.Strings; + +public class AsyncListPlaybookVersionsPaged { + + public static void main(String[] args) throws Exception { + asyncListPlaybookVersionsPaged(); + } + + public static void asyncListPlaybookVersionsPaged() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPlaybookVersionsResponse response = + playbooksClient.listPlaybookVersionsCallable().call(request); + for (PlaybookVersion element : response.getPlaybookVersionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybookVersions_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersions.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersions.java new file mode 100644 index 000000000000..378f0e70bcc1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybookVersions_sync] +import com.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncListPlaybookVersions { + + public static void main(String[] args) throws Exception { + syncListPlaybookVersions(); + } + + public static void syncListPlaybookVersions() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (PlaybookVersion element : playbooksClient.listPlaybookVersions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybookVersions_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersionsPlaybookname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersionsPlaybookname.java new file mode 100644 index 000000000000..f87d5869b113 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersionsPlaybookname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybookVersions_Playbookname_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncListPlaybookVersionsPlaybookname { + + public static void main(String[] args) throws Exception { + syncListPlaybookVersionsPlaybookname(); + } + + public static void syncListPlaybookVersionsPlaybookname() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + for (PlaybookVersion element : playbooksClient.listPlaybookVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybookVersions_Playbookname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersionsString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersionsString.java new file mode 100644 index 000000000000..2327f85c2e9b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/listplaybookversions/SyncListPlaybookVersionsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_ListPlaybookVersions_String_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookName; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; + +public class SyncListPlaybookVersionsString { + + public static void main(String[] args) throws Exception { + syncListPlaybookVersionsString(); + } + + public static void syncListPlaybookVersionsString() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String parent = + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + for (PlaybookVersion element : playbooksClient.listPlaybookVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Playbooks_ListPlaybookVersions_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/AsyncRestorePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/AsyncRestorePlaybookVersion.java new file mode 100644 index 000000000000..4bd9ff552b54 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/AsyncRestorePlaybookVersion.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; + +public class AsyncRestorePlaybookVersion { + + public static void main(String[] args) throws Exception { + asyncRestorePlaybookVersion(); + } + + public static void asyncRestorePlaybookVersion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + RestorePlaybookVersionRequest request = + RestorePlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + ApiFuture future = + playbooksClient.restorePlaybookVersionCallable().futureCall(request); + // Do something. + RestorePlaybookVersionResponse response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersion.java new file mode 100644 index 000000000000..14d1065c7197 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersion.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; + +public class SyncRestorePlaybookVersion { + + public static void main(String[] args) throws Exception { + syncRestorePlaybookVersion(); + } + + public static void syncRestorePlaybookVersion() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + RestorePlaybookVersionRequest request = + RestorePlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + RestorePlaybookVersionResponse response = playbooksClient.restorePlaybookVersion(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersionPlaybookversionname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersionPlaybookversionname.java new file mode 100644 index 000000000000..889f0a9d5d69 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersionPlaybookversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_Playbookversionname_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; + +public class SyncRestorePlaybookVersionPlaybookversionname { + + public static void main(String[] args) throws Exception { + syncRestorePlaybookVersionPlaybookversionname(); + } + + public static void syncRestorePlaybookVersionPlaybookversionname() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + RestorePlaybookVersionResponse response = playbooksClient.restorePlaybookVersion(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_Playbookversionname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersionString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersionString.java new file mode 100644 index 000000000000..b48d0e21bcfa --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/restoreplaybookversion/SyncRestorePlaybookVersionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_String_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; + +public class SyncRestorePlaybookVersionString { + + public static void main(String[] args) throws Exception { + syncRestorePlaybookVersionString(); + } + + public static void syncRestorePlaybookVersionString() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString(); + RestorePlaybookVersionResponse response = playbooksClient.restorePlaybookVersion(name); + } + } +} +// [END dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/AsyncUpdatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/AsyncUpdatePlaybook.java new file mode 100644 index 000000000000..486244c613f4 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/AsyncUpdatePlaybook.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_UpdatePlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePlaybook { + + public static void main(String[] args) throws Exception { + asyncUpdatePlaybook(); + } + + public static void asyncUpdatePlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + UpdatePlaybookRequest request = + UpdatePlaybookRequest.newBuilder() + .setPlaybook(Playbook.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = playbooksClient.updatePlaybookCallable().futureCall(request); + // Do something. + Playbook response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Playbooks_UpdatePlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/SyncUpdatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/SyncUpdatePlaybook.java new file mode 100644 index 000000000000..02f77cd55644 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/SyncUpdatePlaybook.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_UpdatePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePlaybook { + + public static void main(String[] args) throws Exception { + syncUpdatePlaybook(); + } + + public static void syncUpdatePlaybook() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + UpdatePlaybookRequest request = + UpdatePlaybookRequest.newBuilder() + .setPlaybook(Playbook.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Playbook response = playbooksClient.updatePlaybook(request); + } + } +} +// [END dialogflow_v3_generated_Playbooks_UpdatePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/SyncUpdatePlaybookPlaybookFieldmask.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/SyncUpdatePlaybookPlaybookFieldmask.java new file mode 100644 index 000000000000..4efbb4385ff5 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbooks/updateplaybook/SyncUpdatePlaybookPlaybookFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Playbooks_UpdatePlaybook_PlaybookFieldmask_sync] +import com.google.cloud.dialogflow.cx.v3.Playbook; +import com.google.cloud.dialogflow.cx.v3.PlaybooksClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePlaybookPlaybookFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdatePlaybookPlaybookFieldmask(); + } + + public static void syncUpdatePlaybookPlaybookFieldmask() 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + Playbook playbook = Playbook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Playbook response = playbooksClient.updatePlaybook(playbook, updateMask); + } + } +} +// [END dialogflow_v3_generated_Playbooks_UpdatePlaybook_PlaybookFieldmask_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbookssettings/createplaybook/SyncCreatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbookssettings/createplaybook/SyncCreatePlaybook.java new file mode 100644 index 000000000000..80dce860a853 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbookssettings/createplaybook/SyncCreatePlaybook.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_PlaybooksSettings_CreatePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.PlaybooksSettings; +import java.time.Duration; + +public class SyncCreatePlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybook(); + } + + public static void syncCreatePlaybook() 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 + PlaybooksSettings.Builder playbooksSettingsBuilder = PlaybooksSettings.newBuilder(); + playbooksSettingsBuilder + .createPlaybookSettings() + .setRetrySettings( + playbooksSettingsBuilder + .createPlaybookSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PlaybooksSettings playbooksSettings = playbooksSettingsBuilder.build(); + } +} +// [END dialogflow_v3_generated_PlaybooksSettings_CreatePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbookssettings/exportplaybook/SyncExportPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbookssettings/exportplaybook/SyncExportPlaybook.java new file mode 100644 index 000000000000..d85a5be761fb --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/playbookssettings/exportplaybook/SyncExportPlaybook.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_PlaybooksSettings_ExportPlaybook_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.dialogflow.cx.v3.PlaybooksSettings; +import java.time.Duration; + +public class SyncExportPlaybook { + + public static void main(String[] args) throws Exception { + syncExportPlaybook(); + } + + public static void syncExportPlaybook() 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 + PlaybooksSettings.Builder playbooksSettingsBuilder = PlaybooksSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + playbooksSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END dialogflow_v3_generated_PlaybooksSettings_ExportPlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/detectintent/AsyncDetectIntent.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/detectintent/AsyncDetectIntent.java index c46b58f8a847..52f8bfa94cda 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/detectintent/AsyncDetectIntent.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/detectintent/AsyncDetectIntent.java @@ -20,6 +20,7 @@ import com.google.api.core.ApiFuture; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView; import com.google.cloud.dialogflow.cx.v3.OutputAudioConfig; import com.google.cloud.dialogflow.cx.v3.QueryInput; import com.google.cloud.dialogflow.cx.v3.QueryParameters; @@ -48,6 +49,7 @@ public static void asyncDetectIntent() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); ApiFuture future = sessionsClient.detectIntentCallable().futureCall(request); diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/detectintent/SyncDetectIntent.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/detectintent/SyncDetectIntent.java index ced701f876a1..ea3afd6936a8 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/detectintent/SyncDetectIntent.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/detectintent/SyncDetectIntent.java @@ -19,6 +19,7 @@ // [START dialogflow_v3_generated_Sessions_DetectIntent_sync] import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView; import com.google.cloud.dialogflow.cx.v3.OutputAudioConfig; import com.google.cloud.dialogflow.cx.v3.QueryInput; import com.google.cloud.dialogflow.cx.v3.QueryParameters; @@ -47,6 +48,7 @@ public static void syncDetectIntent() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); DetectIntentResponse response = sessionsClient.detectIntent(request); } diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java index 1b5b404455f8..a251930b6fc1 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java @@ -20,6 +20,7 @@ import com.google.api.gax.rpc.ServerStream; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView; import com.google.cloud.dialogflow.cx.v3.OutputAudioConfig; import com.google.cloud.dialogflow.cx.v3.QueryInput; import com.google.cloud.dialogflow.cx.v3.QueryParameters; @@ -48,6 +49,7 @@ public static void asyncServerStreamingDetectIntent() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setQueryInput(QueryInput.newBuilder().build()) .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); ServerStream stream = sessionsClient.serverStreamingDetectIntentCallable().call(request); diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/streamingdetectintent/AsyncStreamingDetectIntent.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/streamingdetectintent/AsyncStreamingDetectIntent.java index 17b9a7c079d2..2a1d5d68427c 100644 --- a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/streamingdetectintent/AsyncStreamingDetectIntent.java +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/streamingdetectintent/AsyncStreamingDetectIntent.java @@ -18,6 +18,7 @@ // [START dialogflow_v3_generated_Sessions_StreamingDetectIntent_async] import com.google.api.gax.rpc.BidiStream; +import com.google.cloud.dialogflow.cx.v3.DetectIntentResponseView; import com.google.cloud.dialogflow.cx.v3.OutputAudioConfig; import com.google.cloud.dialogflow.cx.v3.QueryInput; import com.google.cloud.dialogflow.cx.v3.QueryParameters; @@ -52,6 +53,7 @@ public static void asyncStreamingDetectIntent() throws Exception { .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) .setEnablePartialResponse(true) .setEnableDebuggingInfo(true) + .setResponseView(DetectIntentResponseView.forNumber(0)) .build(); bidiStream.send(request); for (StreamingDetectIntentResponse response : bidiStream) { diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/examplesstubsettings/createexample/SyncCreateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/examplesstubsettings/createexample/SyncCreateExample.java new file mode 100644 index 000000000000..f83b52bb4d5f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/examplesstubsettings/createexample/SyncCreateExample.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.v3.stub.samples; + +// [START dialogflow_v3_generated_ExamplesStubSettings_CreateExample_sync] +import com.google.cloud.dialogflow.cx.v3.stub.ExamplesStubSettings; +import java.time.Duration; + +public class SyncCreateExample { + + public static void main(String[] args) throws Exception { + syncCreateExample(); + } + + public static void syncCreateExample() 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 + ExamplesStubSettings.Builder examplesSettingsBuilder = ExamplesStubSettings.newBuilder(); + examplesSettingsBuilder + .createExampleSettings() + .setRetrySettings( + examplesSettingsBuilder + .createExampleSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + ExamplesStubSettings examplesSettings = examplesSettingsBuilder.build(); + } +} +// [END dialogflow_v3_generated_ExamplesStubSettings_CreateExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/playbooksstubsettings/createplaybook/SyncCreatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/playbooksstubsettings/createplaybook/SyncCreatePlaybook.java new file mode 100644 index 000000000000..1480057b2a4b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/playbooksstubsettings/createplaybook/SyncCreatePlaybook.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.v3.stub.samples; + +// [START dialogflow_v3_generated_PlaybooksStubSettings_CreatePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3.stub.PlaybooksStubSettings; +import java.time.Duration; + +public class SyncCreatePlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybook(); + } + + public static void syncCreatePlaybook() 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 + PlaybooksStubSettings.Builder playbooksSettingsBuilder = PlaybooksStubSettings.newBuilder(); + playbooksSettingsBuilder + .createPlaybookSettings() + .setRetrySettings( + playbooksSettingsBuilder + .createPlaybookSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PlaybooksStubSettings playbooksSettings = playbooksSettingsBuilder.build(); + } +} +// [END dialogflow_v3_generated_PlaybooksStubSettings_CreatePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/playbooksstubsettings/exportplaybook/SyncExportPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/playbooksstubsettings/exportplaybook/SyncExportPlaybook.java new file mode 100644 index 000000000000..7cf4b965e9b7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/playbooksstubsettings/exportplaybook/SyncExportPlaybook.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.stub.samples; + +// [START dialogflow_v3_generated_PlaybooksStubSettings_ExportPlaybook_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.dialogflow.cx.v3.stub.PlaybooksStubSettings; +import java.time.Duration; + +public class SyncExportPlaybook { + + public static void main(String[] args) throws Exception { + syncExportPlaybook(); + } + + public static void syncExportPlaybook() 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 + PlaybooksStubSettings.Builder playbooksSettingsBuilder = PlaybooksStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + playbooksSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END dialogflow_v3_generated_PlaybooksStubSettings_ExportPlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/toolsstubsettings/createtool/SyncCreateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/toolsstubsettings/createtool/SyncCreateTool.java new file mode 100644 index 000000000000..863223c4f28c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/stub/toolsstubsettings/createtool/SyncCreateTool.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.v3.stub.samples; + +// [START dialogflow_v3_generated_ToolsStubSettings_CreateTool_sync] +import com.google.cloud.dialogflow.cx.v3.stub.ToolsStubSettings; +import java.time.Duration; + +public class SyncCreateTool { + + public static void main(String[] args) throws Exception { + syncCreateTool(); + } + + public static void syncCreateTool() 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 + ToolsStubSettings.Builder toolsSettingsBuilder = ToolsStubSettings.newBuilder(); + toolsSettingsBuilder + .createToolSettings() + .setRetrySettings( + toolsSettingsBuilder + .createToolSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + ToolsStubSettings toolsSettings = toolsSettingsBuilder.build(); + } +} +// [END dialogflow_v3_generated_ToolsStubSettings_CreateTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateSetCredentialsProvider.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..709730a9860b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.dialogflow.cx.v3.ToolsSettings; +import com.google.cloud.dialogflow.cx.v3.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + ToolsSettings toolsSettings = + ToolsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ToolsClient toolsClient = ToolsClient.create(toolsSettings); + } +} +// [END dialogflow_v3_generated_Tools_Create_SetCredentialsProvider_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateSetEndpoint.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..acaf30c2856c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateSetEndpoint.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_Create_SetEndpoint_sync] +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.dialogflow.cx.v3.ToolsSettings; +import com.google.cloud.dialogflow.cx.v3.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + ToolsSettings toolsSettings = ToolsSettings.newBuilder().setEndpoint(myEndpoint).build(); + ToolsClient toolsClient = ToolsClient.create(toolsSettings); + } +} +// [END dialogflow_v3_generated_Tools_Create_SetEndpoint_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateUseHttpJsonTransport.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..bddf34a455a4 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,39 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_Create_UseHttpJsonTransport_sync] +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.dialogflow.cx.v3.ToolsSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + ToolsSettings toolsSettings = ToolsSettings.newHttpJsonBuilder().build(); + ToolsClient toolsClient = ToolsClient.create(toolsSettings); + } +} +// [END dialogflow_v3_generated_Tools_Create_UseHttpJsonTransport_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/AsyncCreateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/AsyncCreateTool.java new file mode 100644 index 000000000000..9d2c6ac28ad0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/AsyncCreateTool.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_CreateTool_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class AsyncCreateTool { + + public static void main(String[] args) throws Exception { + asyncCreateTool(); + } + + public static void asyncCreateTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + CreateToolRequest request = + CreateToolRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTool(Tool.newBuilder().build()) + .build(); + ApiFuture future = toolsClient.createToolCallable().futureCall(request); + // Do something. + Tool response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_CreateTool_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateTool.java new file mode 100644 index 000000000000..df65d45fbd8c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateTool.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_CreateTool_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncCreateTool { + + public static void main(String[] args) throws Exception { + syncCreateTool(); + } + + public static void syncCreateTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + CreateToolRequest request = + CreateToolRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTool(Tool.newBuilder().build()) + .build(); + Tool response = toolsClient.createTool(request); + } + } +} +// [END dialogflow_v3_generated_Tools_CreateTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateToolAgentnameTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateToolAgentnameTool.java new file mode 100644 index 000000000000..9495004bd9f3 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateToolAgentnameTool.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_CreateTool_AgentnameTool_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncCreateToolAgentnameTool { + + public static void main(String[] args) throws Exception { + syncCreateToolAgentnameTool(); + } + + public static void syncCreateToolAgentnameTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + Tool response = toolsClient.createTool(parent, tool); + } + } +} +// [END dialogflow_v3_generated_Tools_CreateTool_AgentnameTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateToolStringTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateToolStringTool.java new file mode 100644 index 000000000000..2bb44b1ca11d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtool/SyncCreateToolStringTool.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_CreateTool_StringTool_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncCreateToolStringTool { + + public static void main(String[] args) throws Exception { + syncCreateToolStringTool(); + } + + public static void syncCreateToolStringTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + Tool tool = Tool.newBuilder().build(); + Tool response = toolsClient.createTool(parent, tool); + } + } +} +// [END dialogflow_v3_generated_Tools_CreateTool_StringTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/AsyncCreateToolVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/AsyncCreateToolVersion.java new file mode 100644 index 000000000000..694e4fac4163 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/AsyncCreateToolVersion.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_CreateToolVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class AsyncCreateToolVersion { + + public static void main(String[] args) throws Exception { + asyncCreateToolVersion(); + } + + public static void asyncCreateToolVersion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + CreateToolVersionRequest request = + CreateToolVersionRequest.newBuilder() + .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setToolVersion(ToolVersion.newBuilder().build()) + .build(); + ApiFuture future = toolsClient.createToolVersionCallable().futureCall(request); + // Do something. + ToolVersion response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_CreateToolVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersion.java new file mode 100644 index 000000000000..b51243fd0735 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersion.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_CreateToolVersion_sync] +import com.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncCreateToolVersion { + + public static void main(String[] args) throws Exception { + syncCreateToolVersion(); + } + + public static void syncCreateToolVersion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + CreateToolVersionRequest request = + CreateToolVersionRequest.newBuilder() + .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setToolVersion(ToolVersion.newBuilder().build()) + .build(); + ToolVersion response = toolsClient.createToolVersion(request); + } + } +} +// [END dialogflow_v3_generated_Tools_CreateToolVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersionStringToolversion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersionStringToolversion.java new file mode 100644 index 000000000000..d3bce07b9de5 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersionStringToolversion.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_CreateToolVersion_StringToolversion_sync] +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncCreateToolVersionStringToolversion { + + public static void main(String[] args) throws Exception { + syncCreateToolVersionStringToolversion(); + } + + public static void syncCreateToolVersionStringToolversion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString(); + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + ToolVersion response = toolsClient.createToolVersion(parent, toolVersion); + } + } +} +// [END dialogflow_v3_generated_Tools_CreateToolVersion_StringToolversion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersionToolnameToolversion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersionToolnameToolversion.java new file mode 100644 index 000000000000..c36f18bbabb0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/createtoolversion/SyncCreateToolVersionToolnameToolversion.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_CreateToolVersion_ToolnameToolversion_sync] +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncCreateToolVersionToolnameToolversion { + + public static void main(String[] args) throws Exception { + syncCreateToolVersionToolnameToolversion(); + } + + public static void syncCreateToolVersionToolnameToolversion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + ToolVersion toolVersion = ToolVersion.newBuilder().build(); + ToolVersion response = toolsClient.createToolVersion(parent, toolVersion); + } + } +} +// [END dialogflow_v3_generated_Tools_CreateToolVersion_ToolnameToolversion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/AsyncDeleteTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/AsyncDeleteTool.java new file mode 100644 index 000000000000..8e058e501416 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/AsyncDeleteTool.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_DeleteTool_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteTool { + + public static void main(String[] args) throws Exception { + asyncDeleteTool(); + } + + public static void asyncDeleteTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + DeleteToolRequest request = + DeleteToolRequest.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setForce(true) + .build(); + ApiFuture future = toolsClient.deleteToolCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_DeleteTool_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteTool.java new file mode 100644 index 000000000000..fe2a145e663a --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteTool.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_DeleteTool_sync] +import com.google.cloud.dialogflow.cx.v3.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteTool { + + public static void main(String[] args) throws Exception { + syncDeleteTool(); + } + + public static void syncDeleteTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + DeleteToolRequest request = + DeleteToolRequest.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setForce(true) + .build(); + toolsClient.deleteTool(request); + } + } +} +// [END dialogflow_v3_generated_Tools_DeleteTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteToolString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteToolString.java new file mode 100644 index 000000000000..6ad4df282a77 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteToolString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_DeleteTool_String_sync] +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteToolString { + + public static void main(String[] args) throws Exception { + syncDeleteToolString(); + } + + public static void syncDeleteToolString() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString(); + toolsClient.deleteTool(name); + } + } +} +// [END dialogflow_v3_generated_Tools_DeleteTool_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteToolToolname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteToolToolname.java new file mode 100644 index 000000000000..5e93885294e1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetool/SyncDeleteToolToolname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_DeleteTool_Toolname_sync] +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteToolToolname { + + public static void main(String[] args) throws Exception { + syncDeleteToolToolname(); + } + + public static void syncDeleteToolToolname() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + toolsClient.deleteTool(name); + } + } +} +// [END dialogflow_v3_generated_Tools_DeleteTool_Toolname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/AsyncDeleteToolVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/AsyncDeleteToolVersion.java new file mode 100644 index 000000000000..479dbd1c4955 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/AsyncDeleteToolVersion.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_DeleteToolVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteToolVersion { + + public static void main(String[] args) throws Exception { + asyncDeleteToolVersion(); + } + + public static void asyncDeleteToolVersion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + DeleteToolVersionRequest request = + DeleteToolVersionRequest.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setForce(true) + .build(); + ApiFuture future = toolsClient.deleteToolVersionCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_DeleteToolVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersion.java new file mode 100644 index 000000000000..44ac83e9d46b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersion.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_DeleteToolVersion_sync] +import com.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteToolVersion { + + public static void main(String[] args) throws Exception { + syncDeleteToolVersion(); + } + + public static void syncDeleteToolVersion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + DeleteToolVersionRequest request = + DeleteToolVersionRequest.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .setForce(true) + .build(); + toolsClient.deleteToolVersion(request); + } + } +} +// [END dialogflow_v3_generated_Tools_DeleteToolVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersionString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersionString.java new file mode 100644 index 000000000000..f5c6c685eb2e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_DeleteToolVersion_String_sync] +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteToolVersionString { + + public static void main(String[] args) throws Exception { + syncDeleteToolVersionString(); + } + + public static void syncDeleteToolVersionString() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString(); + toolsClient.deleteToolVersion(name); + } + } +} +// [END dialogflow_v3_generated_Tools_DeleteToolVersion_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersionToolversionname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersionToolversionname.java new file mode 100644 index 000000000000..b680d7c0c6f7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/deletetoolversion/SyncDeleteToolVersionToolversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_DeleteToolVersion_Toolversionname_sync] +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteToolVersionToolversionname { + + public static void main(String[] args) throws Exception { + syncDeleteToolVersionToolversionname(); + } + + public static void syncDeleteToolVersionToolversionname() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + toolsClient.deleteToolVersion(name); + } + } +} +// [END dialogflow_v3_generated_Tools_DeleteToolVersion_Toolversionname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/getlocation/AsyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..9edff0450bcd --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = toolsClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_GetLocation_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/getlocation/SyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..6ebd86311844 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetLocation_sync] +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = toolsClient.getLocation(request); + } + } +} +// [END dialogflow_v3_generated_Tools_GetLocation_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/AsyncGetTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/AsyncGetTool.java new file mode 100644 index 000000000000..b13e8ab251e9 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/AsyncGetTool.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetTool_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class AsyncGetTool { + + public static void main(String[] args) throws Exception { + asyncGetTool(); + } + + public static void asyncGetTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetToolRequest request = + GetToolRequest.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .build(); + ApiFuture future = toolsClient.getToolCallable().futureCall(request); + // Do something. + Tool response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_GetTool_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetTool.java new file mode 100644 index 000000000000..6db87524824b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetTool.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetTool_sync] +import com.google.cloud.dialogflow.cx.v3.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncGetTool { + + public static void main(String[] args) throws Exception { + syncGetTool(); + } + + public static void syncGetTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetToolRequest request = + GetToolRequest.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .build(); + Tool response = toolsClient.getTool(request); + } + } +} +// [END dialogflow_v3_generated_Tools_GetTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetToolString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetToolString.java new file mode 100644 index 000000000000..da1c4ae13a3b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetToolString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetTool_String_sync] +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncGetToolString { + + public static void main(String[] args) throws Exception { + syncGetToolString(); + } + + public static void syncGetToolString() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString(); + Tool response = toolsClient.getTool(name); + } + } +} +// [END dialogflow_v3_generated_Tools_GetTool_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetToolToolname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetToolToolname.java new file mode 100644 index 000000000000..fae8e0b2982a --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettool/SyncGetToolToolname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetTool_Toolname_sync] +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncGetToolToolname { + + public static void main(String[] args) throws Exception { + syncGetToolToolname(); + } + + public static void syncGetToolToolname() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + Tool response = toolsClient.getTool(name); + } + } +} +// [END dialogflow_v3_generated_Tools_GetTool_Toolname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/AsyncGetToolVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/AsyncGetToolVersion.java new file mode 100644 index 000000000000..465c4ec55ef0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/AsyncGetToolVersion.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetToolVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class AsyncGetToolVersion { + + public static void main(String[] args) throws Exception { + asyncGetToolVersion(); + } + + public static void asyncGetToolVersion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetToolVersionRequest request = + GetToolVersionRequest.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .build(); + ApiFuture future = toolsClient.getToolVersionCallable().futureCall(request); + // Do something. + ToolVersion response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_GetToolVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersion.java new file mode 100644 index 000000000000..e73f97158bb3 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersion.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetToolVersion_sync] +import com.google.cloud.dialogflow.cx.v3.GetToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncGetToolVersion { + + public static void main(String[] args) throws Exception { + syncGetToolVersion(); + } + + public static void syncGetToolVersion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetToolVersionRequest request = + GetToolVersionRequest.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .build(); + ToolVersion response = toolsClient.getToolVersion(request); + } + } +} +// [END dialogflow_v3_generated_Tools_GetToolVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersionString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersionString.java new file mode 100644 index 000000000000..21f693b547f6 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetToolVersion_String_sync] +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncGetToolVersionString { + + public static void main(String[] args) throws Exception { + syncGetToolVersionString(); + } + + public static void syncGetToolVersionString() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString(); + ToolVersion response = toolsClient.getToolVersion(name); + } + } +} +// [END dialogflow_v3_generated_Tools_GetToolVersion_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersionToolversionname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersionToolversionname.java new file mode 100644 index 000000000000..e6643d611bea --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/gettoolversion/SyncGetToolVersionToolversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_GetToolVersion_Toolversionname_sync] +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncGetToolVersionToolversionname { + + public static void main(String[] args) throws Exception { + syncGetToolVersionToolversionname(); + } + + public static void syncGetToolVersionToolversionname() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + ToolVersion response = toolsClient.getToolVersion(name); + } + } +} +// [END dialogflow_v3_generated_Tools_GetToolVersion_Toolversionname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/AsyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..a74cd4979179 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = toolsClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListLocations_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/AsyncListLocationsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..50aa75d51cdf --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListLocations_Paged_async] +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = toolsClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListLocations_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/SyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..e43e63d2c0ee --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListLocations_sync] +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : toolsClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListLocations_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/AsyncListTools.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/AsyncListTools.java new file mode 100644 index 000000000000..cf139e577fc6 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/AsyncListTools.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListTools_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class AsyncListTools { + + public static void main(String[] args) throws Exception { + asyncListTools(); + } + + public static void asyncListTools() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolsRequest request = + ListToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = toolsClient.listToolsPagedCallable().futureCall(request); + // Do something. + for (Tool element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListTools_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/AsyncListToolsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/AsyncListToolsPaged.java new file mode 100644 index 000000000000..f6ee8283af23 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/AsyncListToolsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListTools_Paged_async] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.common.base.Strings; + +public class AsyncListToolsPaged { + + public static void main(String[] args) throws Exception { + asyncListToolsPaged(); + } + + public static void asyncListToolsPaged() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolsRequest request = + ListToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListToolsResponse response = toolsClient.listToolsCallable().call(request); + for (Tool element : response.getToolsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListTools_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListTools.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListTools.java new file mode 100644 index 000000000000..f535fb9f7e7c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListTools.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListTools_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncListTools { + + public static void main(String[] args) throws Exception { + syncListTools(); + } + + public static void syncListTools() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolsRequest request = + ListToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Tool element : toolsClient.listTools(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListTools_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListToolsAgentname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListToolsAgentname.java new file mode 100644 index 000000000000..16cb9caa3adf --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListToolsAgentname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListTools_Agentname_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncListToolsAgentname { + + public static void main(String[] args) throws Exception { + syncListToolsAgentname(); + } + + public static void syncListToolsAgentname() 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 (ToolsClient toolsClient = ToolsClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + for (Tool element : toolsClient.listTools(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListTools_Agentname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListToolsString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListToolsString.java new file mode 100644 index 000000000000..2971d4c1b10e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtools/SyncListToolsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListTools_String_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncListToolsString { + + public static void main(String[] args) throws Exception { + syncListToolsString(); + } + + public static void syncListToolsString() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + for (Tool element : toolsClient.listTools(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListTools_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/AsyncListToolVersions.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/AsyncListToolVersions.java new file mode 100644 index 000000000000..55465c5ae11b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/AsyncListToolVersions.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListToolVersions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class AsyncListToolVersions { + + public static void main(String[] args) throws Exception { + asyncListToolVersions(); + } + + public static void asyncListToolVersions() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolVersionsRequest request = + ListToolVersionsRequest.newBuilder() + .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + toolsClient.listToolVersionsPagedCallable().futureCall(request); + // Do something. + for (ToolVersion element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListToolVersions_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/AsyncListToolVersionsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/AsyncListToolVersionsPaged.java new file mode 100644 index 000000000000..eb087a2d2d6d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/AsyncListToolVersionsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListToolVersions_Paged_async] +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.common.base.Strings; + +public class AsyncListToolVersionsPaged { + + public static void main(String[] args) throws Exception { + asyncListToolVersionsPaged(); + } + + public static void asyncListToolVersionsPaged() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolVersionsRequest request = + ListToolVersionsRequest.newBuilder() + .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListToolVersionsResponse response = toolsClient.listToolVersionsCallable().call(request); + for (ToolVersion element : response.getToolVersionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListToolVersions_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersions.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersions.java new file mode 100644 index 000000000000..4a7ec9f5dbce --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersions.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListToolVersions_sync] +import com.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncListToolVersions { + + public static void main(String[] args) throws Exception { + syncListToolVersions(); + } + + public static void syncListToolVersions() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolVersionsRequest request = + ListToolVersionsRequest.newBuilder() + .setParent(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ToolVersion element : toolsClient.listToolVersions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListToolVersions_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersionsString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersionsString.java new file mode 100644 index 000000000000..ee9208431253 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersionsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListToolVersions_String_sync] +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncListToolVersionsString { + + public static void main(String[] args) throws Exception { + syncListToolVersionsString(); + } + + public static void syncListToolVersionsString() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString(); + for (ToolVersion element : toolsClient.listToolVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListToolVersions_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersionsToolname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersionsToolname.java new file mode 100644 index 000000000000..6eea03ee025f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/listtoolversions/SyncListToolVersionsToolname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_ListToolVersions_Toolname_sync] +import com.google.cloud.dialogflow.cx.v3.ToolName; +import com.google.cloud.dialogflow.cx.v3.ToolVersion; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncListToolVersionsToolname { + + public static void main(String[] args) throws Exception { + syncListToolVersionsToolname(); + } + + public static void syncListToolVersionsToolname() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolName parent = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + for (ToolVersion element : toolsClient.listToolVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3_generated_Tools_ListToolVersions_Toolname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/AsyncRestoreToolVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/AsyncRestoreToolVersion.java new file mode 100644 index 000000000000..cefbfff176a7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/AsyncRestoreToolVersion.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_RestoreToolVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class AsyncRestoreToolVersion { + + public static void main(String[] args) throws Exception { + asyncRestoreToolVersion(); + } + + public static void asyncRestoreToolVersion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + RestoreToolVersionRequest request = + RestoreToolVersionRequest.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .build(); + ApiFuture future = + toolsClient.restoreToolVersionCallable().futureCall(request); + // Do something. + RestoreToolVersionResponse response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_RestoreToolVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersion.java new file mode 100644 index 000000000000..cebcfdba9110 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersion.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_RestoreToolVersion_sync] +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncRestoreToolVersion { + + public static void main(String[] args) throws Exception { + syncRestoreToolVersion(); + } + + public static void syncRestoreToolVersion() 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 (ToolsClient toolsClient = ToolsClient.create()) { + RestoreToolVersionRequest request = + RestoreToolVersionRequest.newBuilder() + .setName( + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString()) + .build(); + RestoreToolVersionResponse response = toolsClient.restoreToolVersion(request); + } + } +} +// [END dialogflow_v3_generated_Tools_RestoreToolVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersionString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersionString.java new file mode 100644 index 000000000000..47b1d5467c3e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_RestoreToolVersion_String_sync] +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncRestoreToolVersionString { + + public static void main(String[] args) throws Exception { + syncRestoreToolVersionString(); + } + + public static void syncRestoreToolVersionString() 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 (ToolsClient toolsClient = ToolsClient.create()) { + String name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]") + .toString(); + RestoreToolVersionResponse response = toolsClient.restoreToolVersion(name); + } + } +} +// [END dialogflow_v3_generated_Tools_RestoreToolVersion_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersionToolversionname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersionToolversionname.java new file mode 100644 index 000000000000..3bb7bb107ff2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/restoretoolversion/SyncRestoreToolVersionToolversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_RestoreToolVersion_Toolversionname_sync] +import com.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; +import com.google.cloud.dialogflow.cx.v3.ToolVersionName; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; + +public class SyncRestoreToolVersionToolversionname { + + public static void main(String[] args) throws Exception { + syncRestoreToolVersionToolversionname(); + } + + public static void syncRestoreToolVersionToolversionname() 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolVersionName name = + ToolVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]", "[VERSION]"); + RestoreToolVersionResponse response = toolsClient.restoreToolVersion(name); + } + } +} +// [END dialogflow_v3_generated_Tools_RestoreToolVersion_Toolversionname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/AsyncUpdateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/AsyncUpdateTool.java new file mode 100644 index 000000000000..5ca389b59854 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/AsyncUpdateTool.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_UpdateTool_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.dialogflow.cx.v3.UpdateToolRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateTool { + + public static void main(String[] args) throws Exception { + asyncUpdateTool(); + } + + public static void asyncUpdateTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + UpdateToolRequest request = + UpdateToolRequest.newBuilder() + .setTool(Tool.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = toolsClient.updateToolCallable().futureCall(request); + // Do something. + Tool response = future.get(); + } + } +} +// [END dialogflow_v3_generated_Tools_UpdateTool_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/SyncUpdateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/SyncUpdateTool.java new file mode 100644 index 000000000000..1f75fb9519bd --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/SyncUpdateTool.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_UpdateTool_sync] +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.cloud.dialogflow.cx.v3.UpdateToolRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateTool { + + public static void main(String[] args) throws Exception { + syncUpdateTool(); + } + + public static void syncUpdateTool() 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 (ToolsClient toolsClient = ToolsClient.create()) { + UpdateToolRequest request = + UpdateToolRequest.newBuilder() + .setTool(Tool.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Tool response = toolsClient.updateTool(request); + } + } +} +// [END dialogflow_v3_generated_Tools_UpdateTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/SyncUpdateToolToolFieldmask.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/SyncUpdateToolToolFieldmask.java new file mode 100644 index 000000000000..06fe5e771de1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/tools/updatetool/SyncUpdateToolToolFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_Tools_UpdateTool_ToolFieldmask_sync] +import com.google.cloud.dialogflow.cx.v3.Tool; +import com.google.cloud.dialogflow.cx.v3.ToolsClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateToolToolFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateToolToolFieldmask(); + } + + public static void syncUpdateToolToolFieldmask() 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 (ToolsClient toolsClient = ToolsClient.create()) { + Tool tool = Tool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Tool response = toolsClient.updateTool(tool, updateMask); + } + } +} +// [END dialogflow_v3_generated_Tools_UpdateTool_ToolFieldmask_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/toolssettings/createtool/SyncCreateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/toolssettings/createtool/SyncCreateTool.java new file mode 100644 index 000000000000..c25a7299ffd0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/toolssettings/createtool/SyncCreateTool.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.v3.samples; + +// [START dialogflow_v3_generated_ToolsSettings_CreateTool_sync] +import com.google.cloud.dialogflow.cx.v3.ToolsSettings; +import java.time.Duration; + +public class SyncCreateTool { + + public static void main(String[] args) throws Exception { + syncCreateTool(); + } + + public static void syncCreateTool() 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 + ToolsSettings.Builder toolsSettingsBuilder = ToolsSettings.newBuilder(); + toolsSettingsBuilder + .createToolSettings() + .setRetrySettings( + toolsSettingsBuilder + .createToolSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + ToolsSettings toolsSettings = toolsSettingsBuilder.build(); + } +} +// [END dialogflow_v3_generated_ToolsSettings_CreateTool_sync] diff --git a/java-run/README.md b/java-run/README.md index 575c926ac59b..40cba5c76c4d 100644 --- a/java-run/README.md +++ b/java-run/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-run - 0.81.0 + 0.82.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-run:0.81.0' +implementation 'com.google.cloud:google-cloud-run:0.82.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-run" % "0.81.0" +libraryDependencies += "com.google.cloud" % "google-cloud-run" % "0.82.0" ``` ## Authentication @@ -181,7 +181,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-run/latest/overview [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-run.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.81.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.82.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/InstancesClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/InstancesClient.java new file mode 100644 index 000000000000..8670553cbb55 --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/InstancesClient.java @@ -0,0 +1,1290 @@ +/* + * Copyright 2026 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.run.v2; + +import com.google.api.core.ApiFuture; +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.run.v2.stub.InstancesStub; +import com.google.cloud.run.v2.stub.InstancesStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The Cloud Run Instances API allows you to manage Cloud Run Instances. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (InstancesClient instancesClient = InstancesClient.create()) {
+ *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ *   Instance response = instancesClient.getInstance(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the InstancesClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateInstance

Creates an Instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createInstanceAsync(CreateInstanceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createInstanceAsync(LocationName parent, Instance instance) + *

  • createInstanceAsync(String parent, Instance instance) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createInstanceOperationCallable() + *

  • createInstanceCallable() + *

+ *

DeleteInstance

Deletes a Instance

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteInstanceAsync(DeleteInstanceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteInstanceAsync(InstanceName name) + *

  • deleteInstanceAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteInstanceOperationCallable() + *

  • deleteInstanceCallable() + *

+ *

GetInstance

Gets a Instance

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getInstance(GetInstanceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getInstance(InstanceName name) + *

  • getInstance(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getInstanceCallable() + *

+ *

ListInstances

Lists Instances. Results are sorted by creation time, descending.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listInstances(ListInstancesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listInstances(LocationName parent) + *

  • listInstances(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listInstancesPagedCallable() + *

  • listInstancesCallable() + *

+ *

StopInstance

Stops an Instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • stopInstanceAsync(StopInstanceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • stopInstanceAsync(InstanceName name) + *

  • stopInstanceAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • stopInstanceOperationCallable() + *

  • stopInstanceCallable() + *

+ *

StartInstance

Starts an Instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • startInstanceAsync(StartInstanceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • startInstanceAsync(InstanceName name) + *

  • startInstanceAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • startInstanceOperationCallable() + *

  • startInstanceCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of InstancesSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@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
+ * InstancesSettings instancesSettings =
+ *     InstancesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * InstancesClient instancesClient = InstancesClient.create(instancesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * InstancesSettings instancesSettings =
+ *     InstancesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * InstancesClient instancesClient = InstancesClient.create(instancesSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * InstancesSettings instancesSettings = InstancesSettings.newHttpJsonBuilder().build();
+ * InstancesClient instancesClient = InstancesClient.create(instancesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class InstancesClient implements BackgroundResource { + private final InstancesSettings settings; + private final InstancesStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of InstancesClient with default settings. */ + public static final InstancesClient create() throws IOException { + return create(InstancesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of InstancesClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final InstancesClient create(InstancesSettings settings) throws IOException { + return new InstancesClient(settings); + } + + /** + * Constructs an instance of InstancesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(InstancesSettings). + */ + public static final InstancesClient create(InstancesStub stub) { + return new InstancesClient(stub); + } + + /** + * Constructs an instance of InstancesClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected InstancesClient(InstancesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((InstancesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected InstancesClient(InstancesStub 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 InstancesSettings getSettings() { + return settings; + } + + public InstancesStub 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. + /** + * Creates an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Instance instance = Instance.newBuilder().build();
+   *   Instance response = instancesClient.createInstanceAsync(parent, instance).get();
+   * }
+   * }
+ * + * @param parent + * @param instance + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + LocationName parent, Instance instance) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInstance(instance) + .build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Instance instance = Instance.newBuilder().build();
+   *   Instance response = instancesClient.createInstanceAsync(parent, instance).get();
+   * }
+   * }
+ * + * @param parent + * @param instance + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + String parent, Instance instance) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder().setParent(parent).setInstance(instance).build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setInstanceId("instanceId902024336")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   Instance response = instancesClient.createInstanceAsync(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 createInstanceAsync( + CreateInstanceRequest request) { + return createInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setInstanceId("instanceId902024336")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       instancesClient.createInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createInstanceOperationCallable() { + return stub.createInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setInstanceId("instanceId902024336")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = instancesClient.createInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createInstanceCallable() { + return stub.createInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   Instance response = instancesClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(InstanceName name) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   Instance response = instancesClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(String name) { + DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   Instance response = instancesClient.deleteInstanceAsync(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 deleteInstanceAsync( + DeleteInstanceRequest request) { + return deleteInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       instancesClient.deleteInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteInstanceOperationCallable() { + return stub.deleteInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future = instancesClient.deleteInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteInstanceCallable() { + return stub.deleteInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   Instance response = instancesClient.getInstance(name);
+   * }
+   * }
+ * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(InstanceName name) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   Instance response = instancesClient.getInstance(name);
+   * }
+   * }
+ * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(String name) { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   Instance response = instancesClient.getInstance(request);
+   * }
+   * }
+ * + * @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 Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Instance + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   ApiFuture future = instancesClient.getInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInstanceCallable() { + return stub.getInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances. Results are sorted by creation time, descending. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Instance element : instancesClient.listInstances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The location and project to list resources on. Format: + * projects/{project}/locations/{location}, where {project} can be project id or number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(LocationName parent) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances. Results are sorted by creation time, descending. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Instance element : instancesClient.listInstances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The location and project to list resources on. Format: + * projects/{project}/locations/{location}, where {project} can be project id or number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(String parent) { + ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances. Results are sorted by creation time, descending. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (Instance element : instancesClient.listInstances(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListInstancesPagedResponse listInstances(ListInstancesRequest request) { + return listInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances. Results are sorted by creation time, descending. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future = instancesClient.listInstancesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Instance element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancesPagedCallable() { + return stub.listInstancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances. Results are sorted by creation time, descending. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   while (true) {
+   *     ListInstancesResponse response = instancesClient.listInstancesCallable().call(request);
+   *     for (Instance element : response.getInstancesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listInstancesCallable() { + return stub.listInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   Instance response = instancesClient.stopInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Instance to stop. Format: + * `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be + * project id or number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture stopInstanceAsync(InstanceName name) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return stopInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   Instance response = instancesClient.stopInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Instance to stop. Format: + * `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be + * project id or number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture stopInstanceAsync(String name) { + StopInstanceRequest request = StopInstanceRequest.newBuilder().setName(name).build(); + return stopInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   StopInstanceRequest request =
+   *       StopInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   Instance response = instancesClient.stopInstanceAsync(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 stopInstanceAsync(StopInstanceRequest request) { + return stopInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   StopInstanceRequest request =
+   *       StopInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       instancesClient.stopInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + stopInstanceOperationCallable() { + return stub.stopInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   StopInstanceRequest request =
+   *       StopInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future = instancesClient.stopInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable stopInstanceCallable() { + return stub.stopInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   Instance response = instancesClient.startInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Instance to stop. Format: + * `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be + * project id or number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture startInstanceAsync(InstanceName name) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return startInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   Instance response = instancesClient.startInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Instance to stop. Format: + * `projects/{project}/locations/{location}/instances/{instance}`, where `{project}` can be + * project id or number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture startInstanceAsync(String name) { + StartInstanceRequest request = StartInstanceRequest.newBuilder().setName(name).build(); + return startInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   StartInstanceRequest request =
+   *       StartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   Instance response = instancesClient.startInstanceAsync(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 startInstanceAsync( + StartInstanceRequest request) { + return startInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   StartInstanceRequest request =
+   *       StartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       instancesClient.startInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + startInstanceOperationCallable() { + return stub.startInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts an Instance. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+   *   StartInstanceRequest request =
+   *       StartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future = instancesClient.startInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable startInstanceCallable() { + return stub.startInstanceCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListInstancesPagedResponse + extends AbstractPagedListResponse< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInstancesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInstancesPagedResponse(ListInstancesPage page) { + super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancesPage + extends AbstractPage< + ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { + + private ListInstancesPage( + PageContext context, + ListInstancesResponse response) { + super(context, response); + } + + private static ListInstancesPage createEmptyPage() { + return new ListInstancesPage(null, null); + } + + @Override + protected ListInstancesPage createPage( + PageContext context, + ListInstancesResponse response) { + return new ListInstancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + private ListInstancesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancesFixedSizeCollection createEmptyCollection() { + return new ListInstancesFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/InstancesSettings.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/InstancesSettings.java new file mode 100644 index 000000000000..72e043651f45 --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/InstancesSettings.java @@ -0,0 +1,344 @@ +/* + * Copyright 2026 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.run.v2; + +import static com.google.cloud.run.v2.InstancesClient.ListInstancesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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; +import com.google.cloud.run.v2.stub.InstancesStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link InstancesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (run.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getInstance: + * + *

{@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
+ * InstancesSettings.Builder instancesSettingsBuilder = InstancesSettings.newBuilder();
+ * instancesSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         instancesSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * InstancesSettings instancesSettings = instancesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createInstance: + * + *

{@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
+ * InstancesSettings.Builder instancesSettingsBuilder = InstancesSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * instancesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class InstancesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return ((InstancesStubSettings) getStubSettings()).createInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return ((InstancesStubSettings) getStubSettings()).createInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return ((InstancesStubSettings) getStubSettings()).deleteInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return ((InstancesStubSettings) getStubSettings()).deleteInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return ((InstancesStubSettings) getStubSettings()).getInstanceSettings(); + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return ((InstancesStubSettings) getStubSettings()).listInstancesSettings(); + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public UnaryCallSettings stopInstanceSettings() { + return ((InstancesStubSettings) getStubSettings()).stopInstanceSettings(); + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public OperationCallSettings + stopInstanceOperationSettings() { + return ((InstancesStubSettings) getStubSettings()).stopInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to startInstance. */ + public UnaryCallSettings startInstanceSettings() { + return ((InstancesStubSettings) getStubSettings()).startInstanceSettings(); + } + + /** Returns the object with the settings used for calls to startInstance. */ + public OperationCallSettings + startInstanceOperationSettings() { + return ((InstancesStubSettings) getStubSettings()).startInstanceOperationSettings(); + } + + public static final InstancesSettings create(InstancesStubSettings stub) throws IOException { + return new InstancesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstancesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return InstancesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return InstancesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return InstancesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstancesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstancesStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return InstancesStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return InstancesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected InstancesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for InstancesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(InstancesStubSettings.newBuilder(clientContext)); + } + + protected Builder(InstancesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(InstancesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(InstancesStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(InstancesStubSettings.newHttpJsonBuilder()); + } + + public InstancesStubSettings.Builder getStubSettingsBuilder() { + return ((InstancesStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return getStubSettingsBuilder().createInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return getStubSettingsBuilder().createInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return getStubSettingsBuilder().deleteInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return getStubSettingsBuilder().deleteInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getStubSettingsBuilder().getInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return getStubSettingsBuilder().listInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public UnaryCallSettings.Builder stopInstanceSettings() { + return getStubSettingsBuilder().stopInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public OperationCallSettings.Builder + stopInstanceOperationSettings() { + return getStubSettingsBuilder().stopInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startInstance. */ + public UnaryCallSettings.Builder startInstanceSettings() { + return getStubSettingsBuilder().startInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to startInstance. */ + public OperationCallSettings.Builder + startInstanceOperationSettings() { + return getStubSettingsBuilder().startInstanceOperationSettings(); + } + + @Override + public InstancesSettings build() throws IOException { + return new InstancesSettings(this); + } + } +} diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/gapic_metadata.json b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/gapic_metadata.json index 8bf73ef3aa0c..3bb1727bee36 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/gapic_metadata.json +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/gapic_metadata.json @@ -38,6 +38,33 @@ } } }, + "Instances": { + "clients": { + "grpc": { + "libraryClient": "InstancesClient", + "rpcs": { + "CreateInstance": { + "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] + }, + "DeleteInstance": { + "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] + }, + "ListInstances": { + "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] + }, + "StartInstance": { + "methods": ["startInstanceAsync", "startInstanceAsync", "startInstanceAsync", "startInstanceOperationCallable", "startInstanceCallable"] + }, + "StopInstance": { + "methods": ["stopInstanceAsync", "stopInstanceAsync", "stopInstanceAsync", "stopInstanceOperationCallable", "stopInstanceCallable"] + } + } + } + } + }, "Jobs": { "clients": { "grpc": { diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/package-info.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/package-info.java index 680ba7ce6741..d33044f3dfa5 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/package-info.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/package-info.java @@ -66,6 +66,24 @@ * } * } * + *

======================= InstancesClient ======================= + * + *

Service Description: The Cloud Run Instances API allows you to manage Cloud Run Instances. + * + *

Sample for InstancesClient: + * + *

{@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 (InstancesClient instancesClient = InstancesClient.create()) {
+ *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ *   Instance response = instancesClient.getInstance(name);
+ * }
+ * }
+ * *

======================= JobsClient ======================= * *

Service Description: Cloud Run Job Control Plane API. diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcInstancesCallableFactory.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcInstancesCallableFactory.java new file mode 100644 index 000000000000..e0c2ce6211f2 --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcInstancesCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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.run.v2.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Instances service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcInstancesCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcInstancesStub.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcInstancesStub.java new file mode 100644 index 000000000000..99b7f61076a3 --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcInstancesStub.java @@ -0,0 +1,395 @@ +/* + * Copyright 2026 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.run.v2.stub; + +import static com.google.cloud.run.v2.InstancesClient.ListInstancesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +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.api.pathtemplate.PathTemplate; +import com.google.cloud.run.v2.CreateInstanceRequest; +import com.google.cloud.run.v2.DeleteInstanceRequest; +import com.google.cloud.run.v2.GetInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.ListInstancesRequest; +import com.google.cloud.run.v2.ListInstancesResponse; +import com.google.cloud.run.v2.StartInstanceRequest; +import com.google.cloud.run.v2.StopInstanceRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Instances service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcInstancesStub extends InstancesStub { + private static final MethodDescriptor + createInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.run.v2.Instances/CreateInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.run.v2.Instances/DeleteInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.run.v2.Instances/GetInstance") + .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.run.v2.Instances/ListInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + stopInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.run.v2.Instances/StopInstance") + .setRequestMarshaller(ProtoUtils.marshaller(StopInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + startInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.run.v2.Instances/StartInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(StartInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable createInstanceCallable; + private final OperationCallable + createInstanceOperationCallable; + private final UnaryCallable deleteInstanceCallable; + private final OperationCallable + deleteInstanceOperationCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable stopInstanceCallable; + private final OperationCallable + stopInstanceOperationCallable; + private final UnaryCallable startInstanceCallable; + private final OperationCallable + startInstanceOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + private static final PathTemplate CREATE_INSTANCE_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}"); + private static final PathTemplate DELETE_INSTANCE_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/**"); + private static final PathTemplate GET_INSTANCE_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/**"); + private static final PathTemplate LIST_INSTANCES_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}"); + + public static final GrpcInstancesStub create(InstancesStubSettings settings) throws IOException { + return new GrpcInstancesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcInstancesStub create(ClientContext clientContext) throws IOException { + return new GrpcInstancesStub(InstancesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcInstancesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcInstancesStub( + InstancesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcInstancesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcInstancesStub(InstancesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcInstancesCallableFactory()); + } + + /** + * Constructs an instance of GrpcInstancesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcInstancesStub( + InstancesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "location", CREATE_INSTANCE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "location", DELETE_INSTANCE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings getInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "location", GET_INSTANCE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings listInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "location", LIST_INSTANCES_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings stopInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings startInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createInstanceCallable = + callableFactory.createUnaryCallable( + createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); + this.createInstanceOperationCallable = + callableFactory.createOperationCallable( + createInstanceTransportSettings, + settings.createInstanceOperationSettings(), + clientContext, + operationsStub); + this.deleteInstanceCallable = + callableFactory.createUnaryCallable( + deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); + this.deleteInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteInstanceTransportSettings, + settings.deleteInstanceOperationSettings(), + clientContext, + operationsStub); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.stopInstanceCallable = + callableFactory.createUnaryCallable( + stopInstanceTransportSettings, settings.stopInstanceSettings(), clientContext); + this.stopInstanceOperationCallable = + callableFactory.createOperationCallable( + stopInstanceTransportSettings, + settings.stopInstanceOperationSettings(), + clientContext, + operationsStub); + this.startInstanceCallable = + callableFactory.createUnaryCallable( + startInstanceTransportSettings, settings.startInstanceSettings(), clientContext); + this.startInstanceOperationCallable = + callableFactory.createOperationCallable( + startInstanceTransportSettings, + settings.startInstanceOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createInstanceCallable() { + return createInstanceCallable; + } + + @Override + public OperationCallable + createInstanceOperationCallable() { + return createInstanceOperationCallable; + } + + @Override + public UnaryCallable deleteInstanceCallable() { + return deleteInstanceCallable; + } + + @Override + public OperationCallable + deleteInstanceOperationCallable() { + return deleteInstanceOperationCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable stopInstanceCallable() { + return stopInstanceCallable; + } + + @Override + public OperationCallable + stopInstanceOperationCallable() { + return stopInstanceOperationCallable; + } + + @Override + public UnaryCallable startInstanceCallable() { + return startInstanceCallable; + } + + @Override + public OperationCallable + startInstanceOperationCallable() { + return startInstanceOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonInstancesCallableFactory.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonInstancesCallableFactory.java new file mode 100644 index 000000000000..d9af35e1ded8 --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonInstancesCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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.run.v2.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Instances service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonInstancesCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonInstancesStub.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonInstancesStub.java new file mode 100644 index 000000000000..1778b3207650 --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonInstancesStub.java @@ -0,0 +1,627 @@ +/* + * Copyright 2026 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.run.v2.stub; + +import static com.google.cloud.run.v2.InstancesClient.ListInstancesPagedResponse; + +import com.google.api.HttpRule; +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.api.pathtemplate.PathTemplate; +import com.google.cloud.run.v2.CreateInstanceRequest; +import com.google.cloud.run.v2.DeleteInstanceRequest; +import com.google.cloud.run.v2.GetInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.ListInstancesRequest; +import com.google.cloud.run.v2.ListInstancesResponse; +import com.google.cloud.run.v2.StartInstanceRequest; +import com.google.cloud.run.v2.StopInstanceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Instances service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonInstancesStub extends InstancesStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder().add(Instance.getDescriptor()).build(); + + private static final ApiMethodDescriptor + createInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.run.v2.Instances/CreateInstance") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/instances", + 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, "instanceId", request.getInstanceId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("instance", request.getInstance(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.run.v2.Instances/DeleteInstance") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/instances/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.run.v2.Instances/GetInstance") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/instances/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Instance.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listInstancesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.run.v2.Instances/ListInstances") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/instances", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam( + fields, "showDeleted", request.getShowDeleted()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInstancesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + stopInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.run.v2.Instances/StopInstance") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/instances/*}:stop", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + 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().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (StopInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + startInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.run.v2.Instances/StartInstance") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/instances/*}:start", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + 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().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (StartInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable createInstanceCallable; + private final OperationCallable + createInstanceOperationCallable; + private final UnaryCallable deleteInstanceCallable; + private final OperationCallable + deleteInstanceOperationCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable stopInstanceCallable; + private final OperationCallable + stopInstanceOperationCallable; + private final UnaryCallable startInstanceCallable; + private final OperationCallable + startInstanceOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + private static final PathTemplate CREATE_INSTANCE_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}"); + private static final PathTemplate DELETE_INSTANCE_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/**"); + private static final PathTemplate GET_INSTANCE_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}/**"); + private static final PathTemplate LIST_INSTANCES_0_PATH_TEMPLATE = + PathTemplate.create("projects/*/locations/{location=*}"); + + public static final HttpJsonInstancesStub create(InstancesStubSettings settings) + throws IOException { + return new HttpJsonInstancesStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonInstancesStub create(ClientContext clientContext) throws IOException { + return new HttpJsonInstancesStub( + InstancesStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonInstancesStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonInstancesStub( + InstancesStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonInstancesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonInstancesStub(InstancesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonInstancesCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonInstancesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonInstancesStub( + InstancesStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v2/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v2/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v2/{name=projects/*/locations/*}/operations") + .build()) + .put( + "google.longrunning.Operations.WaitOperation", + HttpRule.newBuilder() + .setPost("/v2/{name=projects/*/locations/*/operations/*}:wait") + .build()) + .build()); + + HttpJsonCallSettings createInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "location", CREATE_INSTANCE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "location", DELETE_INSTANCE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "location", GET_INSTANCE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listInstancesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "location", LIST_INSTANCES_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings stopInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(stopInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings startInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(startInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createInstanceCallable = + callableFactory.createUnaryCallable( + createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); + this.createInstanceOperationCallable = + callableFactory.createOperationCallable( + createInstanceTransportSettings, + settings.createInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteInstanceCallable = + callableFactory.createUnaryCallable( + deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); + this.deleteInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteInstanceTransportSettings, + settings.deleteInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.stopInstanceCallable = + callableFactory.createUnaryCallable( + stopInstanceTransportSettings, settings.stopInstanceSettings(), clientContext); + this.stopInstanceOperationCallable = + callableFactory.createOperationCallable( + stopInstanceTransportSettings, + settings.stopInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.startInstanceCallable = + callableFactory.createUnaryCallable( + startInstanceTransportSettings, settings.startInstanceSettings(), clientContext); + this.startInstanceOperationCallable = + callableFactory.createOperationCallable( + startInstanceTransportSettings, + settings.startInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createInstanceMethodDescriptor); + methodDescriptors.add(deleteInstanceMethodDescriptor); + methodDescriptors.add(getInstanceMethodDescriptor); + methodDescriptors.add(listInstancesMethodDescriptor); + methodDescriptors.add(stopInstanceMethodDescriptor); + methodDescriptors.add(startInstanceMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createInstanceCallable() { + return createInstanceCallable; + } + + @Override + public OperationCallable + createInstanceOperationCallable() { + return createInstanceOperationCallable; + } + + @Override + public UnaryCallable deleteInstanceCallable() { + return deleteInstanceCallable; + } + + @Override + public OperationCallable + deleteInstanceOperationCallable() { + return deleteInstanceOperationCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable stopInstanceCallable() { + return stopInstanceCallable; + } + + @Override + public OperationCallable + stopInstanceOperationCallable() { + return stopInstanceOperationCallable; + } + + @Override + public UnaryCallable startInstanceCallable() { + return startInstanceCallable; + } + + @Override + public OperationCallable + startInstanceOperationCallable() { + return startInstanceOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/InstancesStub.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/InstancesStub.java new file mode 100644 index 000000000000..1264a9a9eb9a --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/InstancesStub.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 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.run.v2.stub; + +import static com.google.cloud.run.v2.InstancesClient.ListInstancesPagedResponse; + +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.run.v2.CreateInstanceRequest; +import com.google.cloud.run.v2.DeleteInstanceRequest; +import com.google.cloud.run.v2.GetInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.ListInstancesRequest; +import com.google.cloud.run.v2.ListInstancesResponse; +import com.google.cloud.run.v2.StartInstanceRequest; +import com.google.cloud.run.v2.StopInstanceRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Instances service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class InstancesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()"); + } + + public UnaryCallable createInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceCallable()"); + } + + public OperationCallable + deleteInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); + } + + public UnaryCallable deleteInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); + } + + public UnaryCallable getInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); + } + + public UnaryCallable + listInstancesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); + } + + public UnaryCallable listInstancesCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); + } + + public OperationCallable + stopInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: stopInstanceOperationCallable()"); + } + + public UnaryCallable stopInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: stopInstanceCallable()"); + } + + public OperationCallable + startInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: startInstanceOperationCallable()"); + } + + public UnaryCallable startInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: startInstanceCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/InstancesStubSettings.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/InstancesStubSettings.java new file mode 100644 index 000000000000..9126a82fd4fe --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/InstancesStubSettings.java @@ -0,0 +1,717 @@ +/* + * Copyright 2026 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.run.v2.stub; + +import static com.google.cloud.run.v2.InstancesClient.ListInstancesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.run.v2.CreateInstanceRequest; +import com.google.cloud.run.v2.DeleteInstanceRequest; +import com.google.cloud.run.v2.GetInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.ListInstancesRequest; +import com.google.cloud.run.v2.ListInstancesResponse; +import com.google.cloud.run.v2.StartInstanceRequest; +import com.google.cloud.run.v2.StopInstanceRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link InstancesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (run.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getInstance: + * + *

{@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
+ * InstancesStubSettings.Builder instancesSettingsBuilder = InstancesStubSettings.newBuilder();
+ * instancesSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         instancesSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * InstancesStubSettings instancesSettings = instancesSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createInstance: + * + *

{@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
+ * InstancesStubSettings.Builder instancesSettingsBuilder = InstancesStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * instancesSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class InstancesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createInstanceSettings; + private final OperationCallSettings + createInstanceOperationSettings; + private final UnaryCallSettings deleteInstanceSettings; + private final OperationCallSettings + deleteInstanceOperationSettings; + private final UnaryCallSettings getInstanceSettings; + private final PagedCallSettings< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings stopInstanceSettings; + private final OperationCallSettings + stopInstanceOperationSettings; + private final UnaryCallSettings startInstanceSettings; + private final OperationCallSettings + startInstanceOperationSettings; + + private static final PagedListDescriptor + LIST_INSTANCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { + return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { + return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInstancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInstancesResponse payload) { + return payload.getInstancesList(); + } + }; + + private static final PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + LIST_INSTANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInstancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); + return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public UnaryCallSettings stopInstanceSettings() { + return stopInstanceSettings; + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public OperationCallSettings + stopInstanceOperationSettings() { + return stopInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to startInstance. */ + public UnaryCallSettings startInstanceSettings() { + return startInstanceSettings; + } + + /** Returns the object with the settings used for calls to startInstance. */ + public OperationCallSettings + startInstanceOperationSettings() { + return startInstanceOperationSettings; + } + + public InstancesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcInstancesStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonInstancesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "run"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "run.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "run.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(InstancesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(InstancesStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return InstancesStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected InstancesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createInstanceSettings = settingsBuilder.createInstanceSettings().build(); + createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); + deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); + deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); + getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + listInstancesSettings = settingsBuilder.listInstancesSettings().build(); + stopInstanceSettings = settingsBuilder.stopInstanceSettings().build(); + stopInstanceOperationSettings = settingsBuilder.stopInstanceOperationSettings().build(); + startInstanceSettings = settingsBuilder.startInstanceSettings().build(); + startInstanceOperationSettings = settingsBuilder.startInstanceOperationSettings().build(); + } + + /** Builder for InstancesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createInstanceSettings; + private final OperationCallSettings.Builder + createInstanceOperationSettings; + private final UnaryCallSettings.Builder + deleteInstanceSettings; + private final OperationCallSettings.Builder + deleteInstanceOperationSettings; + private final UnaryCallSettings.Builder getInstanceSettings; + private final PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings.Builder stopInstanceSettings; + private final OperationCallSettings.Builder + stopInstanceOperationSettings; + private final UnaryCallSettings.Builder startInstanceSettings; + private final OperationCallSettings.Builder + startInstanceOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstanceOperationSettings = OperationCallSettings.newBuilder(); + deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); + getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); + stopInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopInstanceOperationSettings = OperationCallSettings.newBuilder(); + startInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startInstanceOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createInstanceSettings, + deleteInstanceSettings, + getInstanceSettings, + listInstancesSettings, + stopInstanceSettings, + startInstanceSettings); + initDefaults(this); + } + + protected Builder(InstancesStubSettings settings) { + super(settings); + + createInstanceSettings = settings.createInstanceSettings.toBuilder(); + createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); + deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); + deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); + getInstanceSettings = settings.getInstanceSettings.toBuilder(); + listInstancesSettings = settings.listInstancesSettings.toBuilder(); + stopInstanceSettings = settings.stopInstanceSettings.toBuilder(); + stopInstanceOperationSettings = settings.stopInstanceOperationSettings.toBuilder(); + startInstanceSettings = settings.startInstanceSettings.toBuilder(); + startInstanceOperationSettings = settings.startInstanceOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createInstanceSettings, + deleteInstanceSettings, + getInstanceSettings, + listInstancesSettings, + stopInstanceSettings, + startInstanceSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .stopInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .startInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Instance.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Instance.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .stopInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Instance.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .startInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Instance.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public UnaryCallSettings.Builder stopInstanceSettings() { + return stopInstanceSettings; + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public OperationCallSettings.Builder + stopInstanceOperationSettings() { + return stopInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to startInstance. */ + public UnaryCallSettings.Builder startInstanceSettings() { + return startInstanceSettings; + } + + /** Returns the builder for the settings used for calls to startInstance. */ + public OperationCallSettings.Builder + startInstanceOperationSettings() { + return startInstanceOperationSettings; + } + + @Override + public InstancesStubSettings build() throws IOException { + return new InstancesStubSettings(this); + } + } +} diff --git a/java-run/google-cloud-run/src/main/resources/META-INF/native-image/com.google.cloud.run.v2/reflect-config.json b/java-run/google-cloud-run/src/main/resources/META-INF/native-image/com.google.cloud.run.v2/reflect-config.json index bc93d0d3ebb3..8ac466e9fae1 100644 --- a/java-run/google-cloud-run/src/main/resources/META-INF/native-image/com.google.cloud.run.v2/reflect-config.json +++ b/java-run/google-cloud-run/src/main/resources/META-INF/native-image/com.google.cloud.run.v2/reflect-config.json @@ -710,6 +710,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.run.v2.ContainerStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.ContainerStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.CreateInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.CreateInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.run.v2.CreateJobRequest", "queryAllDeclaredConstructors": true, @@ -782,6 +818,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.run.v2.DeleteInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.DeleteInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.run.v2.DeleteJobRequest", "queryAllDeclaredConstructors": true, @@ -1052,6 +1106,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.run.v2.GetInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.GetInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.run.v2.GetJobRequest", "queryAllDeclaredConstructors": true, @@ -1187,6 +1259,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.run.v2.Instance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.Instance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.run.v2.InstanceSplit", "queryAllDeclaredConstructors": true, @@ -1286,6 +1376,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.run.v2.ListInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.ListInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.ListInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.ListInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.run.v2.ListJobsRequest", "queryAllDeclaredConstructors": true, @@ -1817,6 +1943,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.run.v2.StartInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.StartInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.StopInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.run.v2.StopInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.run.v2.StorageSource", "queryAllDeclaredConstructors": true, diff --git a/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/InstancesClientHttpJsonTest.java b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/InstancesClientHttpJsonTest.java new file mode 100644 index 000000000000..78795cc9fa7f --- /dev/null +++ b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/InstancesClientHttpJsonTest.java @@ -0,0 +1,1028 @@ +/* + * Copyright 2026 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.run.v2; + +import static com.google.cloud.run.v2.InstancesClient.ListInstancesPagedResponse; + +import com.google.api.LaunchStage; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.run.v2.stub.HttpJsonInstancesStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +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; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class InstancesClientHttpJsonTest { + private static MockHttpService mockService; + private static InstancesClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonInstancesStub.getMethodDescriptors(), InstancesSettings.getDefaultEndpoint()); + InstancesSettings settings = + InstancesSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + InstancesSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = InstancesClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + + Instance actualResponse = client.createInstanceAsync(parent, instance).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 createInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + client.createInstanceAsync(parent, instance).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Instance instance = Instance.newBuilder().build(); + + Instance actualResponse = client.createInstanceAsync(parent, instance).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 createInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Instance instance = Instance.newBuilder().build(); + client.createInstanceAsync(parent, instance).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.deleteInstanceAsync(name).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 deleteInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + Instance actualResponse = client.deleteInstanceAsync(name).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 deleteInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(name); + 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 getInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + Instance actualResponse = client.getInstance(name); + 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 getInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + 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 listInstancesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest2() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + 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 listInstancesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.stopInstanceAsync(name).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 stopInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.stopInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void stopInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + Instance actualResponse = client.stopInstanceAsync(name).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 stopInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.stopInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void startInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.startInstanceAsync(name).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 startInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.startInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void startInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + Instance actualResponse = client.startInstanceAsync(name).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 startInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.startInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/InstancesClientTest.java b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/InstancesClientTest.java new file mode 100644 index 000000000000..453fff922a92 --- /dev/null +++ b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/InstancesClientTest.java @@ -0,0 +1,990 @@ +/* + * Copyright 2026 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.run.v2; + +import static com.google.cloud.run.v2.InstancesClient.ListInstancesPagedResponse; + +import com.google.api.LaunchStage; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +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.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +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; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class InstancesClientTest { + private static MockInstances mockInstances; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private InstancesClient client; + + @BeforeClass + public static void startStaticServer() { + mockInstances = new MockInstances(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockInstances, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + InstancesSettings settings = + InstancesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = InstancesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + + Instance actualResponse = client.createInstanceAsync(parent, instance).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + client.createInstanceAsync(parent, instance).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 createInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + + Instance actualResponse = client.createInstanceAsync(parent, instance).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + client.createInstanceAsync(parent, instance).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 deleteInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.deleteInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.deleteInstanceAsync(name).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 deleteInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + String name = "name3373707"; + + Instance actualResponse = client.deleteInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + String name = "name3373707"; + client.deleteInstanceAsync(name).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 getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + mockInstances.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + mockInstances.addResponse(expectedResponse); + + String name = "name3373707"; + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + String name = "name3373707"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockInstances.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest2() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockInstances.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.stopInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopInstanceRequest actualRequest = ((StopInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.stopInstanceAsync(name).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 stopInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + String name = "name3373707"; + + Instance actualResponse = client.stopInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopInstanceRequest actualRequest = ((StopInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + String name = "name3373707"; + client.stopInstanceAsync(name).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 startInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.startInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartInstanceRequest actualRequest = ((StartInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.startInstanceAsync(name).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 startInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setGeneration(305703192) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeleteTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastModifier("lastModifier1959003021") + .setClient("client-1357712437") + .setClientVersion("clientVersion771880589") + .setLaunchStage(LaunchStage.forNumber(0)) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setVpcAccess(VpcAccess.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .addAllContainers(new ArrayList()) + .addAllVolumes(new ArrayList()) + .setEncryptionKey("encryptionKey-36224036") + .setEncryptionKeyRevocationAction(EncryptionKeyRevocationAction.forNumber(0)) + .setEncryptionKeyShutdownDuration(Duration.newBuilder().build()) + .setNodeSelector(NodeSelector.newBuilder().build()) + .setGpuZonalRedundancyDisabled(true) + .setIngress(IngressTraffic.forNumber(0)) + .setInvokerIamDisabled(true) + .setIapEnabled(true) + .setObservedGeneration(900833007) + .setLogUri("logUri-1097354360") + .setTerminalCondition(Condition.newBuilder().build()) + .addAllConditions(new ArrayList()) + .addAllContainerStatuses(new ArrayList()) + .setSatisfiesPzs(true) + .addAllUrls(new ArrayList()) + .setReconciling(true) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + String name = "name3373707"; + + Instance actualResponse = client.startInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartInstanceRequest actualRequest = ((StartInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + String name = "name3373707"; + client.startInstanceAsync(name).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()); + } + } +} diff --git a/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockInstances.java b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockInstances.java new file mode 100644 index 000000000000..1de2e6d3c9ac --- /dev/null +++ b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockInstances.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.run.v2; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockInstances implements MockGrpcService { + private final MockInstancesImpl serviceImpl; + + public MockInstances() { + serviceImpl = new MockInstancesImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockInstancesImpl.java b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockInstancesImpl.java new file mode 100644 index 000000000000..de6c2c567e27 --- /dev/null +++ b/java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockInstancesImpl.java @@ -0,0 +1,186 @@ +/* + * Copyright 2026 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.run.v2; + +import com.google.api.core.BetaApi; +import com.google.cloud.run.v2.InstancesGrpc.InstancesImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockInstancesImpl extends InstancesImplBase { + private List requests; + private Queue responses; + + public MockInstancesImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createInstance( + CreateInstanceRequest 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 CreateInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInstance( + DeleteInstanceRequest 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 DeleteInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Instance) { + requests.add(request); + responseObserver.onNext(((Instance) 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 GetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInstances( + ListInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancesResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancesResponse) 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 ListInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void stopInstance( + StopInstanceRequest 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 StopInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void startInstance( + StartInstanceRequest 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 StartInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-run/grpc-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstancesGrpc.java b/java-run/grpc-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstancesGrpc.java new file mode 100644 index 000000000000..ab0189cdff69 --- /dev/null +++ b/java-run/grpc-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstancesGrpc.java @@ -0,0 +1,1029 @@ +/* + * Copyright 2026 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.run.v2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The Cloud Run Instances API allows you to manage Cloud Run Instances.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class InstancesGrpc { + + private InstancesGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.run.v2.Instances"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.run.v2.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInstance", + requestType = com.google.cloud.run.v2.CreateInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.run.v2.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.run.v2.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod; + if ((getCreateInstanceMethod = InstancesGrpc.getCreateInstanceMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getCreateInstanceMethod = InstancesGrpc.getCreateInstanceMethod) == null) { + InstancesGrpc.getCreateInstanceMethod = + getCreateInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.run.v2.CreateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("CreateInstance")) + .build(); + } + } + } + return getCreateInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.run.v2.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", + requestType = com.google.cloud.run.v2.DeleteInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.run.v2.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.run.v2.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod; + if ((getDeleteInstanceMethod = InstancesGrpc.getDeleteInstanceMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getDeleteInstanceMethod = InstancesGrpc.getDeleteInstanceMethod) == null) { + InstancesGrpc.getDeleteInstanceMethod = + getDeleteInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.run.v2.DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("DeleteInstance")) + .build(); + } + } + } + return getDeleteInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.run.v2.GetInstanceRequest, com.google.cloud.run.v2.Instance> + getGetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstance", + requestType = com.google.cloud.run.v2.GetInstanceRequest.class, + responseType = com.google.cloud.run.v2.Instance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.run.v2.GetInstanceRequest, com.google.cloud.run.v2.Instance> + getGetInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.run.v2.GetInstanceRequest, com.google.cloud.run.v2.Instance> + getGetInstanceMethod; + if ((getGetInstanceMethod = InstancesGrpc.getGetInstanceMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getGetInstanceMethod = InstancesGrpc.getGetInstanceMethod) == null) { + InstancesGrpc.getGetInstanceMethod = + getGetInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.run.v2.GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.run.v2.Instance.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("GetInstance")) + .build(); + } + } + } + return getGetInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.run.v2.ListInstancesRequest, + com.google.cloud.run.v2.ListInstancesResponse> + getListInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstances", + requestType = com.google.cloud.run.v2.ListInstancesRequest.class, + responseType = com.google.cloud.run.v2.ListInstancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.run.v2.ListInstancesRequest, + com.google.cloud.run.v2.ListInstancesResponse> + getListInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.run.v2.ListInstancesRequest, + com.google.cloud.run.v2.ListInstancesResponse> + getListInstancesMethod; + if ((getListInstancesMethod = InstancesGrpc.getListInstancesMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getListInstancesMethod = InstancesGrpc.getListInstancesMethod) == null) { + InstancesGrpc.getListInstancesMethod = + getListInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.run.v2.ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.run.v2.ListInstancesResponse.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("ListInstances")) + .build(); + } + } + } + return getListInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.run.v2.StopInstanceRequest, com.google.longrunning.Operation> + getStopInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopInstance", + requestType = com.google.cloud.run.v2.StopInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.run.v2.StopInstanceRequest, com.google.longrunning.Operation> + getStopInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.run.v2.StopInstanceRequest, com.google.longrunning.Operation> + getStopInstanceMethod; + if ((getStopInstanceMethod = InstancesGrpc.getStopInstanceMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getStopInstanceMethod = InstancesGrpc.getStopInstanceMethod) == null) { + InstancesGrpc.getStopInstanceMethod = + getStopInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.run.v2.StopInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("StopInstance")) + .build(); + } + } + } + return getStopInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.run.v2.StartInstanceRequest, com.google.longrunning.Operation> + getStartInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartInstance", + requestType = com.google.cloud.run.v2.StartInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.run.v2.StartInstanceRequest, com.google.longrunning.Operation> + getStartInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.run.v2.StartInstanceRequest, com.google.longrunning.Operation> + getStartInstanceMethod; + if ((getStartInstanceMethod = InstancesGrpc.getStartInstanceMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getStartInstanceMethod = InstancesGrpc.getStartInstanceMethod) == null) { + InstancesGrpc.getStartInstanceMethod = + getStartInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.run.v2.StartInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("StartInstance")) + .build(); + } + } + } + return getStartInstanceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static InstancesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InstancesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesStub(channel, callOptions); + } + }; + return InstancesStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static InstancesBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InstancesBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesBlockingV2Stub(channel, callOptions); + } + }; + return InstancesBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static InstancesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InstancesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesBlockingStub(channel, callOptions); + } + }; + return InstancesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static InstancesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InstancesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesFutureStub(channel, callOptions); + } + }; + return InstancesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The Cloud Run Instances API allows you to manage Cloud Run Instances.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates an Instance.
+     * 
+ */ + default void createInstance( + com.google.cloud.run.v2.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Instance
+     * 
+ */ + default void deleteInstance( + com.google.cloud.run.v2.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a Instance
+     * 
+ */ + default void getInstance( + com.google.cloud.run.v2.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Instances. Results are sorted by creation time, descending.
+     * 
+ */ + default void listInstances( + com.google.cloud.run.v2.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops an Instance.
+     * 
+ */ + default void stopInstance( + com.google.cloud.run.v2.StopInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStopInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Starts an Instance.
+     * 
+ */ + default void startInstance( + com.google.cloud.run.v2.StartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStartInstanceMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Instances. + * + *
+   * The Cloud Run Instances API allows you to manage Cloud Run Instances.
+   * 
+ */ + public abstract static class InstancesImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return InstancesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Instances. + * + *
+   * The Cloud Run Instances API allows you to manage Cloud Run Instances.
+   * 
+ */ + public static final class InstancesStub extends io.grpc.stub.AbstractAsyncStub { + private InstancesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InstancesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an Instance.
+     * 
+ */ + public void createInstance( + com.google.cloud.run.v2.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Instance
+     * 
+ */ + public void deleteInstance( + com.google.cloud.run.v2.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a Instance
+     * 
+ */ + public void getInstance( + com.google.cloud.run.v2.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Instances. Results are sorted by creation time, descending.
+     * 
+ */ + public void listInstances( + com.google.cloud.run.v2.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops an Instance.
+     * 
+ */ + public void stopInstance( + com.google.cloud.run.v2.StopInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts an Instance.
+     * 
+ */ + public void startInstance( + com.google.cloud.run.v2.StartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Instances. + * + *
+   * The Cloud Run Instances API allows you to manage Cloud Run Instances.
+   * 
+ */ + public static final class InstancesBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private InstancesBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InstancesBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an Instance.
+     * 
+ */ + public com.google.longrunning.Operation createInstance( + com.google.cloud.run.v2.CreateInstanceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Instance
+     * 
+ */ + public com.google.longrunning.Operation deleteInstance( + com.google.cloud.run.v2.DeleteInstanceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a Instance
+     * 
+ */ + public com.google.cloud.run.v2.Instance getInstance( + com.google.cloud.run.v2.GetInstanceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Instances. Results are sorted by creation time, descending.
+     * 
+ */ + public com.google.cloud.run.v2.ListInstancesResponse listInstances( + com.google.cloud.run.v2.ListInstancesRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops an Instance.
+     * 
+ */ + public com.google.longrunning.Operation stopInstance( + com.google.cloud.run.v2.StopInstanceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getStopInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts an Instance.
+     * 
+ */ + public com.google.longrunning.Operation startInstance( + com.google.cloud.run.v2.StartInstanceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getStartInstanceMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Instances. + * + *
+   * The Cloud Run Instances API allows you to manage Cloud Run Instances.
+   * 
+ */ + public static final class InstancesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private InstancesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InstancesBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an Instance.
+     * 
+ */ + public com.google.longrunning.Operation createInstance( + com.google.cloud.run.v2.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Instance
+     * 
+ */ + public com.google.longrunning.Operation deleteInstance( + com.google.cloud.run.v2.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a Instance
+     * 
+ */ + public com.google.cloud.run.v2.Instance getInstance( + com.google.cloud.run.v2.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Instances. Results are sorted by creation time, descending.
+     * 
+ */ + public com.google.cloud.run.v2.ListInstancesResponse listInstances( + com.google.cloud.run.v2.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops an Instance.
+     * 
+ */ + public com.google.longrunning.Operation stopInstance( + com.google.cloud.run.v2.StopInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts an Instance.
+     * 
+ */ + public com.google.longrunning.Operation startInstance( + com.google.cloud.run.v2.StartInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartInstanceMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Instances. + * + *
+   * The Cloud Run Instances API allows you to manage Cloud Run Instances.
+   * 
+ */ + public static final class InstancesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private InstancesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InstancesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createInstance(com.google.cloud.run.v2.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Instance
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInstance(com.google.cloud.run.v2.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a Instance
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getInstance(com.google.cloud.run.v2.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Instances. Results are sorted by creation time, descending.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.run.v2.ListInstancesResponse> + listInstances(com.google.cloud.run.v2.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops an Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + stopInstance(com.google.cloud.run.v2.StopInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts an Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + startInstance(com.google.cloud.run.v2.StartInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartInstanceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_INSTANCE = 0; + private static final int METHODID_DELETE_INSTANCE = 1; + private static final int METHODID_GET_INSTANCE = 2; + private static final int METHODID_LIST_INSTANCES = 3; + private static final int METHODID_STOP_INSTANCE = 4; + private static final int METHODID_START_INSTANCE = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_INSTANCE: + serviceImpl.createInstance( + (com.google.cloud.run.v2.CreateInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSTANCE: + serviceImpl.deleteInstance( + (com.google.cloud.run.v2.DeleteInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INSTANCE: + serviceImpl.getInstance( + (com.google.cloud.run.v2.GetInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INSTANCES: + serviceImpl.listInstances( + (com.google.cloud.run.v2.ListInstancesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_STOP_INSTANCE: + serviceImpl.stopInstance( + (com.google.cloud.run.v2.StopInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_INSTANCE: + serviceImpl.startInstance( + (com.google.cloud.run.v2.StartInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.run.v2.CreateInstanceRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_INSTANCE))) + .addMethod( + getDeleteInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.run.v2.DeleteInstanceRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_INSTANCE))) + .addMethod( + getGetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.run.v2.GetInstanceRequest, com.google.cloud.run.v2.Instance>( + service, METHODID_GET_INSTANCE))) + .addMethod( + getListInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.run.v2.ListInstancesRequest, + com.google.cloud.run.v2.ListInstancesResponse>( + service, METHODID_LIST_INSTANCES))) + .addMethod( + getStopInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.run.v2.StopInstanceRequest, com.google.longrunning.Operation>( + service, METHODID_STOP_INSTANCE))) + .addMethod( + getStartInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.run.v2.StartInstanceRequest, com.google.longrunning.Operation>( + service, METHODID_START_INSTANCE))) + .build(); + } + + private abstract static class InstancesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + InstancesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Instances"); + } + } + + private static final class InstancesFileDescriptorSupplier + extends InstancesBaseDescriptorSupplier { + InstancesFileDescriptorSupplier() {} + } + + private static final class InstancesMethodDescriptorSupplier + extends InstancesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + InstancesMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (InstancesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new InstancesFileDescriptorSupplier()) + .addMethod(getCreateInstanceMethod()) + .addMethod(getDeleteInstanceMethod()) + .addMethod(getGetInstanceMethod()) + .addMethod(getListInstancesMethod()) + .addMethod(getStopInstanceMethod()) + .addMethod(getStartInstanceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Container.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Container.java index 8bbd007dfc13..b2e316103081 100644 --- a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Container.java +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Container.java @@ -871,6 +871,59 @@ public com.google.cloud.run.v2.ProbeOrBuilder getStartupProbeOrBuilder() { : startupProbe_; } + public static final int READINESS_PROBE_FIELD_NUMBER = 14; + private com.google.cloud.run.v2.Probe readinessProbe_; + + /** + * + * + *
+   * Readiness probe to be used for health checks.
+   * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + * + * @return Whether the readinessProbe field is set. + */ + @java.lang.Override + public boolean hasReadinessProbe() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Readiness probe to be used for health checks.
+   * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + * + * @return The readinessProbe. + */ + @java.lang.Override + public com.google.cloud.run.v2.Probe getReadinessProbe() { + return readinessProbe_ == null + ? com.google.cloud.run.v2.Probe.getDefaultInstance() + : readinessProbe_; + } + + /** + * + * + *
+   * Readiness probe to be used for health checks.
+   * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + @java.lang.Override + public com.google.cloud.run.v2.ProbeOrBuilder getReadinessProbeOrBuilder() { + return readinessProbe_ == null + ? com.google.cloud.run.v2.Probe.getDefaultInstance() + : readinessProbe_; + } + public static final int DEPENDS_ON_FIELD_NUMBER = 12; @SuppressWarnings("serial") @@ -1012,7 +1065,7 @@ public com.google.protobuf.ByteString getBaseImageUriBytes() { */ @java.lang.Override public boolean hasBuildInfo() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** @@ -1103,6 +1156,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString(output, 13, baseImageUri_); } if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(14, getReadinessProbe()); + } + if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(15, getBuildInfo()); } if (((bitField0_ & 0x00000001) != 0)) { @@ -1172,6 +1228,9 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, baseImageUri_); } if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getReadinessProbe()); + } + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getBuildInfo()); } if (((bitField0_ & 0x00000001) != 0)) { @@ -1216,6 +1275,10 @@ public boolean equals(final java.lang.Object obj) { if (hasStartupProbe()) { if (!getStartupProbe().equals(other.getStartupProbe())) return false; } + if (hasReadinessProbe() != other.hasReadinessProbe()) return false; + if (hasReadinessProbe()) { + if (!getReadinessProbe().equals(other.getReadinessProbe())) return false; + } if (!getDependsOnList().equals(other.getDependsOnList())) return false; if (!getBaseImageUri().equals(other.getBaseImageUri())) return false; if (hasBuildInfo() != other.hasBuildInfo()) return false; @@ -1275,6 +1338,10 @@ public int hashCode() { hash = (37 * hash) + STARTUP_PROBE_FIELD_NUMBER; hash = (53 * hash) + getStartupProbe().hashCode(); } + if (hasReadinessProbe()) { + hash = (37 * hash) + READINESS_PROBE_FIELD_NUMBER; + hash = (53 * hash) + getReadinessProbe().hashCode(); + } if (getDependsOnCount() > 0) { hash = (37 * hash) + DEPENDS_ON_FIELD_NUMBER; hash = (53 * hash) + getDependsOnList().hashCode(); @@ -1436,6 +1503,7 @@ private void maybeForceBuilderInitialization() { getVolumeMountsFieldBuilder(); getLivenessProbeFieldBuilder(); getStartupProbeFieldBuilder(); + getReadinessProbeFieldBuilder(); getBuildInfoFieldBuilder(); } } @@ -1490,6 +1558,11 @@ public Builder clear() { startupProbeBuilder_.dispose(); startupProbeBuilder_ = null; } + readinessProbe_ = null; + if (readinessProbeBuilder_ != null) { + readinessProbeBuilder_.dispose(); + readinessProbeBuilder_ = null; + } dependsOn_ = com.google.protobuf.LazyStringArrayList.emptyList(); baseImageUri_ = ""; buildInfo_ = null; @@ -1600,15 +1673,20 @@ private void buildPartial0(com.google.cloud.run.v2.Container result) { to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00001000) != 0)) { + result.readinessProbe_ = + readinessProbeBuilder_ == null ? readinessProbe_ : readinessProbeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00002000) != 0)) { dependsOn_.makeImmutable(); result.dependsOn_ = dependsOn_; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.baseImageUri_ = baseImageUri_; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.buildInfo_ = buildInfoBuilder_ == null ? buildInfo_ : buildInfoBuilder_.build(); - to_bitField0_ |= 0x00000010; + to_bitField0_ |= 0x00000020; } result.bitField0_ |= to_bitField0_; } @@ -1786,10 +1864,13 @@ public Builder mergeFrom(com.google.cloud.run.v2.Container other) { if (other.hasStartupProbe()) { mergeStartupProbe(other.getStartupProbe()); } + if (other.hasReadinessProbe()) { + mergeReadinessProbe(other.getReadinessProbe()); + } if (!other.dependsOn_.isEmpty()) { if (dependsOn_.isEmpty()) { dependsOn_ = other.dependsOn_; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; } else { ensureDependsOnIsMutable(); dependsOn_.addAll(other.dependsOn_); @@ -1798,7 +1879,7 @@ public Builder mergeFrom(com.google.cloud.run.v2.Container other) { } if (!other.getBaseImageUri().isEmpty()) { baseImageUri_ = other.baseImageUri_; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } if (other.hasBuildInfo()) { @@ -1928,13 +2009,19 @@ public Builder mergeFrom( case 106: { baseImageUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 106 + case 114: + { + input.readMessage(getReadinessProbeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 case 122: { input.readMessage(getBuildInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 122 case 138: @@ -4710,6 +4797,200 @@ public com.google.cloud.run.v2.ProbeOrBuilder getStartupProbeOrBuilder() { return startupProbeBuilder_; } + private com.google.cloud.run.v2.Probe readinessProbe_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Probe, + com.google.cloud.run.v2.Probe.Builder, + com.google.cloud.run.v2.ProbeOrBuilder> + readinessProbeBuilder_; + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + * + * @return Whether the readinessProbe field is set. + */ + public boolean hasReadinessProbe() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + * + * @return The readinessProbe. + */ + public com.google.cloud.run.v2.Probe getReadinessProbe() { + if (readinessProbeBuilder_ == null) { + return readinessProbe_ == null + ? com.google.cloud.run.v2.Probe.getDefaultInstance() + : readinessProbe_; + } else { + return readinessProbeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + public Builder setReadinessProbe(com.google.cloud.run.v2.Probe value) { + if (readinessProbeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readinessProbe_ = value; + } else { + readinessProbeBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + public Builder setReadinessProbe(com.google.cloud.run.v2.Probe.Builder builderForValue) { + if (readinessProbeBuilder_ == null) { + readinessProbe_ = builderForValue.build(); + } else { + readinessProbeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + public Builder mergeReadinessProbe(com.google.cloud.run.v2.Probe value) { + if (readinessProbeBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && readinessProbe_ != null + && readinessProbe_ != com.google.cloud.run.v2.Probe.getDefaultInstance()) { + getReadinessProbeBuilder().mergeFrom(value); + } else { + readinessProbe_ = value; + } + } else { + readinessProbeBuilder_.mergeFrom(value); + } + if (readinessProbe_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + public Builder clearReadinessProbe() { + bitField0_ = (bitField0_ & ~0x00001000); + readinessProbe_ = null; + if (readinessProbeBuilder_ != null) { + readinessProbeBuilder_.dispose(); + readinessProbeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + public com.google.cloud.run.v2.Probe.Builder getReadinessProbeBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getReadinessProbeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + public com.google.cloud.run.v2.ProbeOrBuilder getReadinessProbeOrBuilder() { + if (readinessProbeBuilder_ != null) { + return readinessProbeBuilder_.getMessageOrBuilder(); + } else { + return readinessProbe_ == null + ? com.google.cloud.run.v2.Probe.getDefaultInstance() + : readinessProbe_; + } + } + + /** + * + * + *
+     * Readiness probe to be used for health checks.
+     * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Probe, + com.google.cloud.run.v2.Probe.Builder, + com.google.cloud.run.v2.ProbeOrBuilder> + getReadinessProbeFieldBuilder() { + if (readinessProbeBuilder_ == null) { + readinessProbeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Probe, + com.google.cloud.run.v2.Probe.Builder, + com.google.cloud.run.v2.ProbeOrBuilder>( + getReadinessProbe(), getParentForChildren(), isClean()); + readinessProbe_ = null; + } + return readinessProbeBuilder_; + } + private com.google.protobuf.LazyStringArrayList dependsOn_ = com.google.protobuf.LazyStringArrayList.emptyList(); @@ -4717,7 +4998,7 @@ private void ensureDependsOnIsMutable() { if (!dependsOn_.isModifiable()) { dependsOn_ = new com.google.protobuf.LazyStringArrayList(dependsOn_); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; } /** @@ -4802,7 +5083,7 @@ public Builder setDependsOn(int index, java.lang.String value) { } ensureDependsOnIsMutable(); dependsOn_.set(index, value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4825,7 +5106,7 @@ public Builder addDependsOn(java.lang.String value) { } ensureDependsOnIsMutable(); dependsOn_.add(value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4845,7 +5126,7 @@ public Builder addDependsOn(java.lang.String value) { public Builder addAllDependsOn(java.lang.Iterable values) { ensureDependsOnIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dependsOn_); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4863,7 +5144,7 @@ public Builder addAllDependsOn(java.lang.Iterable values) { */ public Builder clearDependsOn() { dependsOn_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); ; onChanged(); return this; @@ -4888,7 +5169,7 @@ public Builder addDependsOnBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureDependsOnIsMutable(); dependsOn_.add(value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4961,7 +5242,7 @@ public Builder setBaseImageUri(java.lang.String value) { throw new NullPointerException(); } baseImageUri_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4980,7 +5261,7 @@ public Builder setBaseImageUri(java.lang.String value) { */ public Builder clearBaseImageUri() { baseImageUri_ = getDefaultInstance().getBaseImageUri(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); onChanged(); return this; } @@ -5004,7 +5285,7 @@ public Builder setBaseImageUriBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); baseImageUri_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -5030,7 +5311,7 @@ public Builder setBaseImageUriBytes(com.google.protobuf.ByteString value) { * @return Whether the buildInfo field is set. */ public boolean hasBuildInfo() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** @@ -5076,7 +5357,7 @@ public Builder setBuildInfo(com.google.cloud.run.v2.BuildInfo value) { } else { buildInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5098,7 +5379,7 @@ public Builder setBuildInfo(com.google.cloud.run.v2.BuildInfo.Builder builderFor } else { buildInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5116,7 +5397,7 @@ public Builder setBuildInfo(com.google.cloud.run.v2.BuildInfo.Builder builderFor */ public Builder mergeBuildInfo(com.google.cloud.run.v2.BuildInfo value) { if (buildInfoBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00008000) != 0) && buildInfo_ != null && buildInfo_ != com.google.cloud.run.v2.BuildInfo.getDefaultInstance()) { getBuildInfoBuilder().mergeFrom(value); @@ -5127,7 +5408,7 @@ public Builder mergeBuildInfo(com.google.cloud.run.v2.BuildInfo value) { buildInfoBuilder_.mergeFrom(value); } if (buildInfo_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -5145,7 +5426,7 @@ public Builder mergeBuildInfo(com.google.cloud.run.v2.BuildInfo value) { * */ public Builder clearBuildInfo() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); buildInfo_ = null; if (buildInfoBuilder_ != null) { buildInfoBuilder_.dispose(); @@ -5167,7 +5448,7 @@ public Builder clearBuildInfo() { * */ public com.google.cloud.run.v2.BuildInfo.Builder getBuildInfoBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return getBuildInfoFieldBuilder().getBuilder(); } diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerOrBuilder.java index d41d391bf048..e4b44f8d9daa 100644 --- a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerOrBuilder.java +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerOrBuilder.java @@ -583,6 +583,43 @@ public interface ContainerOrBuilder */ com.google.cloud.run.v2.ProbeOrBuilder getStartupProbeOrBuilder(); + /** + * + * + *
+   * Readiness probe to be used for health checks.
+   * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + * + * @return Whether the readinessProbe field is set. + */ + boolean hasReadinessProbe(); + + /** + * + * + *
+   * Readiness probe to be used for health checks.
+   * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + * + * @return The readinessProbe. + */ + com.google.cloud.run.v2.Probe getReadinessProbe(); + + /** + * + * + *
+   * Readiness probe to be used for health checks.
+   * 
+ * + * .google.cloud.run.v2.Probe readiness_probe = 14; + */ + com.google.cloud.run.v2.ProbeOrBuilder getReadinessProbeOrBuilder(); + /** * * diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatus.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatus.java new file mode 100644 index 000000000000..a6e147f4d728 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatus.java @@ -0,0 +1,844 @@ +/* + * Copyright 2026 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/run/v2/container_status.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** + * + * + *
+ * ContainerStatus holds the information of container name and image digest
+ * value.
+ * 
+ * + * Protobuf type {@code google.cloud.run.v2.ContainerStatus} + */ +public final class ContainerStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.ContainerStatus) + ContainerStatusOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ContainerStatus.newBuilder() to construct. + private ContainerStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerStatus() { + name_ = ""; + imageDigest_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.ContainerStatusProto + .internal_static_google_cloud_run_v2_ContainerStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.ContainerStatusProto + .internal_static_google_cloud_run_v2_ContainerStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.ContainerStatus.class, + com.google.cloud.run.v2.ContainerStatus.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * The name of the container, if specified.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the container, if specified.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_DIGEST_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageDigest_ = ""; + + /** + * + * + *
+   * ImageDigest holds the resolved digest for the image specified and resolved
+   * during the creation of Revision. This field holds the digest value
+   * regardless of whether a tag or digest was originally specified in the
+   * Container object.
+   * 
+ * + * string image_digest = 2; + * + * @return The imageDigest. + */ + @java.lang.Override + public java.lang.String getImageDigest() { + java.lang.Object ref = imageDigest_; + 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(); + imageDigest_ = s; + return s; + } + } + + /** + * + * + *
+   * ImageDigest holds the resolved digest for the image specified and resolved
+   * during the creation of Revision. This field holds the digest value
+   * regardless of whether a tag or digest was originally specified in the
+   * Container object.
+   * 
+ * + * string image_digest = 2; + * + * @return The bytes for imageDigest. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageDigestBytes() { + java.lang.Object ref = imageDigest_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageDigest_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageDigest_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageDigest_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageDigest_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageDigest_); + } + 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.run.v2.ContainerStatus)) { + return super.equals(obj); + } + com.google.cloud.run.v2.ContainerStatus other = (com.google.cloud.run.v2.ContainerStatus) obj; + + if (!getName().equals(other.getName())) return false; + if (!getImageDigest().equals(other.getImageDigest())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + IMAGE_DIGEST_FIELD_NUMBER; + hash = (53 * hash) + getImageDigest().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.ContainerStatus parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ContainerStatus 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.run.v2.ContainerStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ContainerStatus 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.run.v2.ContainerStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ContainerStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.ContainerStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ContainerStatus 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.run.v2.ContainerStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ContainerStatus 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.run.v2.ContainerStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ContainerStatus 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.run.v2.ContainerStatus 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; + } + + /** + * + * + *
+   * ContainerStatus holds the information of container name and image digest
+   * value.
+   * 
+ * + * Protobuf type {@code google.cloud.run.v2.ContainerStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.ContainerStatus) + com.google.cloud.run.v2.ContainerStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.ContainerStatusProto + .internal_static_google_cloud_run_v2_ContainerStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.ContainerStatusProto + .internal_static_google_cloud_run_v2_ContainerStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.ContainerStatus.class, + com.google.cloud.run.v2.ContainerStatus.Builder.class); + } + + // Construct using com.google.cloud.run.v2.ContainerStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + imageDigest_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.ContainerStatusProto + .internal_static_google_cloud_run_v2_ContainerStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.ContainerStatus getDefaultInstanceForType() { + return com.google.cloud.run.v2.ContainerStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.ContainerStatus build() { + com.google.cloud.run.v2.ContainerStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.ContainerStatus buildPartial() { + com.google.cloud.run.v2.ContainerStatus result = + new com.google.cloud.run.v2.ContainerStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.run.v2.ContainerStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.imageDigest_ = imageDigest_; + } + } + + @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.run.v2.ContainerStatus) { + return mergeFrom((com.google.cloud.run.v2.ContainerStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.ContainerStatus other) { + if (other == com.google.cloud.run.v2.ContainerStatus.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getImageDigest().isEmpty()) { + imageDigest_ = other.imageDigest_; + bitField0_ |= 0x00000002; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + imageDigest_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * The name of the container, if specified.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the container, if specified.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the container, if specified.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the container, if specified.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the container, if specified.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object imageDigest_ = ""; + + /** + * + * + *
+     * ImageDigest holds the resolved digest for the image specified and resolved
+     * during the creation of Revision. This field holds the digest value
+     * regardless of whether a tag or digest was originally specified in the
+     * Container object.
+     * 
+ * + * string image_digest = 2; + * + * @return The imageDigest. + */ + public java.lang.String getImageDigest() { + java.lang.Object ref = imageDigest_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageDigest_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * ImageDigest holds the resolved digest for the image specified and resolved
+     * during the creation of Revision. This field holds the digest value
+     * regardless of whether a tag or digest was originally specified in the
+     * Container object.
+     * 
+ * + * string image_digest = 2; + * + * @return The bytes for imageDigest. + */ + public com.google.protobuf.ByteString getImageDigestBytes() { + java.lang.Object ref = imageDigest_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageDigest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * ImageDigest holds the resolved digest for the image specified and resolved
+     * during the creation of Revision. This field holds the digest value
+     * regardless of whether a tag or digest was originally specified in the
+     * Container object.
+     * 
+ * + * string image_digest = 2; + * + * @param value The imageDigest to set. + * @return This builder for chaining. + */ + public Builder setImageDigest(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageDigest_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * ImageDigest holds the resolved digest for the image specified and resolved
+     * during the creation of Revision. This field holds the digest value
+     * regardless of whether a tag or digest was originally specified in the
+     * Container object.
+     * 
+ * + * string image_digest = 2; + * + * @return This builder for chaining. + */ + public Builder clearImageDigest() { + imageDigest_ = getDefaultInstance().getImageDigest(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * ImageDigest holds the resolved digest for the image specified and resolved
+     * during the creation of Revision. This field holds the digest value
+     * regardless of whether a tag or digest was originally specified in the
+     * Container object.
+     * 
+ * + * string image_digest = 2; + * + * @param value The bytes for imageDigest to set. + * @return This builder for chaining. + */ + public Builder setImageDigestBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageDigest_ = 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.run.v2.ContainerStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.ContainerStatus) + private static final com.google.cloud.run.v2.ContainerStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.ContainerStatus(); + } + + public static com.google.cloud.run.v2.ContainerStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerStatus 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.run.v2.ContainerStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatusOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatusOrBuilder.java new file mode 100644 index 000000000000..daa675a715f3 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatusOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 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/run/v2/container_status.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface ContainerStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.ContainerStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the container, if specified.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * The name of the container, if specified.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * ImageDigest holds the resolved digest for the image specified and resolved
+   * during the creation of Revision. This field holds the digest value
+   * regardless of whether a tag or digest was originally specified in the
+   * Container object.
+   * 
+ * + * string image_digest = 2; + * + * @return The imageDigest. + */ + java.lang.String getImageDigest(); + + /** + * + * + *
+   * ImageDigest holds the resolved digest for the image specified and resolved
+   * during the creation of Revision. This field holds the digest value
+   * regardless of whether a tag or digest was originally specified in the
+   * Container object.
+   * 
+ * + * string image_digest = 2; + * + * @return The bytes for imageDigest. + */ + com.google.protobuf.ByteString getImageDigestBytes(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatusProto.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatusProto.java new file mode 100644 index 000000000000..8f6adf3354f6 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ContainerStatusProto.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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/run/v2/container_status.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public final class ContainerStatusProto { + private ContainerStatusProto() {} + + 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_run_v2_ContainerStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_ContainerStatus_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/run/v2/container_status.p" + + "roto\022\023google.cloud.run.v2\"5\n\017ContainerSt" + + "atus\022\014\n\004name\030\001 \001(\t\022\024\n\014image_digest\030\002 \001(\t" + + "B\\\n\027com.google.cloud.run.v2B\024ContainerSt" + + "atusProtoP\001Z)cloud.google.com/go/run/api" + + "v2/runpb;runpbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_run_v2_ContainerStatus_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_run_v2_ContainerStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_run_v2_ContainerStatus_descriptor, + new java.lang.String[] { + "Name", "ImageDigest", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/CreateInstanceRequest.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/CreateInstanceRequest.java new file mode 100644 index 000000000000..dd1fc13df611 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/CreateInstanceRequest.java @@ -0,0 +1,1120 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** Protobuf type {@code google.cloud.run.v2.CreateInstanceRequest} */ +public final class CreateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.CreateInstanceRequest) + CreateInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateInstanceRequest.newBuilder() to construct. + private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInstanceRequest() { + parent_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.CreateInstanceRequest.class, + com.google.cloud.run.v2.CreateInstanceRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * 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; + } + } + + /** + * + * 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 INSTANCE_FIELD_NUMBER = 2; + private com.google.cloud.run.v2.Instance instance_; + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.run.v2.Instance getInstance() { + return instance_ == null ? com.google.cloud.run.v2.Instance.getDefaultInstance() : instance_; + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.InstanceOrBuilder getInstanceOrBuilder() { + return instance_ == null ? com.google.cloud.run.v2.Instance.getDefaultInstance() : instance_; + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + + /** + * + * + *
+   * Required. The unique identifier for the Instance. It must begin with
+   * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+   * The name of the instance becomes {parent}/instances/{instance_id}.
+   * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The unique identifier for the Instance. It must begin with
+   * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+   * The name of the instance becomes {parent}/instances/{instance_id}.
+   * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. Indicates that the request should be validated and default values
+   * populated, without persisting the request or creating any resources.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInstance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instanceId_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInstance()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instanceId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + 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.run.v2.CreateInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.run.v2.CreateInstanceRequest other = + (com.google.cloud.run.v2.CreateInstanceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.CreateInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.CreateInstanceRequest 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.run.v2.CreateInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.CreateInstanceRequest 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.run.v2.CreateInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.CreateInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.CreateInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.CreateInstanceRequest 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.run.v2.CreateInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.CreateInstanceRequest 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.run.v2.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.CreateInstanceRequest 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.run.v2.CreateInstanceRequest 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; + } + + /** Protobuf type {@code google.cloud.run.v2.CreateInstanceRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.CreateInstanceRequest) + com.google.cloud.run.v2.CreateInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.CreateInstanceRequest.class, + com.google.cloud.run.v2.CreateInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.run.v2.CreateInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstanceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + instance_ = null; + if (instanceBuilder_ != null) { + instanceBuilder_.dispose(); + instanceBuilder_ = null; + } + instanceId_ = ""; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.CreateInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.run.v2.CreateInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.CreateInstanceRequest build() { + com.google.cloud.run.v2.CreateInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.CreateInstanceRequest buildPartial() { + com.google.cloud.run.v2.CreateInstanceRequest result = + new com.google.cloud.run.v2.CreateInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.run.v2.CreateInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instance_ = instanceBuilder_ == null ? instance_ : instanceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.run.v2.CreateInstanceRequest) { + return mergeFrom((com.google.cloud.run.v2.CreateInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.CreateInstanceRequest other) { + if (other == com.google.cloud.run.v2.CreateInstanceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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: + { + input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + 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 bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * 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; + } + } + + /** + * + * 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; + } + } + + /** + * + * 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; + } + + /** + * + * 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; + } + + /** + * + * 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.cloud.run.v2.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Instance, + com.google.cloud.run.v2.Instance.Builder, + com.google.cloud.run.v2.InstanceOrBuilder> + instanceBuilder_; + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + public com.google.cloud.run.v2.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.run.v2.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstance(com.google.cloud.run.v2.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + } else { + instanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstance(com.google.cloud.run.v2.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstance(com.google.cloud.run.v2.Instance value) { + if (instanceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && instance_ != null + && instance_ != com.google.cloud.run.v2.Instance.getDefaultInstance()) { + getInstanceBuilder().mergeFrom(value); + } else { + instance_ = value; + } + } else { + instanceBuilder_.mergeFrom(value); + } + if (instance_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstance() { + bitField0_ = (bitField0_ & ~0x00000002); + instance_ = null; + if (instanceBuilder_ != null) { + instanceBuilder_.dispose(); + instanceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.run.v2.Instance.Builder getInstanceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.run.v2.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.run.v2.Instance.getDefaultInstance() + : instance_; + } + } + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Instance, + com.google.cloud.run.v2.Instance.Builder, + com.google.cloud.run.v2.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Instance, + com.google.cloud.run.v2.Instance.Builder, + com.google.cloud.run.v2.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object instanceId_ = ""; + + /** + * + * + *
+     * Required. The unique identifier for the Instance. It must begin with
+     * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+     * The name of the instance becomes {parent}/instances/{instance_id}.
+     * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier for the Instance. It must begin with
+     * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+     * The name of the instance becomes {parent}/instances/{instance_id}.
+     * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The unique identifier for the Instance. It must begin with
+     * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+     * The name of the instance becomes {parent}/instances/{instance_id}.
+     * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier for the Instance. It must begin with
+     * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+     * The name of the instance becomes {parent}/instances/{instance_id}.
+     * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The unique identifier for the Instance. It must begin with
+     * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+     * The name of the instance becomes {parent}/instances/{instance_id}.
+     * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. Indicates that the request should be validated and default values
+     * populated, without persisting the request or creating any resources.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. Indicates that the request should be validated and default values
+     * populated, without persisting the request or creating any resources.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates that the request should be validated and default values
+     * populated, without persisting the request or creating any resources.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + 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.run.v2.CreateInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.CreateInstanceRequest) + private static final com.google.cloud.run.v2.CreateInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.CreateInstanceRequest(); + } + + public static com.google.cloud.run.v2.CreateInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstanceRequest 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.run.v2.CreateInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/CreateInstanceRequestOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/CreateInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..0ffa47813f24 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/CreateInstanceRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface CreateInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.CreateInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + com.google.cloud.run.v2.Instance getInstance(); + + /** + * .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.run.v2.InstanceOrBuilder getInstanceOrBuilder(); + + /** + * + * + *
+   * Required. The unique identifier for the Instance. It must begin with
+   * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+   * The name of the instance becomes {parent}/instances/{instance_id}.
+   * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + + /** + * + * + *
+   * Required. The unique identifier for the Instance. It must begin with
+   * letter, and cannot end with hyphen; must contain fewer than 50 characters.
+   * The name of the instance becomes {parent}/instances/{instance_id}.
+   * 
+ * + * string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Optional. Indicates that the request should be validated and default values
+   * populated, without persisting the request or creating any resources.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteInstanceRequest.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteInstanceRequest.java new file mode 100644 index 000000000000..500b786a394b --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteInstanceRequest.java @@ -0,0 +1,886 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** Protobuf type {@code google.cloud.run.v2.DeleteInstanceRequest} */ +public final class DeleteInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.DeleteInstanceRequest) + DeleteInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteInstanceRequest.newBuilder() to construct. + private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInstanceRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.DeleteInstanceRequest.class, + com.google.cloud.run.v2.DeleteInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. Indicates that the request should be validated without actually
+   * deleting any resources.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the
+   * resource. May be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the
+   * resource. May be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, etag_); + } + 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.run.v2.DeleteInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.run.v2.DeleteInstanceRequest other = + (com.google.cloud.run.v2.DeleteInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest 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.run.v2.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest 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.run.v2.DeleteInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest 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.run.v2.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest 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.run.v2.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest 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.run.v2.DeleteInstanceRequest 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; + } + + /** Protobuf type {@code google.cloud.run.v2.DeleteInstanceRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.DeleteInstanceRequest) + com.google.cloud.run.v2.DeleteInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.DeleteInstanceRequest.class, + com.google.cloud.run.v2.DeleteInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.run.v2.DeleteInstanceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + validateOnly_ = false; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.DeleteInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.run.v2.DeleteInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.DeleteInstanceRequest build() { + com.google.cloud.run.v2.DeleteInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.DeleteInstanceRequest buildPartial() { + com.google.cloud.run.v2.DeleteInstanceRequest result = + new com.google.cloud.run.v2.DeleteInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.run.v2.DeleteInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + } + + @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.run.v2.DeleteInstanceRequest) { + return mergeFrom((com.google.cloud.run.v2.DeleteInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.DeleteInstanceRequest other) { + if (other == com.google.cloud.run.v2.DeleteInstanceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + 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 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + etag_ = 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 java.lang.Object name_ = ""; + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * deleting any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * deleting any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * deleting any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = 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.run.v2.DeleteInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.DeleteInstanceRequest) + private static final com.google.cloud.run.v2.DeleteInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.DeleteInstanceRequest(); + } + + public static com.google.cloud.run.v2.DeleteInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInstanceRequest 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.run.v2.DeleteInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteInstanceRequestOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..5ff5c9444766 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteInstanceRequestOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface DeleteInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.DeleteInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Indicates that the request should be validated without actually
+   * deleting any resources.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the
+   * resource. May be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the
+   * resource. May be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetInstanceRequest.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetInstanceRequest.java new file mode 100644 index 000000000000..55281b8326c6 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetInstanceRequest.java @@ -0,0 +1,589 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** Protobuf type {@code google.cloud.run.v2.GetInstanceRequest} */ +public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.GetInstanceRequest) + GetInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetInstanceRequest.newBuilder() to construct. + private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.GetInstanceRequest.class, + com.google.cloud.run.v2.GetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.run.v2.GetInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.run.v2.GetInstanceRequest other = + (com.google.cloud.run.v2.GetInstanceRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.GetInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.GetInstanceRequest 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.run.v2.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.GetInstanceRequest 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.run.v2.GetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.GetInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.GetInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.GetInstanceRequest 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.run.v2.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.GetInstanceRequest 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.run.v2.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.GetInstanceRequest 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.run.v2.GetInstanceRequest 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; + } + + /** Protobuf type {@code google.cloud.run.v2.GetInstanceRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.GetInstanceRequest) + com.google.cloud.run.v2.GetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.GetInstanceRequest.class, + com.google.cloud.run.v2.GetInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.run.v2.GetInstanceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_GetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.GetInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.run.v2.GetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.GetInstanceRequest build() { + com.google.cloud.run.v2.GetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.GetInstanceRequest buildPartial() { + com.google.cloud.run.v2.GetInstanceRequest result = + new com.google.cloud.run.v2.GetInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.run.v2.GetInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.run.v2.GetInstanceRequest) { + return mergeFrom((com.google.cloud.run.v2.GetInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.GetInstanceRequest other) { + if (other == com.google.cloud.run.v2.GetInstanceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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: + { + name_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.run.v2.GetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.GetInstanceRequest) + private static final com.google.cloud.run.v2.GetInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.GetInstanceRequest(); + } + + public static com.google.cloud.run.v2.GetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceRequest 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.run.v2.GetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetInstanceRequestOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..371a46bb07c9 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetInstanceRequestOrBuilder.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface GetInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.GetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Instance.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Instance.java new file mode 100644 index 000000000000..186ed35be9d1 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Instance.java @@ -0,0 +1,9819 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** + * + * + *
+ * A Cloud Run Instance represents a single group of containers running in a
+ * region.
+ * 
+ * + * Protobuf type {@code google.cloud.run.v2.Instance} + */ +public final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() { + name_ = ""; + description_ = ""; + uid_ = ""; + creator_ = ""; + lastModifier_ = ""; + client_ = ""; + clientVersion_ = ""; + launchStage_ = 0; + serviceAccount_ = ""; + containers_ = java.util.Collections.emptyList(); + volumes_ = java.util.Collections.emptyList(); + encryptionKey_ = ""; + encryptionKeyRevocationAction_ = 0; + ingress_ = 0; + logUri_ = ""; + conditions_ = java.util.Collections.emptyList(); + containerStatuses_ = java.util.Collections.emptyList(); + urls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetLabels(); + case 7: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.Instance.class, com.google.cloud.run.v2.Instance.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * The fully qualified name of this Instance. In CreateInstanceRequest, this
+   * field is ignored, and instead composed from CreateInstanceRequest.parent
+   * and CreateInstanceRequest.instance_id.
+   *
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance_id}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * The fully qualified name of this Instance. In CreateInstanceRequest, this
+   * field is ignored, and instead composed from CreateInstanceRequest.parent
+   * and CreateInstanceRequest.instance_id.
+   *
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance_id}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * User-provided description of the Instance. This field currently has a
+   * 512-character limit.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * User-provided description of the Instance. This field currently has a
+   * 512-character limit.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. Server assigned unique identifier for the trigger. The value
+   * is a UUID4 string and guaranteed to remain unchanged until the resource is
+   * deleted.
+   * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server assigned unique identifier for the trigger. The value
+   * is a UUID4 string and guaranteed to remain unchanged until the resource is
+   * deleted.
+   * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERATION_FIELD_NUMBER = 5; + private long generation_ = 0L; + + /** + * + * + *
+   * Output only. A number that monotonically increases every time the user
+   * modifies the desired state.
+   * Please note that unlike v1, this is an int64 value. As with most Google
+   * APIs, its JSON representation will be a `string` instead of an `integer`.
+   * 
+ * + * int64 generation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_Instance_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** map<string, string> labels = 6; */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** map<string, string> labels = 6; */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** map<string, string> labels = 6; */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** map<string, string> labels = 6; */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 7; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_Instance_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** map<string, string> annotations = 7; */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** map<string, string> annotations = 7; */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** map<string, string> annotations = 7; */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** map<string, string> annotations = 7; */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The last-modified time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The last-modified time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The last-modified time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp deleteTime_; + + /** + * + * + *
+   * Output only. The deletion time.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The deletion time.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + /** + * + * + *
+   * Output only. The deletion time.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp expireTime_; + + /** + * + * + *
+   * Output only. For a deleted resource, the time after which it will be
+   * permamently deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. For a deleted resource, the time after which it will be
+   * permamently deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + /** + * + * + *
+   * Output only. For a deleted resource, the time after which it will be
+   * permamently deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + public static final int CREATOR_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object creator_ = ""; + + /** + * + * + *
+   * Output only. Email address of the authenticated creator.
+   * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The creator. + */ + @java.lang.Override + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + 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(); + creator_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Email address of the authenticated creator.
+   * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for creator. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_MODIFIER_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object lastModifier_ = ""; + + /** + * + * + *
+   * Output only. Email address of the last authenticated modifier.
+   * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastModifier. + */ + @java.lang.Override + public java.lang.String getLastModifier() { + java.lang.Object ref = lastModifier_; + 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(); + lastModifier_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Email address of the last authenticated modifier.
+   * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for lastModifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastModifierBytes() { + java.lang.Object ref = lastModifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastModifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object client_ = ""; + + /** + * + * + *
+   * Arbitrary identifier for the API client.
+   * 
+ * + * string client = 14; + * + * @return The client. + */ + @java.lang.Override + public java.lang.String getClient() { + java.lang.Object ref = client_; + 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(); + client_ = s; + return s; + } + } + + /** + * + * + *
+   * Arbitrary identifier for the API client.
+   * 
+ * + * string client = 14; + * + * @return The bytes for client. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientBytes() { + java.lang.Object ref = client_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + client_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_VERSION_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientVersion_ = ""; + + /** + * + * + *
+   * Arbitrary version identifier for the API client.
+   * 
+ * + * string client_version = 15; + * + * @return The clientVersion. + */ + @java.lang.Override + public java.lang.String getClientVersion() { + java.lang.Object ref = clientVersion_; + 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(); + clientVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Arbitrary version identifier for the API client.
+   * 
+ * + * string client_version = 15; + * + * @return The bytes for clientVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientVersionBytes() { + java.lang.Object ref = clientVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAUNCH_STAGE_FIELD_NUMBER = 16; + private int launchStage_ = 0; + + /** + * + * + *
+   * The launch stage as defined by [Google Cloud Platform
+   *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+   *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+   *  is assumed.
+   *  Set the launch stage to a preview stage on input to allow use of preview
+   *  features in that stage. On read (or output), describes whether the
+   *  resource uses preview features.
+   * <p>
+   *  For example, if ALPHA is provided as input, but only BETA and GA-level
+   *  features are used, this field will be BETA on output.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + public int getLaunchStageValue() { + return launchStage_; + } + + /** + * + * + *
+   * The launch stage as defined by [Google Cloud Platform
+   *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+   *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+   *  is assumed.
+   *  Set the launch stage to a preview stage on input to allow use of preview
+   *  features in that stage. On read (or output), describes whether the
+   *  resource uses preview features.
+   * <p>
+   *  For example, if ALPHA is provided as input, but only BETA and GA-level
+   *  features are used, this field will be BETA on output.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @return The launchStage. + */ + @java.lang.Override + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + + public static final int BINARY_AUTHORIZATION_FIELD_NUMBER = 17; + private com.google.cloud.run.v2.BinaryAuthorization binaryAuthorization_; + + /** + * + * + *
+   * Settings for the Binary Authorization feature.
+   * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + * + * @return Whether the binaryAuthorization field is set. + */ + @java.lang.Override + public boolean hasBinaryAuthorization() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Settings for the Binary Authorization feature.
+   * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + * + * @return The binaryAuthorization. + */ + @java.lang.Override + public com.google.cloud.run.v2.BinaryAuthorization getBinaryAuthorization() { + return binaryAuthorization_ == null + ? com.google.cloud.run.v2.BinaryAuthorization.getDefaultInstance() + : binaryAuthorization_; + } + + /** + * + * + *
+   * Settings for the Binary Authorization feature.
+   * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + @java.lang.Override + public com.google.cloud.run.v2.BinaryAuthorizationOrBuilder getBinaryAuthorizationOrBuilder() { + return binaryAuthorization_ == null + ? com.google.cloud.run.v2.BinaryAuthorization.getDefaultInstance() + : binaryAuthorization_; + } + + public static final int VPC_ACCESS_FIELD_NUMBER = 18; + private com.google.cloud.run.v2.VpcAccess vpcAccess_; + + /** + * + * + *
+   * Optional. VPC Access configuration to use for this Revision. For more
+   * information, visit
+   * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+   * 
+ * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vpcAccess field is set. + */ + @java.lang.Override + public boolean hasVpcAccess() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. VPC Access configuration to use for this Revision. For more
+   * information, visit
+   * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+   * 
+ * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vpcAccess. + */ + @java.lang.Override + public com.google.cloud.run.v2.VpcAccess getVpcAccess() { + return vpcAccess_ == null ? com.google.cloud.run.v2.VpcAccess.getDefaultInstance() : vpcAccess_; + } + + /** + * + * + *
+   * Optional. VPC Access configuration to use for this Revision. For more
+   * information, visit
+   * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+   * 
+ * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.VpcAccessOrBuilder getVpcAccessOrBuilder() { + return vpcAccess_ == null ? com.google.cloud.run.v2.VpcAccess.getDefaultInstance() : vpcAccess_; + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + + /** + * string service_account = 19; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + + /** + * string service_account = 19; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINERS_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private java.util.List containers_; + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getContainersList() { + return containers_; + } + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getContainersOrBuilderList() { + return containers_; + } + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getContainersCount() { + return containers_.size(); + } + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.Container getContainers(int index) { + return containers_.get(index); + } + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.ContainerOrBuilder getContainersOrBuilder(int index) { + return containers_.get(index); + } + + public static final int VOLUMES_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private java.util.List volumes_; + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + @java.lang.Override + public java.util.List getVolumesList() { + return volumes_; + } + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + @java.lang.Override + public java.util.List + getVolumesOrBuilderList() { + return volumes_; + } + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + @java.lang.Override + public int getVolumesCount() { + return volumes_.size(); + } + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + @java.lang.Override + public com.google.cloud.run.v2.Volume getVolumes(int index) { + return volumes_.get(index); + } + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + @java.lang.Override + public com.google.cloud.run.v2.VolumeOrBuilder getVolumesOrBuilder(int index) { + return volumes_.get(index); + } + + public static final int ENCRYPTION_KEY_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private volatile java.lang.Object encryptionKey_ = ""; + + /** + * + * + *
+   * A reference to a customer managed encryption key (CMEK) to use to encrypt
+   * this container image. For more information, go to
+   * https://cloud.google.com/run/docs/securing/using-cmek
+   * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @return The encryptionKey. + */ + @java.lang.Override + public java.lang.String getEncryptionKey() { + java.lang.Object ref = encryptionKey_; + 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(); + encryptionKey_ = s; + return s; + } + } + + /** + * + * + *
+   * A reference to a customer managed encryption key (CMEK) to use to encrypt
+   * this container image. For more information, go to
+   * https://cloud.google.com/run/docs/securing/using-cmek
+   * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for encryptionKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEncryptionKeyBytes() { + java.lang.Object ref = encryptionKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + encryptionKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENCRYPTION_KEY_REVOCATION_ACTION_FIELD_NUMBER = 24; + private int encryptionKeyRevocationAction_ = 0; + + /** + * + * + *
+   * The action to take if the encryption key is revoked.
+   * 
+ * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @return The enum numeric value on the wire for encryptionKeyRevocationAction. + */ + @java.lang.Override + public int getEncryptionKeyRevocationActionValue() { + return encryptionKeyRevocationAction_; + } + + /** + * + * + *
+   * The action to take if the encryption key is revoked.
+   * 
+ * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @return The encryptionKeyRevocationAction. + */ + @java.lang.Override + public com.google.cloud.run.v2.EncryptionKeyRevocationAction getEncryptionKeyRevocationAction() { + com.google.cloud.run.v2.EncryptionKeyRevocationAction result = + com.google.cloud.run.v2.EncryptionKeyRevocationAction.forNumber( + encryptionKeyRevocationAction_); + return result == null + ? com.google.cloud.run.v2.EncryptionKeyRevocationAction.UNRECOGNIZED + : result; + } + + public static final int ENCRYPTION_KEY_SHUTDOWN_DURATION_FIELD_NUMBER = 25; + private com.google.protobuf.Duration encryptionKeyShutdownDuration_; + + /** + * + * + *
+   * If encryption_key_revocation_action is SHUTDOWN, the duration before
+   * shutting down all instances. The minimum increment is 1 hour.
+   * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + * + * @return Whether the encryptionKeyShutdownDuration field is set. + */ + @java.lang.Override + public boolean hasEncryptionKeyShutdownDuration() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * If encryption_key_revocation_action is SHUTDOWN, the duration before
+   * shutting down all instances. The minimum increment is 1 hour.
+   * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + * + * @return The encryptionKeyShutdownDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getEncryptionKeyShutdownDuration() { + return encryptionKeyShutdownDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : encryptionKeyShutdownDuration_; + } + + /** + * + * + *
+   * If encryption_key_revocation_action is SHUTDOWN, the duration before
+   * shutting down all instances. The minimum increment is 1 hour.
+   * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEncryptionKeyShutdownDurationOrBuilder() { + return encryptionKeyShutdownDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : encryptionKeyShutdownDuration_; + } + + public static final int NODE_SELECTOR_FIELD_NUMBER = 26; + private com.google.cloud.run.v2.NodeSelector nodeSelector_; + + /** + * + * + *
+   * Optional. The node selector for the instance.
+   * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nodeSelector field is set. + */ + @java.lang.Override + public boolean hasNodeSelector() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. The node selector for the instance.
+   * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeSelector. + */ + @java.lang.Override + public com.google.cloud.run.v2.NodeSelector getNodeSelector() { + return nodeSelector_ == null + ? com.google.cloud.run.v2.NodeSelector.getDefaultInstance() + : nodeSelector_; + } + + /** + * + * + *
+   * Optional. The node selector for the instance.
+   * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.NodeSelectorOrBuilder getNodeSelectorOrBuilder() { + return nodeSelector_ == null + ? com.google.cloud.run.v2.NodeSelector.getDefaultInstance() + : nodeSelector_; + } + + public static final int GPU_ZONAL_REDUNDANCY_DISABLED_FIELD_NUMBER = 27; + private boolean gpuZonalRedundancyDisabled_ = false; + + /** + * + * + *
+   * Optional. True if GPU zonal redundancy is disabled on this instance.
+   * 
+ * + * + * optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gpuZonalRedundancyDisabled field is set. + */ + @java.lang.Override + public boolean hasGpuZonalRedundancyDisabled() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. True if GPU zonal redundancy is disabled on this instance.
+   * 
+ * + * + * optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gpuZonalRedundancyDisabled. + */ + @java.lang.Override + public boolean getGpuZonalRedundancyDisabled() { + return gpuZonalRedundancyDisabled_; + } + + public static final int INGRESS_FIELD_NUMBER = 28; + private int ingress_ = 0; + + /** + * + * + *
+   * Optional. Provides the ingress settings for this Instance. On output,
+   * returns the currently observed ingress settings, or
+   * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+   * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ingress. + */ + @java.lang.Override + public int getIngressValue() { + return ingress_; + } + + /** + * + * + *
+   * Optional. Provides the ingress settings for this Instance. On output,
+   * returns the currently observed ingress settings, or
+   * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+   * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ingress. + */ + @java.lang.Override + public com.google.cloud.run.v2.IngressTraffic getIngress() { + com.google.cloud.run.v2.IngressTraffic result = + com.google.cloud.run.v2.IngressTraffic.forNumber(ingress_); + return result == null ? com.google.cloud.run.v2.IngressTraffic.UNRECOGNIZED : result; + } + + public static final int INVOKER_IAM_DISABLED_FIELD_NUMBER = 29; + private boolean invokerIamDisabled_ = false; + + /** + * + * + *
+   * Optional. Disables IAM permission check for run.routes.invoke for callers
+   * of this Instance. For more information, visit
+   * https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
+   * 
+ * + * bool invoker_iam_disabled = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The invokerIamDisabled. + */ + @java.lang.Override + public boolean getInvokerIamDisabled() { + return invokerIamDisabled_; + } + + public static final int IAP_ENABLED_FIELD_NUMBER = 30; + private boolean iapEnabled_ = false; + + /** + * + * + *
+   * Optional. IAP settings on the Instance.
+   * 
+ * + * bool iap_enabled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The iapEnabled. + */ + @java.lang.Override + public boolean getIapEnabled() { + return iapEnabled_; + } + + public static final int OBSERVED_GENERATION_FIELD_NUMBER = 40; + private long observedGeneration_ = 0L; + + /** + * + * + *
+   * Output only. The generation of this Instance currently serving traffic. See
+   * comments in `reconciling` for additional information on reconciliation
+   * process in Cloud Run. Please note that unlike v1, this is an int64 value.
+   * As with most Google APIs, its JSON representation will be a `string`
+   * instead of an `integer`.
+   * 
+ * + * int64 observed_generation = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The observedGeneration. + */ + @java.lang.Override + public long getObservedGeneration() { + return observedGeneration_; + } + + public static final int LOG_URI_FIELD_NUMBER = 41; + + @SuppressWarnings("serial") + private volatile java.lang.Object logUri_ = ""; + + /** + * + * + *
+   * Output only. The Google Console URI to obtain logs for the Instance.
+   * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logUri. + */ + @java.lang.Override + public java.lang.String getLogUri() { + java.lang.Object ref = logUri_; + 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(); + logUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google Console URI to obtain logs for the Instance.
+   * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLogUriBytes() { + java.lang.Object ref = logUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERMINAL_CONDITION_FIELD_NUMBER = 42; + private com.google.cloud.run.v2.Condition terminalCondition_; + + /** + * + * + *
+   * Output only. The Condition of this Instance, containing its readiness
+   * status, and detailed error information in case it did not reach a serving
+   * state. See comments in `reconciling` for additional information on
+   * reconciliation process in Cloud Run.
+   * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminalCondition field is set. + */ + @java.lang.Override + public boolean hasTerminalCondition() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Output only. The Condition of this Instance, containing its readiness
+   * status, and detailed error information in case it did not reach a serving
+   * state. See comments in `reconciling` for additional information on
+   * reconciliation process in Cloud Run.
+   * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminalCondition. + */ + @java.lang.Override + public com.google.cloud.run.v2.Condition getTerminalCondition() { + return terminalCondition_ == null + ? com.google.cloud.run.v2.Condition.getDefaultInstance() + : terminalCondition_; + } + + /** + * + * + *
+   * Output only. The Condition of this Instance, containing its readiness
+   * status, and detailed error information in case it did not reach a serving
+   * state. See comments in `reconciling` for additional information on
+   * reconciliation process in Cloud Run.
+   * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.ConditionOrBuilder getTerminalConditionOrBuilder() { + return terminalCondition_ == null + ? com.google.cloud.run.v2.Condition.getDefaultInstance() + : terminalCondition_; + } + + public static final int CONDITIONS_FIELD_NUMBER = 43; + + @SuppressWarnings("serial") + private java.util.List conditions_; + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getConditionsList() { + return conditions_; + } + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getConditionsOrBuilderList() { + return conditions_; + } + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getConditionsCount() { + return conditions_.size(); + } + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.Condition getConditions(int index) { + return conditions_.get(index); + } + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.ConditionOrBuilder getConditionsOrBuilder(int index) { + return conditions_.get(index); + } + + public static final int CONTAINER_STATUSES_FIELD_NUMBER = 44; + + @SuppressWarnings("serial") + private java.util.List containerStatuses_; + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getContainerStatusesList() { + return containerStatuses_; + } + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getContainerStatusesOrBuilderList() { + return containerStatuses_; + } + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getContainerStatusesCount() { + return containerStatuses_.size(); + } + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.ContainerStatus getContainerStatuses(int index) { + return containerStatuses_.get(index); + } + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.run.v2.ContainerStatusOrBuilder getContainerStatusesOrBuilder(int index) { + return containerStatuses_.get(index); + } + + public static final int SATISFIES_PZS_FIELD_NUMBER = 46; + private boolean satisfiesPzs_ = false; + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + + public static final int URLS_FIELD_NUMBER = 45; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList urls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. All URLs serving traffic for this Instance.
+   * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the urls. + */ + public com.google.protobuf.ProtocolStringList getUrlsList() { + return urls_; + } + + /** + * + * + *
+   * Output only. All URLs serving traffic for this Instance.
+   * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of urls. + */ + public int getUrlsCount() { + return urls_.size(); + } + + /** + * + * + *
+   * Output only. All URLs serving traffic for this Instance.
+   * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The urls at the given index. + */ + public java.lang.String getUrls(int index) { + return urls_.get(index); + } + + /** + * + * + *
+   * Output only. All URLs serving traffic for this Instance.
+   * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the urls at the given index. + */ + public com.google.protobuf.ByteString getUrlsBytes(int index) { + return urls_.getByteString(index); + } + + public static final int RECONCILING_FIELD_NUMBER = 98; + private boolean reconciling_ = false; + + /** + * + * + *
+   * Output only. Returns true if the Instance is currently being acted upon by
+   * the system to bring it into the desired state.
+   *
+   * When a new Instance is created, or an existing one is updated, Cloud Run
+   * will asynchronously perform all necessary steps to bring the Instance to
+   * the desired serving state. This process is called reconciliation. While
+   * reconciliation is in process, `observed_generation` will have a transient
+   * value that might mismatch the intended state.
+   *  Once reconciliation is over (and this field is false), there are two
+   * possible outcomes: reconciliation succeeded and the serving state matches
+   * the Instance, or there was an error, and reconciliation failed. This state
+   * can be found in `terminal_condition.state`.
+   * 
+ * + * bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + public static final int ETAG_FIELD_NUMBER = 99; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the
+   * resource. May be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the
+   * resource. May be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uid_); + } + if (generation_ != 0L) { + output.writeInt64(5, generation_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 7); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getDeleteTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getExpireTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, creator_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastModifier_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, lastModifier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(client_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, client_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, clientVersion_); + } + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + output.writeEnum(16, launchStage_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(17, getBinaryAuthorization()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(18, getVpcAccess()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, serviceAccount_); + } + for (int i = 0; i < containers_.size(); i++) { + output.writeMessage(20, containers_.get(i)); + } + for (int i = 0; i < volumes_.size(); i++) { + output.writeMessage(21, volumes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encryptionKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, encryptionKey_); + } + if (encryptionKeyRevocationAction_ + != com.google.cloud.run.v2.EncryptionKeyRevocationAction + .ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(24, encryptionKeyRevocationAction_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(25, getEncryptionKeyShutdownDuration()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(26, getNodeSelector()); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeBool(27, gpuZonalRedundancyDisabled_); + } + if (ingress_ + != com.google.cloud.run.v2.IngressTraffic.INGRESS_TRAFFIC_UNSPECIFIED.getNumber()) { + output.writeEnum(28, ingress_); + } + if (invokerIamDisabled_ != false) { + output.writeBool(29, invokerIamDisabled_); + } + if (iapEnabled_ != false) { + output.writeBool(30, iapEnabled_); + } + if (observedGeneration_ != 0L) { + output.writeInt64(40, observedGeneration_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 41, logUri_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(42, getTerminalCondition()); + } + for (int i = 0; i < conditions_.size(); i++) { + output.writeMessage(43, conditions_.get(i)); + } + for (int i = 0; i < containerStatuses_.size(); i++) { + output.writeMessage(44, containerStatuses_.get(i)); + } + for (int i = 0; i < urls_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 45, urls_.getRaw(i)); + } + if (satisfiesPzs_ != false) { + output.writeBool(46, satisfiesPzs_); + } + if (reconciling_ != false) { + output.writeBool(98, reconciling_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 99, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, uid_); + } + if (generation_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, generation_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, annotations__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDeleteTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExpireTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, creator_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastModifier_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, lastModifier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(client_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, client_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, clientVersion_); + } + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, launchStage_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(17, getBinaryAuthorization()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getVpcAccess()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, serviceAccount_); + } + for (int i = 0; i < containers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, containers_.get(i)); + } + for (int i = 0; i < volumes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, volumes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encryptionKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, encryptionKey_); + } + if (encryptionKeyRevocationAction_ + != com.google.cloud.run.v2.EncryptionKeyRevocationAction + .ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(24, encryptionKeyRevocationAction_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, getEncryptionKeyShutdownDuration()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getNodeSelector()); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(27, gpuZonalRedundancyDisabled_); + } + if (ingress_ + != com.google.cloud.run.v2.IngressTraffic.INGRESS_TRAFFIC_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(28, ingress_); + } + if (invokerIamDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(29, invokerIamDisabled_); + } + if (iapEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, iapEnabled_); + } + if (observedGeneration_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(40, observedGeneration_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(41, logUri_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(42, getTerminalCondition()); + } + for (int i = 0; i < conditions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(43, conditions_.get(i)); + } + for (int i = 0; i < containerStatuses_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(44, containerStatuses_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < urls_.size(); i++) { + dataSize += computeStringSizeNoTag(urls_.getRaw(i)); + } + size += dataSize; + size += 2 * getUrlsList().size(); + } + if (satisfiesPzs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(46, satisfiesPzs_); + } + if (reconciling_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(98, reconciling_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(99, etag_); + } + 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.run.v2.Instance)) { + return super.equals(obj); + } + com.google.cloud.run.v2.Instance other = (com.google.cloud.run.v2.Instance) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUid().equals(other.getUid())) return false; + if (getGeneration() != other.getGeneration()) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (!getCreator().equals(other.getCreator())) return false; + if (!getLastModifier().equals(other.getLastModifier())) return false; + if (!getClient().equals(other.getClient())) return false; + if (!getClientVersion().equals(other.getClientVersion())) return false; + if (launchStage_ != other.launchStage_) return false; + if (hasBinaryAuthorization() != other.hasBinaryAuthorization()) return false; + if (hasBinaryAuthorization()) { + if (!getBinaryAuthorization().equals(other.getBinaryAuthorization())) return false; + } + if (hasVpcAccess() != other.hasVpcAccess()) return false; + if (hasVpcAccess()) { + if (!getVpcAccess().equals(other.getVpcAccess())) return false; + } + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getContainersList().equals(other.getContainersList())) return false; + if (!getVolumesList().equals(other.getVolumesList())) return false; + if (!getEncryptionKey().equals(other.getEncryptionKey())) return false; + if (encryptionKeyRevocationAction_ != other.encryptionKeyRevocationAction_) return false; + if (hasEncryptionKeyShutdownDuration() != other.hasEncryptionKeyShutdownDuration()) + return false; + if (hasEncryptionKeyShutdownDuration()) { + if (!getEncryptionKeyShutdownDuration().equals(other.getEncryptionKeyShutdownDuration())) + return false; + } + if (hasNodeSelector() != other.hasNodeSelector()) return false; + if (hasNodeSelector()) { + if (!getNodeSelector().equals(other.getNodeSelector())) return false; + } + if (hasGpuZonalRedundancyDisabled() != other.hasGpuZonalRedundancyDisabled()) return false; + if (hasGpuZonalRedundancyDisabled()) { + if (getGpuZonalRedundancyDisabled() != other.getGpuZonalRedundancyDisabled()) return false; + } + if (ingress_ != other.ingress_) return false; + if (getInvokerIamDisabled() != other.getInvokerIamDisabled()) return false; + if (getIapEnabled() != other.getIapEnabled()) return false; + if (getObservedGeneration() != other.getObservedGeneration()) return false; + if (!getLogUri().equals(other.getLogUri())) return false; + if (hasTerminalCondition() != other.hasTerminalCondition()) return false; + if (hasTerminalCondition()) { + if (!getTerminalCondition().equals(other.getTerminalCondition())) return false; + } + if (!getConditionsList().equals(other.getConditionsList())) return false; + if (!getContainerStatusesList().equals(other.getContainerStatusesList())) return false; + if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; + if (!getUrlsList().equals(other.getUrlsList())) return false; + if (getReconciling() != other.getReconciling()) return false; + if (!getEtag().equals(other.getEtag())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + GENERATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (37 * hash) + CREATOR_FIELD_NUMBER; + hash = (53 * hash) + getCreator().hashCode(); + hash = (37 * hash) + LAST_MODIFIER_FIELD_NUMBER; + hash = (53 * hash) + getLastModifier().hashCode(); + hash = (37 * hash) + CLIENT_FIELD_NUMBER; + hash = (53 * hash) + getClient().hashCode(); + hash = (37 * hash) + CLIENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getClientVersion().hashCode(); + hash = (37 * hash) + LAUNCH_STAGE_FIELD_NUMBER; + hash = (53 * hash) + launchStage_; + if (hasBinaryAuthorization()) { + hash = (37 * hash) + BINARY_AUTHORIZATION_FIELD_NUMBER; + hash = (53 * hash) + getBinaryAuthorization().hashCode(); + } + if (hasVpcAccess()) { + hash = (37 * hash) + VPC_ACCESS_FIELD_NUMBER; + hash = (53 * hash) + getVpcAccess().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + if (getContainersCount() > 0) { + hash = (37 * hash) + CONTAINERS_FIELD_NUMBER; + hash = (53 * hash) + getContainersList().hashCode(); + } + if (getVolumesCount() > 0) { + hash = (37 * hash) + VOLUMES_FIELD_NUMBER; + hash = (53 * hash) + getVolumesList().hashCode(); + } + hash = (37 * hash) + ENCRYPTION_KEY_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionKey().hashCode(); + hash = (37 * hash) + ENCRYPTION_KEY_REVOCATION_ACTION_FIELD_NUMBER; + hash = (53 * hash) + encryptionKeyRevocationAction_; + if (hasEncryptionKeyShutdownDuration()) { + hash = (37 * hash) + ENCRYPTION_KEY_SHUTDOWN_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionKeyShutdownDuration().hashCode(); + } + if (hasNodeSelector()) { + hash = (37 * hash) + NODE_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getNodeSelector().hashCode(); + } + if (hasGpuZonalRedundancyDisabled()) { + hash = (37 * hash) + GPU_ZONAL_REDUNDANCY_DISABLED_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGpuZonalRedundancyDisabled()); + } + hash = (37 * hash) + INGRESS_FIELD_NUMBER; + hash = (53 * hash) + ingress_; + hash = (37 * hash) + INVOKER_IAM_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvokerIamDisabled()); + hash = (37 * hash) + IAP_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIapEnabled()); + hash = (37 * hash) + OBSERVED_GENERATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObservedGeneration()); + hash = (37 * hash) + LOG_URI_FIELD_NUMBER; + hash = (53 * hash) + getLogUri().hashCode(); + if (hasTerminalCondition()) { + hash = (37 * hash) + TERMINAL_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getTerminalCondition().hashCode(); + } + if (getConditionsCount() > 0) { + hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getConditionsList().hashCode(); + } + if (getContainerStatusesCount() > 0) { + hash = (37 * hash) + CONTAINER_STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getContainerStatusesList().hashCode(); + } + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); + if (getUrlsCount() > 0) { + hash = (37 * hash) + URLS_FIELD_NUMBER; + hash = (53 * hash) + getUrlsList().hashCode(); + } + hash = (37 * hash) + RECONCILING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.Instance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.Instance 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.run.v2.Instance parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.Instance 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.run.v2.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.Instance 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.run.v2.Instance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.Instance 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.run.v2.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.Instance 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.run.v2.Instance 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; + } + + /** + * + * + *
+   * A Cloud Run Instance represents a single group of containers running in a
+   * region.
+   * 
+ * + * Protobuf type {@code google.cloud.run.v2.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.Instance) + com.google.cloud.run.v2.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetLabels(); + case 7: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + case 7: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.Instance.class, + com.google.cloud.run.v2.Instance.Builder.class); + } + + // Construct using com.google.cloud.run.v2.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getDeleteTimeFieldBuilder(); + getExpireTimeFieldBuilder(); + getBinaryAuthorizationFieldBuilder(); + getVpcAccessFieldBuilder(); + getContainersFieldBuilder(); + getVolumesFieldBuilder(); + getEncryptionKeyShutdownDurationFieldBuilder(); + getNodeSelectorFieldBuilder(); + getTerminalConditionFieldBuilder(); + getConditionsFieldBuilder(); + getContainerStatusesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + name_ = ""; + description_ = ""; + uid_ = ""; + generation_ = 0L; + internalGetMutableLabels().clear(); + internalGetMutableAnnotations().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + creator_ = ""; + lastModifier_ = ""; + client_ = ""; + clientVersion_ = ""; + launchStage_ = 0; + binaryAuthorization_ = null; + if (binaryAuthorizationBuilder_ != null) { + binaryAuthorizationBuilder_.dispose(); + binaryAuthorizationBuilder_ = null; + } + vpcAccess_ = null; + if (vpcAccessBuilder_ != null) { + vpcAccessBuilder_.dispose(); + vpcAccessBuilder_ = null; + } + serviceAccount_ = ""; + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + } else { + containers_ = null; + containersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00040000); + if (volumesBuilder_ == null) { + volumes_ = java.util.Collections.emptyList(); + } else { + volumes_ = null; + volumesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00080000); + encryptionKey_ = ""; + encryptionKeyRevocationAction_ = 0; + encryptionKeyShutdownDuration_ = null; + if (encryptionKeyShutdownDurationBuilder_ != null) { + encryptionKeyShutdownDurationBuilder_.dispose(); + encryptionKeyShutdownDurationBuilder_ = null; + } + nodeSelector_ = null; + if (nodeSelectorBuilder_ != null) { + nodeSelectorBuilder_.dispose(); + nodeSelectorBuilder_ = null; + } + gpuZonalRedundancyDisabled_ = false; + ingress_ = 0; + invokerIamDisabled_ = false; + iapEnabled_ = false; + observedGeneration_ = 0L; + logUri_ = ""; + terminalCondition_ = null; + if (terminalConditionBuilder_ != null) { + terminalConditionBuilder_.dispose(); + terminalConditionBuilder_ = null; + } + if (conditionsBuilder_ == null) { + conditions_ = java.util.Collections.emptyList(); + } else { + conditions_ = null; + conditionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x80000000); + if (containerStatusesBuilder_ == null) { + containerStatuses_ = java.util.Collections.emptyList(); + } else { + containerStatuses_ = null; + containerStatusesBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000001); + satisfiesPzs_ = false; + urls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + reconciling_ = false; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.Instance getDefaultInstanceForType() { + return com.google.cloud.run.v2.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.Instance build() { + com.google.cloud.run.v2.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.Instance buildPartial() { + com.google.cloud.run.v2.Instance result = new com.google.cloud.run.v2.Instance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + if (bitField1_ != 0) { + buildPartial1(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.run.v2.Instance result) { + if (containersBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0)) { + containers_ = java.util.Collections.unmodifiableList(containers_); + bitField0_ = (bitField0_ & ~0x00040000); + } + result.containers_ = containers_; + } else { + result.containers_ = containersBuilder_.build(); + } + if (volumesBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0)) { + volumes_ = java.util.Collections.unmodifiableList(volumes_); + bitField0_ = (bitField0_ & ~0x00080000); + } + result.volumes_ = volumes_; + } else { + result.volumes_ = volumesBuilder_.build(); + } + if (conditionsBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0)) { + conditions_ = java.util.Collections.unmodifiableList(conditions_); + bitField0_ = (bitField0_ & ~0x80000000); + } + result.conditions_ = conditions_; + } else { + result.conditions_ = conditionsBuilder_.build(); + } + if (containerStatusesBuilder_ == null) { + if (((bitField1_ & 0x00000001) != 0)) { + containerStatuses_ = java.util.Collections.unmodifiableList(containerStatuses_); + bitField1_ = (bitField1_ & ~0x00000001); + } + result.containerStatuses_ = containerStatuses_; + } else { + result.containerStatuses_ = containerStatusesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.run.v2.Instance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.generation_ = generation_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.creator_ = creator_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.lastModifier_ = lastModifier_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.client_ = client_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.clientVersion_ = clientVersion_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.launchStage_ = launchStage_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.binaryAuthorization_ = + binaryAuthorizationBuilder_ == null + ? binaryAuthorization_ + : binaryAuthorizationBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.vpcAccess_ = vpcAccessBuilder_ == null ? vpcAccess_ : vpcAccessBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.encryptionKey_ = encryptionKey_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.encryptionKeyRevocationAction_ = encryptionKeyRevocationAction_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.encryptionKeyShutdownDuration_ = + encryptionKeyShutdownDurationBuilder_ == null + ? encryptionKeyShutdownDuration_ + : encryptionKeyShutdownDurationBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.nodeSelector_ = + nodeSelectorBuilder_ == null ? nodeSelector_ : nodeSelectorBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.gpuZonalRedundancyDisabled_ = gpuZonalRedundancyDisabled_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.ingress_ = ingress_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.invokerIamDisabled_ = invokerIamDisabled_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.iapEnabled_ = iapEnabled_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.observedGeneration_ = observedGeneration_; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.logUri_ = logUri_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.terminalCondition_ = + terminalConditionBuilder_ == null + ? terminalCondition_ + : terminalConditionBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial1(com.google.cloud.run.v2.Instance result) { + int from_bitField1_ = bitField1_; + if (((from_bitField1_ & 0x00000002) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + } + if (((from_bitField1_ & 0x00000004) != 0)) { + urls_.makeImmutable(); + result.urls_ = urls_; + } + if (((from_bitField1_ & 0x00000008) != 0)) { + result.reconciling_ = reconciling_; + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.etag_ = etag_; + } + } + + @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.run.v2.Instance) { + return mergeFrom((com.google.cloud.run.v2.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.Instance other) { + if (other == com.google.cloud.run.v2.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getGeneration() != 0L) { + setGeneration(other.getGeneration()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000020; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (!other.getCreator().isEmpty()) { + creator_ = other.creator_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getLastModifier().isEmpty()) { + lastModifier_ = other.lastModifier_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getClient().isEmpty()) { + client_ = other.client_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getClientVersion().isEmpty()) { + clientVersion_ = other.clientVersion_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.launchStage_ != 0) { + setLaunchStageValue(other.getLaunchStageValue()); + } + if (other.hasBinaryAuthorization()) { + mergeBinaryAuthorization(other.getBinaryAuthorization()); + } + if (other.hasVpcAccess()) { + mergeVpcAccess(other.getVpcAccess()); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00020000; + onChanged(); + } + if (containersBuilder_ == null) { + if (!other.containers_.isEmpty()) { + if (containers_.isEmpty()) { + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00040000); + } else { + ensureContainersIsMutable(); + containers_.addAll(other.containers_); + } + onChanged(); + } + } else { + if (!other.containers_.isEmpty()) { + if (containersBuilder_.isEmpty()) { + containersBuilder_.dispose(); + containersBuilder_ = null; + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00040000); + containersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContainersFieldBuilder() + : null; + } else { + containersBuilder_.addAllMessages(other.containers_); + } + } + } + if (volumesBuilder_ == null) { + if (!other.volumes_.isEmpty()) { + if (volumes_.isEmpty()) { + volumes_ = other.volumes_; + bitField0_ = (bitField0_ & ~0x00080000); + } else { + ensureVolumesIsMutable(); + volumes_.addAll(other.volumes_); + } + onChanged(); + } + } else { + if (!other.volumes_.isEmpty()) { + if (volumesBuilder_.isEmpty()) { + volumesBuilder_.dispose(); + volumesBuilder_ = null; + volumes_ = other.volumes_; + bitField0_ = (bitField0_ & ~0x00080000); + volumesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVolumesFieldBuilder() + : null; + } else { + volumesBuilder_.addAllMessages(other.volumes_); + } + } + } + if (!other.getEncryptionKey().isEmpty()) { + encryptionKey_ = other.encryptionKey_; + bitField0_ |= 0x00100000; + onChanged(); + } + if (other.encryptionKeyRevocationAction_ != 0) { + setEncryptionKeyRevocationActionValue(other.getEncryptionKeyRevocationActionValue()); + } + if (other.hasEncryptionKeyShutdownDuration()) { + mergeEncryptionKeyShutdownDuration(other.getEncryptionKeyShutdownDuration()); + } + if (other.hasNodeSelector()) { + mergeNodeSelector(other.getNodeSelector()); + } + if (other.hasGpuZonalRedundancyDisabled()) { + setGpuZonalRedundancyDisabled(other.getGpuZonalRedundancyDisabled()); + } + if (other.ingress_ != 0) { + setIngressValue(other.getIngressValue()); + } + if (other.getInvokerIamDisabled() != false) { + setInvokerIamDisabled(other.getInvokerIamDisabled()); + } + if (other.getIapEnabled() != false) { + setIapEnabled(other.getIapEnabled()); + } + if (other.getObservedGeneration() != 0L) { + setObservedGeneration(other.getObservedGeneration()); + } + if (!other.getLogUri().isEmpty()) { + logUri_ = other.logUri_; + bitField0_ |= 0x20000000; + onChanged(); + } + if (other.hasTerminalCondition()) { + mergeTerminalCondition(other.getTerminalCondition()); + } + if (conditionsBuilder_ == null) { + if (!other.conditions_.isEmpty()) { + if (conditions_.isEmpty()) { + conditions_ = other.conditions_; + bitField0_ = (bitField0_ & ~0x80000000); + } else { + ensureConditionsIsMutable(); + conditions_.addAll(other.conditions_); + } + onChanged(); + } + } else { + if (!other.conditions_.isEmpty()) { + if (conditionsBuilder_.isEmpty()) { + conditionsBuilder_.dispose(); + conditionsBuilder_ = null; + conditions_ = other.conditions_; + bitField0_ = (bitField0_ & ~0x80000000); + conditionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConditionsFieldBuilder() + : null; + } else { + conditionsBuilder_.addAllMessages(other.conditions_); + } + } + } + if (containerStatusesBuilder_ == null) { + if (!other.containerStatuses_.isEmpty()) { + if (containerStatuses_.isEmpty()) { + containerStatuses_ = other.containerStatuses_; + bitField1_ = (bitField1_ & ~0x00000001); + } else { + ensureContainerStatusesIsMutable(); + containerStatuses_.addAll(other.containerStatuses_); + } + onChanged(); + } + } else { + if (!other.containerStatuses_.isEmpty()) { + if (containerStatusesBuilder_.isEmpty()) { + containerStatusesBuilder_.dispose(); + containerStatusesBuilder_ = null; + containerStatuses_ = other.containerStatuses_; + bitField1_ = (bitField1_ & ~0x00000001); + containerStatusesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContainerStatusesFieldBuilder() + : null; + } else { + containerStatusesBuilder_.addAllMessages(other.containerStatuses_); + } + } + } + if (other.getSatisfiesPzs() != false) { + setSatisfiesPzs(other.getSatisfiesPzs()); + } + if (!other.urls_.isEmpty()) { + if (urls_.isEmpty()) { + urls_ = other.urls_; + bitField1_ |= 0x00000004; + } else { + ensureUrlsIsMutable(); + urls_.addAll(other.urls_); + } + onChanged(); + } + if (other.getReconciling() != false) { + setReconciling(other.getReconciling()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField1_ |= 0x00000010; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 40: + { + generation_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 40 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + creator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: + { + lastModifier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 114: + { + client_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 114 + case 122: + { + clientVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 128: + { + launchStage_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 128 + case 138: + { + input.readMessage( + getBinaryAuthorizationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 138 + case 146: + { + input.readMessage(getVpcAccessFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 146 + case 154: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 154 + case 162: + { + com.google.cloud.run.v2.Container m = + input.readMessage( + com.google.cloud.run.v2.Container.parser(), extensionRegistry); + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(m); + } else { + containersBuilder_.addMessage(m); + } + break; + } // case 162 + case 170: + { + com.google.cloud.run.v2.Volume m = + input.readMessage(com.google.cloud.run.v2.Volume.parser(), extensionRegistry); + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.add(m); + } else { + volumesBuilder_.addMessage(m); + } + break; + } // case 170 + case 178: + { + encryptionKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case 178 + case 192: + { + encryptionKeyRevocationAction_ = input.readEnum(); + bitField0_ |= 0x00200000; + break; + } // case 192 + case 202: + { + input.readMessage( + getEncryptionKeyShutdownDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 202 + case 210: + { + input.readMessage(getNodeSelectorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 210 + case 216: + { + gpuZonalRedundancyDisabled_ = input.readBool(); + bitField0_ |= 0x01000000; + break; + } // case 216 + case 224: + { + ingress_ = input.readEnum(); + bitField0_ |= 0x02000000; + break; + } // case 224 + case 232: + { + invokerIamDisabled_ = input.readBool(); + bitField0_ |= 0x04000000; + break; + } // case 232 + case 240: + { + iapEnabled_ = input.readBool(); + bitField0_ |= 0x08000000; + break; + } // case 240 + case 320: + { + observedGeneration_ = input.readInt64(); + bitField0_ |= 0x10000000; + break; + } // case 320 + case 330: + { + logUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case 330 + case 338: + { + input.readMessage( + getTerminalConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x40000000; + break; + } // case 338 + case 346: + { + com.google.cloud.run.v2.Condition m = + input.readMessage( + com.google.cloud.run.v2.Condition.parser(), extensionRegistry); + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(m); + } else { + conditionsBuilder_.addMessage(m); + } + break; + } // case 346 + case 354: + { + com.google.cloud.run.v2.ContainerStatus m = + input.readMessage( + com.google.cloud.run.v2.ContainerStatus.parser(), extensionRegistry); + if (containerStatusesBuilder_ == null) { + ensureContainerStatusesIsMutable(); + containerStatuses_.add(m); + } else { + containerStatusesBuilder_.addMessage(m); + } + break; + } // case 354 + case 362: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrlsIsMutable(); + urls_.add(s); + break; + } // case 362 + case 368: + { + satisfiesPzs_ = input.readBool(); + bitField1_ |= 0x00000002; + break; + } // case 368 + case 784: + { + reconciling_ = input.readBool(); + bitField1_ |= 0x00000008; + break; + } // case 784 + case 794: + { + etag_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000010; + break; + } // case 794 + 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 int bitField1_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * The fully qualified name of this Instance. In CreateInstanceRequest, this
+     * field is ignored, and instead composed from CreateInstanceRequest.parent
+     * and CreateInstanceRequest.instance_id.
+     *
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance_id}
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The fully qualified name of this Instance. In CreateInstanceRequest, this
+     * field is ignored, and instead composed from CreateInstanceRequest.parent
+     * and CreateInstanceRequest.instance_id.
+     *
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance_id}
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The fully qualified name of this Instance. In CreateInstanceRequest, this
+     * field is ignored, and instead composed from CreateInstanceRequest.parent
+     * and CreateInstanceRequest.instance_id.
+     *
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance_id}
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The fully qualified name of this Instance. In CreateInstanceRequest, this
+     * field is ignored, and instead composed from CreateInstanceRequest.parent
+     * and CreateInstanceRequest.instance_id.
+     *
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance_id}
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The fully qualified name of this Instance. In CreateInstanceRequest, this
+     * field is ignored, and instead composed from CreateInstanceRequest.parent
+     * and CreateInstanceRequest.instance_id.
+     *
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance_id}
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * User-provided description of the Instance. This field currently has a
+     * 512-character limit.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * User-provided description of the Instance. This field currently has a
+     * 512-character limit.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * User-provided description of the Instance. This field currently has a
+     * 512-character limit.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * User-provided description of the Instance. This field currently has a
+     * 512-character limit.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * User-provided description of the Instance. This field currently has a
+     * 512-character limit.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. Server assigned unique identifier for the trigger. The value
+     * is a UUID4 string and guaranteed to remain unchanged until the resource is
+     * deleted.
+     * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server assigned unique identifier for the trigger. The value
+     * is a UUID4 string and guaranteed to remain unchanged until the resource is
+     * deleted.
+     * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server assigned unique identifier for the trigger. The value
+     * is a UUID4 string and guaranteed to remain unchanged until the resource is
+     * deleted.
+     * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server assigned unique identifier for the trigger. The value
+     * is a UUID4 string and guaranteed to remain unchanged until the resource is
+     * deleted.
+     * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server assigned unique identifier for the trigger. The value
+     * is a UUID4 string and guaranteed to remain unchanged until the resource is
+     * deleted.
+     * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long generation_; + + /** + * + * + *
+     * Output only. A number that monotonically increases every time the user
+     * modifies the desired state.
+     * Please note that unlike v1, this is an int64 value. As with most Google
+     * APIs, its JSON representation will be a `string` instead of an `integer`.
+     * 
+ * + * int64 generation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + + /** + * + * + *
+     * Output only. A number that monotonically increases every time the user
+     * modifies the desired state.
+     * Please note that unlike v1, this is an int64 value. As with most Google
+     * APIs, its JSON representation will be a `string` instead of an `integer`.
+     * 
+ * + * int64 generation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The generation to set. + * @return This builder for chaining. + */ + public Builder setGeneration(long value) { + + generation_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A number that monotonically increases every time the user
+     * modifies the desired state.
+     * Please note that unlike v1, this is an int64 value. As with most Google
+     * APIs, its JSON representation will be a `string` instead of an `integer`.
+     * 
+ * + * int64 generation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGeneration() { + bitField0_ = (bitField0_ & ~0x00000008); + generation_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** map<string, string> labels = 6; */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** map<string, string> labels = 6; */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** map<string, string> labels = 6; */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** map<string, string> labels = 6; */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** map<string, string> labels = 6; */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + + /** map<string, string> labels = 6; */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** map<string, string> labels = 6; */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** map<string, string> annotations = 7; */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** map<string, string> annotations = 7; */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** map<string, string> annotations = 7; */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** map<string, string> annotations = 7; */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** map<string, string> annotations = 7; */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000020; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** map<string, string> annotations = 7; */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + + /** map<string, string> annotations = 7; */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The last-modified time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + } else { + deleteTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && deleteTime_ != null + && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeleteTimeBuilder().mergeFrom(value); + } else { + deleteTime_ = value; + } + } else { + deleteTimeBuilder_.mergeFrom(value); + } + if (deleteTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000100); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getDeleteTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } + } + + /** + * + * + *
+     * Output only. The deletion time.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + if (expireTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000200); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + + /** + * + * + *
+     * Output only. For a deleted resource, the time after which it will be
+     * permamently deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private java.lang.Object creator_ = ""; + + /** + * + * + *
+     * Output only. Email address of the authenticated creator.
+     * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The creator. + */ + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Email address of the authenticated creator.
+     * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for creator. + */ + public com.google.protobuf.ByteString getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Email address of the authenticated creator.
+     * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The creator to set. + * @return This builder for chaining. + */ + public Builder setCreator(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + creator_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Email address of the authenticated creator.
+     * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCreator() { + creator_ = getDefaultInstance().getCreator(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Email address of the authenticated creator.
+     * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for creator to set. + * @return This builder for chaining. + */ + public Builder setCreatorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + creator_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object lastModifier_ = ""; + + /** + * + * + *
+     * Output only. Email address of the last authenticated modifier.
+     * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastModifier. + */ + public java.lang.String getLastModifier() { + java.lang.Object ref = lastModifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastModifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Email address of the last authenticated modifier.
+     * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for lastModifier. + */ + public com.google.protobuf.ByteString getLastModifierBytes() { + java.lang.Object ref = lastModifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastModifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Email address of the last authenticated modifier.
+     * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The lastModifier to set. + * @return This builder for chaining. + */ + public Builder setLastModifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lastModifier_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Email address of the last authenticated modifier.
+     * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLastModifier() { + lastModifier_ = getDefaultInstance().getLastModifier(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Email address of the last authenticated modifier.
+     * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for lastModifier to set. + * @return This builder for chaining. + */ + public Builder setLastModifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lastModifier_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object client_ = ""; + + /** + * + * + *
+     * Arbitrary identifier for the API client.
+     * 
+ * + * string client = 14; + * + * @return The client. + */ + public java.lang.String getClient() { + java.lang.Object ref = client_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + client_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Arbitrary identifier for the API client.
+     * 
+ * + * string client = 14; + * + * @return The bytes for client. + */ + public com.google.protobuf.ByteString getClientBytes() { + java.lang.Object ref = client_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + client_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Arbitrary identifier for the API client.
+     * 
+ * + * string client = 14; + * + * @param value The client to set. + * @return This builder for chaining. + */ + public Builder setClient(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + client_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Arbitrary identifier for the API client.
+     * 
+ * + * string client = 14; + * + * @return This builder for chaining. + */ + public Builder clearClient() { + client_ = getDefaultInstance().getClient(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Arbitrary identifier for the API client.
+     * 
+ * + * string client = 14; + * + * @param value The bytes for client to set. + * @return This builder for chaining. + */ + public Builder setClientBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + client_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object clientVersion_ = ""; + + /** + * + * + *
+     * Arbitrary version identifier for the API client.
+     * 
+ * + * string client_version = 15; + * + * @return The clientVersion. + */ + public java.lang.String getClientVersion() { + java.lang.Object ref = clientVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Arbitrary version identifier for the API client.
+     * 
+ * + * string client_version = 15; + * + * @return The bytes for clientVersion. + */ + public com.google.protobuf.ByteString getClientVersionBytes() { + java.lang.Object ref = clientVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Arbitrary version identifier for the API client.
+     * 
+ * + * string client_version = 15; + * + * @param value The clientVersion to set. + * @return This builder for chaining. + */ + public Builder setClientVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientVersion_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Arbitrary version identifier for the API client.
+     * 
+ * + * string client_version = 15; + * + * @return This builder for chaining. + */ + public Builder clearClientVersion() { + clientVersion_ = getDefaultInstance().getClientVersion(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Arbitrary version identifier for the API client.
+     * 
+ * + * string client_version = 15; + * + * @param value The bytes for clientVersion to set. + * @return This builder for chaining. + */ + public Builder setClientVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientVersion_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private int launchStage_ = 0; + + /** + * + * + *
+     * The launch stage as defined by [Google Cloud Platform
+     *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+     *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+     *  is assumed.
+     *  Set the launch stage to a preview stage on input to allow use of preview
+     *  features in that stage. On read (or output), describes whether the
+     *  resource uses preview features.
+     * <p>
+     *  For example, if ALPHA is provided as input, but only BETA and GA-level
+     *  features are used, this field will be BETA on output.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + public int getLaunchStageValue() { + return launchStage_; + } + + /** + * + * + *
+     * The launch stage as defined by [Google Cloud Platform
+     *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+     *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+     *  is assumed.
+     *  Set the launch stage to a preview stage on input to allow use of preview
+     *  features in that stage. On read (or output), describes whether the
+     *  resource uses preview features.
+     * <p>
+     *  For example, if ALPHA is provided as input, but only BETA and GA-level
+     *  features are used, this field will be BETA on output.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @param value The enum numeric value on the wire for launchStage to set. + * @return This builder for chaining. + */ + public Builder setLaunchStageValue(int value) { + launchStage_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * The launch stage as defined by [Google Cloud Platform
+     *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+     *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+     *  is assumed.
+     *  Set the launch stage to a preview stage on input to allow use of preview
+     *  features in that stage. On read (or output), describes whether the
+     *  resource uses preview features.
+     * <p>
+     *  For example, if ALPHA is provided as input, but only BETA and GA-level
+     *  features are used, this field will be BETA on output.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @return The launchStage. + */ + @java.lang.Override + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * The launch stage as defined by [Google Cloud Platform
+     *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+     *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+     *  is assumed.
+     *  Set the launch stage to a preview stage on input to allow use of preview
+     *  features in that stage. On read (or output), describes whether the
+     *  resource uses preview features.
+     * <p>
+     *  For example, if ALPHA is provided as input, but only BETA and GA-level
+     *  features are used, this field will be BETA on output.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @param value The launchStage to set. + * @return This builder for chaining. + */ + public Builder setLaunchStage(com.google.api.LaunchStage value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + launchStage_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The launch stage as defined by [Google Cloud Platform
+     *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+     *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+     *  is assumed.
+     *  Set the launch stage to a preview stage on input to allow use of preview
+     *  features in that stage. On read (or output), describes whether the
+     *  resource uses preview features.
+     * <p>
+     *  For example, if ALPHA is provided as input, but only BETA and GA-level
+     *  features are used, this field will be BETA on output.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @return This builder for chaining. + */ + public Builder clearLaunchStage() { + bitField0_ = (bitField0_ & ~0x00004000); + launchStage_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.run.v2.BinaryAuthorization binaryAuthorization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.BinaryAuthorization, + com.google.cloud.run.v2.BinaryAuthorization.Builder, + com.google.cloud.run.v2.BinaryAuthorizationOrBuilder> + binaryAuthorizationBuilder_; + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + * + * @return Whether the binaryAuthorization field is set. + */ + public boolean hasBinaryAuthorization() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + * + * @return The binaryAuthorization. + */ + public com.google.cloud.run.v2.BinaryAuthorization getBinaryAuthorization() { + if (binaryAuthorizationBuilder_ == null) { + return binaryAuthorization_ == null + ? com.google.cloud.run.v2.BinaryAuthorization.getDefaultInstance() + : binaryAuthorization_; + } else { + return binaryAuthorizationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + public Builder setBinaryAuthorization(com.google.cloud.run.v2.BinaryAuthorization value) { + if (binaryAuthorizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + binaryAuthorization_ = value; + } else { + binaryAuthorizationBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + public Builder setBinaryAuthorization( + com.google.cloud.run.v2.BinaryAuthorization.Builder builderForValue) { + if (binaryAuthorizationBuilder_ == null) { + binaryAuthorization_ = builderForValue.build(); + } else { + binaryAuthorizationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + public Builder mergeBinaryAuthorization(com.google.cloud.run.v2.BinaryAuthorization value) { + if (binaryAuthorizationBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && binaryAuthorization_ != null + && binaryAuthorization_ + != com.google.cloud.run.v2.BinaryAuthorization.getDefaultInstance()) { + getBinaryAuthorizationBuilder().mergeFrom(value); + } else { + binaryAuthorization_ = value; + } + } else { + binaryAuthorizationBuilder_.mergeFrom(value); + } + if (binaryAuthorization_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + public Builder clearBinaryAuthorization() { + bitField0_ = (bitField0_ & ~0x00008000); + binaryAuthorization_ = null; + if (binaryAuthorizationBuilder_ != null) { + binaryAuthorizationBuilder_.dispose(); + binaryAuthorizationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + public com.google.cloud.run.v2.BinaryAuthorization.Builder getBinaryAuthorizationBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getBinaryAuthorizationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + public com.google.cloud.run.v2.BinaryAuthorizationOrBuilder getBinaryAuthorizationOrBuilder() { + if (binaryAuthorizationBuilder_ != null) { + return binaryAuthorizationBuilder_.getMessageOrBuilder(); + } else { + return binaryAuthorization_ == null + ? com.google.cloud.run.v2.BinaryAuthorization.getDefaultInstance() + : binaryAuthorization_; + } + } + + /** + * + * + *
+     * Settings for the Binary Authorization feature.
+     * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.BinaryAuthorization, + com.google.cloud.run.v2.BinaryAuthorization.Builder, + com.google.cloud.run.v2.BinaryAuthorizationOrBuilder> + getBinaryAuthorizationFieldBuilder() { + if (binaryAuthorizationBuilder_ == null) { + binaryAuthorizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.BinaryAuthorization, + com.google.cloud.run.v2.BinaryAuthorization.Builder, + com.google.cloud.run.v2.BinaryAuthorizationOrBuilder>( + getBinaryAuthorization(), getParentForChildren(), isClean()); + binaryAuthorization_ = null; + } + return binaryAuthorizationBuilder_; + } + + private com.google.cloud.run.v2.VpcAccess vpcAccess_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.VpcAccess, + com.google.cloud.run.v2.VpcAccess.Builder, + com.google.cloud.run.v2.VpcAccessOrBuilder> + vpcAccessBuilder_; + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vpcAccess field is set. + */ + public boolean hasVpcAccess() { + return ((bitField0_ & 0x00010000) != 0); + } + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vpcAccess. + */ + public com.google.cloud.run.v2.VpcAccess getVpcAccess() { + if (vpcAccessBuilder_ == null) { + return vpcAccess_ == null + ? com.google.cloud.run.v2.VpcAccess.getDefaultInstance() + : vpcAccess_; + } else { + return vpcAccessBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVpcAccess(com.google.cloud.run.v2.VpcAccess value) { + if (vpcAccessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vpcAccess_ = value; + } else { + vpcAccessBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVpcAccess(com.google.cloud.run.v2.VpcAccess.Builder builderForValue) { + if (vpcAccessBuilder_ == null) { + vpcAccess_ = builderForValue.build(); + } else { + vpcAccessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeVpcAccess(com.google.cloud.run.v2.VpcAccess value) { + if (vpcAccessBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && vpcAccess_ != null + && vpcAccess_ != com.google.cloud.run.v2.VpcAccess.getDefaultInstance()) { + getVpcAccessBuilder().mergeFrom(value); + } else { + vpcAccess_ = value; + } + } else { + vpcAccessBuilder_.mergeFrom(value); + } + if (vpcAccess_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVpcAccess() { + bitField0_ = (bitField0_ & ~0x00010000); + vpcAccess_ = null; + if (vpcAccessBuilder_ != null) { + vpcAccessBuilder_.dispose(); + vpcAccessBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.run.v2.VpcAccess.Builder getVpcAccessBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getVpcAccessFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.run.v2.VpcAccessOrBuilder getVpcAccessOrBuilder() { + if (vpcAccessBuilder_ != null) { + return vpcAccessBuilder_.getMessageOrBuilder(); + } else { + return vpcAccess_ == null + ? com.google.cloud.run.v2.VpcAccess.getDefaultInstance() + : vpcAccess_; + } + } + + /** + * + * + *
+     * Optional. VPC Access configuration to use for this Revision. For more
+     * information, visit
+     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+     * 
+ * + * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.VpcAccess, + com.google.cloud.run.v2.VpcAccess.Builder, + com.google.cloud.run.v2.VpcAccessOrBuilder> + getVpcAccessFieldBuilder() { + if (vpcAccessBuilder_ == null) { + vpcAccessBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.VpcAccess, + com.google.cloud.run.v2.VpcAccess.Builder, + com.google.cloud.run.v2.VpcAccessOrBuilder>( + getVpcAccess(), getParentForChildren(), isClean()); + vpcAccess_ = null; + } + return vpcAccessBuilder_; + } + + private java.lang.Object serviceAccount_ = ""; + + /** + * string service_account = 19; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string service_account = 19; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string service_account = 19; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * string service_account = 19; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + + /** + * string service_account = 19; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + private java.util.List containers_ = + java.util.Collections.emptyList(); + + private void ensureContainersIsMutable() { + if (!((bitField0_ & 0x00040000) != 0)) { + containers_ = new java.util.ArrayList(containers_); + bitField0_ |= 0x00040000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Container, + com.google.cloud.run.v2.Container.Builder, + com.google.cloud.run.v2.ContainerOrBuilder> + containersBuilder_; + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getContainersList() { + if (containersBuilder_ == null) { + return java.util.Collections.unmodifiableList(containers_); + } else { + return containersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getContainersCount() { + if (containersBuilder_ == null) { + return containers_.size(); + } else { + return containersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.run.v2.Container getContainers(int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setContainers(int index, com.google.cloud.run.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.set(index, value); + onChanged(); + } else { + containersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setContainers( + int index, com.google.cloud.run.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.set(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContainers(com.google.cloud.run.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(value); + onChanged(); + } else { + containersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContainers(int index, com.google.cloud.run.v2.Container value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(index, value); + onChanged(); + } else { + containersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContainers(com.google.cloud.run.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContainers( + int index, com.google.cloud.run.v2.Container.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllContainers( + java.lang.Iterable values) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, containers_); + onChanged(); + } else { + containersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearContainers() { + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + } else { + containersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeContainers(int index) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.remove(index); + onChanged(); + } else { + containersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.run.v2.Container.Builder getContainersBuilder(int index) { + return getContainersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.run.v2.ContainerOrBuilder getContainersOrBuilder(int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getContainersOrBuilderList() { + if (containersBuilder_ != null) { + return containersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containers_); + } + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.run.v2.Container.Builder addContainersBuilder() { + return getContainersFieldBuilder() + .addBuilder(com.google.cloud.run.v2.Container.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.run.v2.Container.Builder addContainersBuilder(int index) { + return getContainersFieldBuilder() + .addBuilder(index, com.google.cloud.run.v2.Container.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Holds the single container that defines the unit of execution for
+     * this Instance.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getContainersBuilderList() { + return getContainersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Container, + com.google.cloud.run.v2.Container.Builder, + com.google.cloud.run.v2.ContainerOrBuilder> + getContainersFieldBuilder() { + if (containersBuilder_ == null) { + containersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Container, + com.google.cloud.run.v2.Container.Builder, + com.google.cloud.run.v2.ContainerOrBuilder>( + containers_, ((bitField0_ & 0x00040000) != 0), getParentForChildren(), isClean()); + containers_ = null; + } + return containersBuilder_; + } + + private java.util.List volumes_ = + java.util.Collections.emptyList(); + + private void ensureVolumesIsMutable() { + if (!((bitField0_ & 0x00080000) != 0)) { + volumes_ = new java.util.ArrayList(volumes_); + bitField0_ |= 0x00080000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Volume, + com.google.cloud.run.v2.Volume.Builder, + com.google.cloud.run.v2.VolumeOrBuilder> + volumesBuilder_; + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public java.util.List getVolumesList() { + if (volumesBuilder_ == null) { + return java.util.Collections.unmodifiableList(volumes_); + } else { + return volumesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public int getVolumesCount() { + if (volumesBuilder_ == null) { + return volumes_.size(); + } else { + return volumesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public com.google.cloud.run.v2.Volume getVolumes(int index) { + if (volumesBuilder_ == null) { + return volumes_.get(index); + } else { + return volumesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder setVolumes(int index, com.google.cloud.run.v2.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.set(index, value); + onChanged(); + } else { + volumesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder setVolumes(int index, com.google.cloud.run.v2.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.set(index, builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder addVolumes(com.google.cloud.run.v2.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.add(value); + onChanged(); + } else { + volumesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder addVolumes(int index, com.google.cloud.run.v2.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.add(index, value); + onChanged(); + } else { + volumesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder addVolumes(com.google.cloud.run.v2.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.add(builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder addVolumes(int index, com.google.cloud.run.v2.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.add(index, builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder addAllVolumes( + java.lang.Iterable values) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, volumes_); + onChanged(); + } else { + volumesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder clearVolumes() { + if (volumesBuilder_ == null) { + volumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00080000); + onChanged(); + } else { + volumesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public Builder removeVolumes(int index) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.remove(index); + onChanged(); + } else { + volumesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public com.google.cloud.run.v2.Volume.Builder getVolumesBuilder(int index) { + return getVolumesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public com.google.cloud.run.v2.VolumeOrBuilder getVolumesOrBuilder(int index) { + if (volumesBuilder_ == null) { + return volumes_.get(index); + } else { + return volumesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public java.util.List + getVolumesOrBuilderList() { + if (volumesBuilder_ != null) { + return volumesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(volumes_); + } + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public com.google.cloud.run.v2.Volume.Builder addVolumesBuilder() { + return getVolumesFieldBuilder() + .addBuilder(com.google.cloud.run.v2.Volume.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public com.google.cloud.run.v2.Volume.Builder addVolumesBuilder(int index) { + return getVolumesFieldBuilder() + .addBuilder(index, com.google.cloud.run.v2.Volume.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of Volumes to make available to containers.
+     * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + public java.util.List getVolumesBuilderList() { + return getVolumesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Volume, + com.google.cloud.run.v2.Volume.Builder, + com.google.cloud.run.v2.VolumeOrBuilder> + getVolumesFieldBuilder() { + if (volumesBuilder_ == null) { + volumesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Volume, + com.google.cloud.run.v2.Volume.Builder, + com.google.cloud.run.v2.VolumeOrBuilder>( + volumes_, ((bitField0_ & 0x00080000) != 0), getParentForChildren(), isClean()); + volumes_ = null; + } + return volumesBuilder_; + } + + private java.lang.Object encryptionKey_ = ""; + + /** + * + * + *
+     * A reference to a customer managed encryption key (CMEK) to use to encrypt
+     * this container image. For more information, go to
+     * https://cloud.google.com/run/docs/securing/using-cmek
+     * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @return The encryptionKey. + */ + public java.lang.String getEncryptionKey() { + java.lang.Object ref = encryptionKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encryptionKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A reference to a customer managed encryption key (CMEK) to use to encrypt
+     * this container image. For more information, go to
+     * https://cloud.google.com/run/docs/securing/using-cmek
+     * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for encryptionKey. + */ + public com.google.protobuf.ByteString getEncryptionKeyBytes() { + java.lang.Object ref = encryptionKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + encryptionKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A reference to a customer managed encryption key (CMEK) to use to encrypt
+     * this container image. For more information, go to
+     * https://cloud.google.com/run/docs/securing/using-cmek
+     * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @param value The encryptionKey to set. + * @return This builder for chaining. + */ + public Builder setEncryptionKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + encryptionKey_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * A reference to a customer managed encryption key (CMEK) to use to encrypt
+     * this container image. For more information, go to
+     * https://cloud.google.com/run/docs/securing/using-cmek
+     * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearEncryptionKey() { + encryptionKey_ = getDefaultInstance().getEncryptionKey(); + bitField0_ = (bitField0_ & ~0x00100000); + onChanged(); + return this; + } + + /** + * + * + *
+     * A reference to a customer managed encryption key (CMEK) to use to encrypt
+     * this container image. For more information, go to
+     * https://cloud.google.com/run/docs/securing/using-cmek
+     * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for encryptionKey to set. + * @return This builder for chaining. + */ + public Builder setEncryptionKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + encryptionKey_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + private int encryptionKeyRevocationAction_ = 0; + + /** + * + * + *
+     * The action to take if the encryption key is revoked.
+     * 
+ * + * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @return The enum numeric value on the wire for encryptionKeyRevocationAction. + */ + @java.lang.Override + public int getEncryptionKeyRevocationActionValue() { + return encryptionKeyRevocationAction_; + } + + /** + * + * + *
+     * The action to take if the encryption key is revoked.
+     * 
+ * + * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @param value The enum numeric value on the wire for encryptionKeyRevocationAction to set. + * @return This builder for chaining. + */ + public Builder setEncryptionKeyRevocationActionValue(int value) { + encryptionKeyRevocationAction_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * The action to take if the encryption key is revoked.
+     * 
+ * + * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @return The encryptionKeyRevocationAction. + */ + @java.lang.Override + public com.google.cloud.run.v2.EncryptionKeyRevocationAction + getEncryptionKeyRevocationAction() { + com.google.cloud.run.v2.EncryptionKeyRevocationAction result = + com.google.cloud.run.v2.EncryptionKeyRevocationAction.forNumber( + encryptionKeyRevocationAction_); + return result == null + ? com.google.cloud.run.v2.EncryptionKeyRevocationAction.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The action to take if the encryption key is revoked.
+     * 
+ * + * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @param value The encryptionKeyRevocationAction to set. + * @return This builder for chaining. + */ + public Builder setEncryptionKeyRevocationAction( + com.google.cloud.run.v2.EncryptionKeyRevocationAction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00200000; + encryptionKeyRevocationAction_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The action to take if the encryption key is revoked.
+     * 
+ * + * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @return This builder for chaining. + */ + public Builder clearEncryptionKeyRevocationAction() { + bitField0_ = (bitField0_ & ~0x00200000); + encryptionKeyRevocationAction_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration encryptionKeyShutdownDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + encryptionKeyShutdownDurationBuilder_; + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + * + * @return Whether the encryptionKeyShutdownDuration field is set. + */ + public boolean hasEncryptionKeyShutdownDuration() { + return ((bitField0_ & 0x00400000) != 0); + } + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + * + * @return The encryptionKeyShutdownDuration. + */ + public com.google.protobuf.Duration getEncryptionKeyShutdownDuration() { + if (encryptionKeyShutdownDurationBuilder_ == null) { + return encryptionKeyShutdownDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : encryptionKeyShutdownDuration_; + } else { + return encryptionKeyShutdownDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + public Builder setEncryptionKeyShutdownDuration(com.google.protobuf.Duration value) { + if (encryptionKeyShutdownDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionKeyShutdownDuration_ = value; + } else { + encryptionKeyShutdownDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + public Builder setEncryptionKeyShutdownDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (encryptionKeyShutdownDurationBuilder_ == null) { + encryptionKeyShutdownDuration_ = builderForValue.build(); + } else { + encryptionKeyShutdownDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + public Builder mergeEncryptionKeyShutdownDuration(com.google.protobuf.Duration value) { + if (encryptionKeyShutdownDurationBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) + && encryptionKeyShutdownDuration_ != null + && encryptionKeyShutdownDuration_ + != com.google.protobuf.Duration.getDefaultInstance()) { + getEncryptionKeyShutdownDurationBuilder().mergeFrom(value); + } else { + encryptionKeyShutdownDuration_ = value; + } + } else { + encryptionKeyShutdownDurationBuilder_.mergeFrom(value); + } + if (encryptionKeyShutdownDuration_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + public Builder clearEncryptionKeyShutdownDuration() { + bitField0_ = (bitField0_ & ~0x00400000); + encryptionKeyShutdownDuration_ = null; + if (encryptionKeyShutdownDurationBuilder_ != null) { + encryptionKeyShutdownDurationBuilder_.dispose(); + encryptionKeyShutdownDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + public com.google.protobuf.Duration.Builder getEncryptionKeyShutdownDurationBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getEncryptionKeyShutdownDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + public com.google.protobuf.DurationOrBuilder getEncryptionKeyShutdownDurationOrBuilder() { + if (encryptionKeyShutdownDurationBuilder_ != null) { + return encryptionKeyShutdownDurationBuilder_.getMessageOrBuilder(); + } else { + return encryptionKeyShutdownDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : encryptionKeyShutdownDuration_; + } + } + + /** + * + * + *
+     * If encryption_key_revocation_action is SHUTDOWN, the duration before
+     * shutting down all instances. The minimum increment is 1 hour.
+     * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEncryptionKeyShutdownDurationFieldBuilder() { + if (encryptionKeyShutdownDurationBuilder_ == null) { + encryptionKeyShutdownDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEncryptionKeyShutdownDuration(), getParentForChildren(), isClean()); + encryptionKeyShutdownDuration_ = null; + } + return encryptionKeyShutdownDurationBuilder_; + } + + private com.google.cloud.run.v2.NodeSelector nodeSelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.NodeSelector, + com.google.cloud.run.v2.NodeSelector.Builder, + com.google.cloud.run.v2.NodeSelectorOrBuilder> + nodeSelectorBuilder_; + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nodeSelector field is set. + */ + public boolean hasNodeSelector() { + return ((bitField0_ & 0x00800000) != 0); + } + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeSelector. + */ + public com.google.cloud.run.v2.NodeSelector getNodeSelector() { + if (nodeSelectorBuilder_ == null) { + return nodeSelector_ == null + ? com.google.cloud.run.v2.NodeSelector.getDefaultInstance() + : nodeSelector_; + } else { + return nodeSelectorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNodeSelector(com.google.cloud.run.v2.NodeSelector value) { + if (nodeSelectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeSelector_ = value; + } else { + nodeSelectorBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNodeSelector(com.google.cloud.run.v2.NodeSelector.Builder builderForValue) { + if (nodeSelectorBuilder_ == null) { + nodeSelector_ = builderForValue.build(); + } else { + nodeSelectorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNodeSelector(com.google.cloud.run.v2.NodeSelector value) { + if (nodeSelectorBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) + && nodeSelector_ != null + && nodeSelector_ != com.google.cloud.run.v2.NodeSelector.getDefaultInstance()) { + getNodeSelectorBuilder().mergeFrom(value); + } else { + nodeSelector_ = value; + } + } else { + nodeSelectorBuilder_.mergeFrom(value); + } + if (nodeSelector_ != null) { + bitField0_ |= 0x00800000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNodeSelector() { + bitField0_ = (bitField0_ & ~0x00800000); + nodeSelector_ = null; + if (nodeSelectorBuilder_ != null) { + nodeSelectorBuilder_.dispose(); + nodeSelectorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.run.v2.NodeSelector.Builder getNodeSelectorBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getNodeSelectorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.run.v2.NodeSelectorOrBuilder getNodeSelectorOrBuilder() { + if (nodeSelectorBuilder_ != null) { + return nodeSelectorBuilder_.getMessageOrBuilder(); + } else { + return nodeSelector_ == null + ? com.google.cloud.run.v2.NodeSelector.getDefaultInstance() + : nodeSelector_; + } + } + + /** + * + * + *
+     * Optional. The node selector for the instance.
+     * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.NodeSelector, + com.google.cloud.run.v2.NodeSelector.Builder, + com.google.cloud.run.v2.NodeSelectorOrBuilder> + getNodeSelectorFieldBuilder() { + if (nodeSelectorBuilder_ == null) { + nodeSelectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.NodeSelector, + com.google.cloud.run.v2.NodeSelector.Builder, + com.google.cloud.run.v2.NodeSelectorOrBuilder>( + getNodeSelector(), getParentForChildren(), isClean()); + nodeSelector_ = null; + } + return nodeSelectorBuilder_; + } + + private boolean gpuZonalRedundancyDisabled_; + + /** + * + * + *
+     * Optional. True if GPU zonal redundancy is disabled on this instance.
+     * 
+ * + * + * optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gpuZonalRedundancyDisabled field is set. + */ + @java.lang.Override + public boolean hasGpuZonalRedundancyDisabled() { + return ((bitField0_ & 0x01000000) != 0); + } + + /** + * + * + *
+     * Optional. True if GPU zonal redundancy is disabled on this instance.
+     * 
+ * + * + * optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gpuZonalRedundancyDisabled. + */ + @java.lang.Override + public boolean getGpuZonalRedundancyDisabled() { + return gpuZonalRedundancyDisabled_; + } + + /** + * + * + *
+     * Optional. True if GPU zonal redundancy is disabled on this instance.
+     * 
+ * + * + * optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The gpuZonalRedundancyDisabled to set. + * @return This builder for chaining. + */ + public Builder setGpuZonalRedundancyDisabled(boolean value) { + + gpuZonalRedundancyDisabled_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. True if GPU zonal redundancy is disabled on this instance.
+     * 
+ * + * + * optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearGpuZonalRedundancyDisabled() { + bitField0_ = (bitField0_ & ~0x01000000); + gpuZonalRedundancyDisabled_ = false; + onChanged(); + return this; + } + + private int ingress_ = 0; + + /** + * + * + *
+     * Optional. Provides the ingress settings for this Instance. On output,
+     * returns the currently observed ingress settings, or
+     * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+     * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ingress. + */ + @java.lang.Override + public int getIngressValue() { + return ingress_; + } + + /** + * + * + *
+     * Optional. Provides the ingress settings for this Instance. On output,
+     * returns the currently observed ingress settings, or
+     * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+     * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for ingress to set. + * @return This builder for chaining. + */ + public Builder setIngressValue(int value) { + ingress_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Provides the ingress settings for this Instance. On output,
+     * returns the currently observed ingress settings, or
+     * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+     * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ingress. + */ + @java.lang.Override + public com.google.cloud.run.v2.IngressTraffic getIngress() { + com.google.cloud.run.v2.IngressTraffic result = + com.google.cloud.run.v2.IngressTraffic.forNumber(ingress_); + return result == null ? com.google.cloud.run.v2.IngressTraffic.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. Provides the ingress settings for this Instance. On output,
+     * returns the currently observed ingress settings, or
+     * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+     * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The ingress to set. + * @return This builder for chaining. + */ + public Builder setIngress(com.google.cloud.run.v2.IngressTraffic value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x02000000; + ingress_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Provides the ingress settings for this Instance. On output,
+     * returns the currently observed ingress settings, or
+     * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+     * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIngress() { + bitField0_ = (bitField0_ & ~0x02000000); + ingress_ = 0; + onChanged(); + return this; + } + + private boolean invokerIamDisabled_; + + /** + * + * + *
+     * Optional. Disables IAM permission check for run.routes.invoke for callers
+     * of this Instance. For more information, visit
+     * https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
+     * 
+ * + * bool invoker_iam_disabled = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The invokerIamDisabled. + */ + @java.lang.Override + public boolean getInvokerIamDisabled() { + return invokerIamDisabled_; + } + + /** + * + * + *
+     * Optional. Disables IAM permission check for run.routes.invoke for callers
+     * of this Instance. For more information, visit
+     * https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
+     * 
+ * + * bool invoker_iam_disabled = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The invokerIamDisabled to set. + * @return This builder for chaining. + */ + public Builder setInvokerIamDisabled(boolean value) { + + invokerIamDisabled_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Disables IAM permission check for run.routes.invoke for callers
+     * of this Instance. For more information, visit
+     * https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
+     * 
+ * + * bool invoker_iam_disabled = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearInvokerIamDisabled() { + bitField0_ = (bitField0_ & ~0x04000000); + invokerIamDisabled_ = false; + onChanged(); + return this; + } + + private boolean iapEnabled_; + + /** + * + * + *
+     * Optional. IAP settings on the Instance.
+     * 
+ * + * bool iap_enabled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The iapEnabled. + */ + @java.lang.Override + public boolean getIapEnabled() { + return iapEnabled_; + } + + /** + * + * + *
+     * Optional. IAP settings on the Instance.
+     * 
+ * + * bool iap_enabled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The iapEnabled to set. + * @return This builder for chaining. + */ + public Builder setIapEnabled(boolean value) { + + iapEnabled_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IAP settings on the Instance.
+     * 
+ * + * bool iap_enabled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIapEnabled() { + bitField0_ = (bitField0_ & ~0x08000000); + iapEnabled_ = false; + onChanged(); + return this; + } + + private long observedGeneration_; + + /** + * + * + *
+     * Output only. The generation of this Instance currently serving traffic. See
+     * comments in `reconciling` for additional information on reconciliation
+     * process in Cloud Run. Please note that unlike v1, this is an int64 value.
+     * As with most Google APIs, its JSON representation will be a `string`
+     * instead of an `integer`.
+     * 
+ * + * int64 observed_generation = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The observedGeneration. + */ + @java.lang.Override + public long getObservedGeneration() { + return observedGeneration_; + } + + /** + * + * + *
+     * Output only. The generation of this Instance currently serving traffic. See
+     * comments in `reconciling` for additional information on reconciliation
+     * process in Cloud Run. Please note that unlike v1, this is an int64 value.
+     * As with most Google APIs, its JSON representation will be a `string`
+     * instead of an `integer`.
+     * 
+ * + * int64 observed_generation = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The observedGeneration to set. + * @return This builder for chaining. + */ + public Builder setObservedGeneration(long value) { + + observedGeneration_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The generation of this Instance currently serving traffic. See
+     * comments in `reconciling` for additional information on reconciliation
+     * process in Cloud Run. Please note that unlike v1, this is an int64 value.
+     * As with most Google APIs, its JSON representation will be a `string`
+     * instead of an `integer`.
+     * 
+ * + * int64 observed_generation = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearObservedGeneration() { + bitField0_ = (bitField0_ & ~0x10000000); + observedGeneration_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object logUri_ = ""; + + /** + * + * + *
+     * Output only. The Google Console URI to obtain logs for the Instance.
+     * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logUri. + */ + public java.lang.String getLogUri() { + java.lang.Object ref = logUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google Console URI to obtain logs for the Instance.
+     * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logUri. + */ + public com.google.protobuf.ByteString getLogUriBytes() { + java.lang.Object ref = logUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google Console URI to obtain logs for the Instance.
+     * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The logUri to set. + * @return This builder for chaining. + */ + public Builder setLogUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + logUri_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google Console URI to obtain logs for the Instance.
+     * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLogUri() { + logUri_ = getDefaultInstance().getLogUri(); + bitField0_ = (bitField0_ & ~0x20000000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google Console URI to obtain logs for the Instance.
+     * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for logUri to set. + * @return This builder for chaining. + */ + public Builder setLogUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + logUri_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + + private com.google.cloud.run.v2.Condition terminalCondition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Condition, + com.google.cloud.run.v2.Condition.Builder, + com.google.cloud.run.v2.ConditionOrBuilder> + terminalConditionBuilder_; + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminalCondition field is set. + */ + public boolean hasTerminalCondition() { + return ((bitField0_ & 0x40000000) != 0); + } + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminalCondition. + */ + public com.google.cloud.run.v2.Condition getTerminalCondition() { + if (terminalConditionBuilder_ == null) { + return terminalCondition_ == null + ? com.google.cloud.run.v2.Condition.getDefaultInstance() + : terminalCondition_; + } else { + return terminalConditionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerminalCondition(com.google.cloud.run.v2.Condition value) { + if (terminalConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + terminalCondition_ = value; + } else { + terminalConditionBuilder_.setMessage(value); + } + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerminalCondition(com.google.cloud.run.v2.Condition.Builder builderForValue) { + if (terminalConditionBuilder_ == null) { + terminalCondition_ = builderForValue.build(); + } else { + terminalConditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTerminalCondition(com.google.cloud.run.v2.Condition value) { + if (terminalConditionBuilder_ == null) { + if (((bitField0_ & 0x40000000) != 0) + && terminalCondition_ != null + && terminalCondition_ != com.google.cloud.run.v2.Condition.getDefaultInstance()) { + getTerminalConditionBuilder().mergeFrom(value); + } else { + terminalCondition_ = value; + } + } else { + terminalConditionBuilder_.mergeFrom(value); + } + if (terminalCondition_ != null) { + bitField0_ |= 0x40000000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTerminalCondition() { + bitField0_ = (bitField0_ & ~0x40000000); + terminalCondition_ = null; + if (terminalConditionBuilder_ != null) { + terminalConditionBuilder_.dispose(); + terminalConditionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.Condition.Builder getTerminalConditionBuilder() { + bitField0_ |= 0x40000000; + onChanged(); + return getTerminalConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.ConditionOrBuilder getTerminalConditionOrBuilder() { + if (terminalConditionBuilder_ != null) { + return terminalConditionBuilder_.getMessageOrBuilder(); + } else { + return terminalCondition_ == null + ? com.google.cloud.run.v2.Condition.getDefaultInstance() + : terminalCondition_; + } + } + + /** + * + * + *
+     * Output only. The Condition of this Instance, containing its readiness
+     * status, and detailed error information in case it did not reach a serving
+     * state. See comments in `reconciling` for additional information on
+     * reconciliation process in Cloud Run.
+     * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Condition, + com.google.cloud.run.v2.Condition.Builder, + com.google.cloud.run.v2.ConditionOrBuilder> + getTerminalConditionFieldBuilder() { + if (terminalConditionBuilder_ == null) { + terminalConditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.run.v2.Condition, + com.google.cloud.run.v2.Condition.Builder, + com.google.cloud.run.v2.ConditionOrBuilder>( + getTerminalCondition(), getParentForChildren(), isClean()); + terminalCondition_ = null; + } + return terminalConditionBuilder_; + } + + private java.util.List conditions_ = + java.util.Collections.emptyList(); + + private void ensureConditionsIsMutable() { + if (!((bitField0_ & 0x80000000) != 0)) { + conditions_ = new java.util.ArrayList(conditions_); + bitField0_ |= 0x80000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Condition, + com.google.cloud.run.v2.Condition.Builder, + com.google.cloud.run.v2.ConditionOrBuilder> + conditionsBuilder_; + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getConditionsList() { + if (conditionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditions_); + } else { + return conditionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getConditionsCount() { + if (conditionsBuilder_ == null) { + return conditions_.size(); + } else { + return conditionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.Condition getConditions(int index) { + if (conditionsBuilder_ == null) { + return conditions_.get(index); + } else { + return conditionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setConditions(int index, com.google.cloud.run.v2.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.set(index, value); + onChanged(); + } else { + conditionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setConditions( + int index, com.google.cloud.run.v2.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addConditions(com.google.cloud.run.v2.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.add(value); + onChanged(); + } else { + conditionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addConditions(int index, com.google.cloud.run.v2.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.add(index, value); + onChanged(); + } else { + conditionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addConditions(com.google.cloud.run.v2.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addConditions( + int index, com.google.cloud.run.v2.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllConditions( + java.lang.Iterable values) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conditions_); + onChanged(); + } else { + conditionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearConditions() { + if (conditionsBuilder_ == null) { + conditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x80000000); + onChanged(); + } else { + conditionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeConditions(int index) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.remove(index); + onChanged(); + } else { + conditionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.Condition.Builder getConditionsBuilder(int index) { + return getConditionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.ConditionOrBuilder getConditionsOrBuilder(int index) { + if (conditionsBuilder_ == null) { + return conditions_.get(index); + } else { + return conditionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getConditionsOrBuilderList() { + if (conditionsBuilder_ != null) { + return conditionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditions_); + } + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.Condition.Builder addConditionsBuilder() { + return getConditionsFieldBuilder() + .addBuilder(com.google.cloud.run.v2.Condition.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.Condition.Builder addConditionsBuilder(int index) { + return getConditionsFieldBuilder() + .addBuilder(index, com.google.cloud.run.v2.Condition.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The Conditions of all other associated sub-resources. They
+     * contain additional diagnostics information in case the Instance does not
+     * reach its Serving state. See comments in `reconciling` for additional
+     * information on reconciliation process in Cloud Run.
+     * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getConditionsBuilderList() { + return getConditionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Condition, + com.google.cloud.run.v2.Condition.Builder, + com.google.cloud.run.v2.ConditionOrBuilder> + getConditionsFieldBuilder() { + if (conditionsBuilder_ == null) { + conditionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Condition, + com.google.cloud.run.v2.Condition.Builder, + com.google.cloud.run.v2.ConditionOrBuilder>( + conditions_, ((bitField0_ & 0x80000000) != 0), getParentForChildren(), isClean()); + conditions_ = null; + } + return conditionsBuilder_; + } + + private java.util.List containerStatuses_ = + java.util.Collections.emptyList(); + + private void ensureContainerStatusesIsMutable() { + if (!((bitField1_ & 0x00000001) != 0)) { + containerStatuses_ = + new java.util.ArrayList(containerStatuses_); + bitField1_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.ContainerStatus, + com.google.cloud.run.v2.ContainerStatus.Builder, + com.google.cloud.run.v2.ContainerStatusOrBuilder> + containerStatusesBuilder_; + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getContainerStatusesList() { + if (containerStatusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(containerStatuses_); + } else { + return containerStatusesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getContainerStatusesCount() { + if (containerStatusesBuilder_ == null) { + return containerStatuses_.size(); + } else { + return containerStatusesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.ContainerStatus getContainerStatuses(int index) { + if (containerStatusesBuilder_ == null) { + return containerStatuses_.get(index); + } else { + return containerStatusesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setContainerStatuses(int index, com.google.cloud.run.v2.ContainerStatus value) { + if (containerStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerStatusesIsMutable(); + containerStatuses_.set(index, value); + onChanged(); + } else { + containerStatusesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setContainerStatuses( + int index, com.google.cloud.run.v2.ContainerStatus.Builder builderForValue) { + if (containerStatusesBuilder_ == null) { + ensureContainerStatusesIsMutable(); + containerStatuses_.set(index, builderForValue.build()); + onChanged(); + } else { + containerStatusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addContainerStatuses(com.google.cloud.run.v2.ContainerStatus value) { + if (containerStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerStatusesIsMutable(); + containerStatuses_.add(value); + onChanged(); + } else { + containerStatusesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addContainerStatuses(int index, com.google.cloud.run.v2.ContainerStatus value) { + if (containerStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerStatusesIsMutable(); + containerStatuses_.add(index, value); + onChanged(); + } else { + containerStatusesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addContainerStatuses( + com.google.cloud.run.v2.ContainerStatus.Builder builderForValue) { + if (containerStatusesBuilder_ == null) { + ensureContainerStatusesIsMutable(); + containerStatuses_.add(builderForValue.build()); + onChanged(); + } else { + containerStatusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addContainerStatuses( + int index, com.google.cloud.run.v2.ContainerStatus.Builder builderForValue) { + if (containerStatusesBuilder_ == null) { + ensureContainerStatusesIsMutable(); + containerStatuses_.add(index, builderForValue.build()); + onChanged(); + } else { + containerStatusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllContainerStatuses( + java.lang.Iterable values) { + if (containerStatusesBuilder_ == null) { + ensureContainerStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, containerStatuses_); + onChanged(); + } else { + containerStatusesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearContainerStatuses() { + if (containerStatusesBuilder_ == null) { + containerStatuses_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000001); + onChanged(); + } else { + containerStatusesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeContainerStatuses(int index) { + if (containerStatusesBuilder_ == null) { + ensureContainerStatusesIsMutable(); + containerStatuses_.remove(index); + onChanged(); + } else { + containerStatusesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.ContainerStatus.Builder getContainerStatusesBuilder(int index) { + return getContainerStatusesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.ContainerStatusOrBuilder getContainerStatusesOrBuilder( + int index) { + if (containerStatusesBuilder_ == null) { + return containerStatuses_.get(index); + } else { + return containerStatusesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getContainerStatusesOrBuilderList() { + if (containerStatusesBuilder_ != null) { + return containerStatusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containerStatuses_); + } + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.ContainerStatus.Builder addContainerStatusesBuilder() { + return getContainerStatusesFieldBuilder() + .addBuilder(com.google.cloud.run.v2.ContainerStatus.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.run.v2.ContainerStatus.Builder addContainerStatusesBuilder(int index) { + return getContainerStatusesFieldBuilder() + .addBuilder(index, com.google.cloud.run.v2.ContainerStatus.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Status information for each of the specified containers. The
+     * status includes the resolved digest for specified images.
+     * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getContainerStatusesBuilderList() { + return getContainerStatusesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.ContainerStatus, + com.google.cloud.run.v2.ContainerStatus.Builder, + com.google.cloud.run.v2.ContainerStatusOrBuilder> + getContainerStatusesFieldBuilder() { + if (containerStatusesBuilder_ == null) { + containerStatusesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.ContainerStatus, + com.google.cloud.run.v2.ContainerStatus.Builder, + com.google.cloud.run.v2.ContainerStatusOrBuilder>( + containerStatuses_, + ((bitField1_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + containerStatuses_ = null; + } + return containerStatusesBuilder_; + } + + private boolean satisfiesPzs_; + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzs to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzs(boolean value) { + + satisfiesPzs_ = value; + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzs() { + bitField1_ = (bitField1_ & ~0x00000002); + satisfiesPzs_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList urls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUrlsIsMutable() { + if (!urls_.isModifiable()) { + urls_ = new com.google.protobuf.LazyStringArrayList(urls_); + } + bitField1_ |= 0x00000004; + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the urls. + */ + public com.google.protobuf.ProtocolStringList getUrlsList() { + urls_.makeImmutable(); + return urls_; + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of urls. + */ + public int getUrlsCount() { + return urls_.size(); + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The urls at the given index. + */ + public java.lang.String getUrls(int index) { + return urls_.get(index); + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the urls at the given index. + */ + public com.google.protobuf.ByteString getUrlsBytes(int index) { + return urls_.getByteString(index); + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The urls to set. + * @return This builder for chaining. + */ + public Builder setUrls(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrlsIsMutable(); + urls_.set(index, value); + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The urls to add. + * @return This builder for chaining. + */ + public Builder addUrls(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrlsIsMutable(); + urls_.add(value); + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The urls to add. + * @return This builder for chaining. + */ + public Builder addAllUrls(java.lang.Iterable values) { + ensureUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, urls_); + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUrls() { + urls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField1_ = (bitField1_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. All URLs serving traffic for this Instance.
+     * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the urls to add. + * @return This builder for chaining. + */ + public Builder addUrlsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrlsIsMutable(); + urls_.add(value); + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean reconciling_; + + /** + * + * + *
+     * Output only. Returns true if the Instance is currently being acted upon by
+     * the system to bring it into the desired state.
+     *
+     * When a new Instance is created, or an existing one is updated, Cloud Run
+     * will asynchronously perform all necessary steps to bring the Instance to
+     * the desired serving state. This process is called reconciliation. While
+     * reconciliation is in process, `observed_generation` will have a transient
+     * value that might mismatch the intended state.
+     *  Once reconciliation is over (and this field is false), there are two
+     * possible outcomes: reconciliation succeeded and the serving state matches
+     * the Instance, or there was an error, and reconciliation failed. This state
+     * can be found in `terminal_condition.state`.
+     * 
+ * + * bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + /** + * + * + *
+     * Output only. Returns true if the Instance is currently being acted upon by
+     * the system to bring it into the desired state.
+     *
+     * When a new Instance is created, or an existing one is updated, Cloud Run
+     * will asynchronously perform all necessary steps to bring the Instance to
+     * the desired serving state. This process is called reconciliation. While
+     * reconciliation is in process, `observed_generation` will have a transient
+     * value that might mismatch the intended state.
+     *  Once reconciliation is over (and this field is false), there are two
+     * possible outcomes: reconciliation succeeded and the serving state matches
+     * the Instance, or there was an error, and reconciliation failed. This state
+     * can be found in `terminal_condition.state`.
+     * 
+ * + * bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The reconciling to set. + * @return This builder for chaining. + */ + public Builder setReconciling(boolean value) { + + reconciling_ = value; + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Returns true if the Instance is currently being acted upon by
+     * the system to bring it into the desired state.
+     *
+     * When a new Instance is created, or an existing one is updated, Cloud Run
+     * will asynchronously perform all necessary steps to bring the Instance to
+     * the desired serving state. This process is called reconciliation. While
+     * reconciliation is in process, `observed_generation` will have a transient
+     * value that might mismatch the intended state.
+     *  Once reconciliation is over (and this field is false), there are two
+     * possible outcomes: reconciliation succeeded and the serving state matches
+     * the Instance, or there was an error, and reconciliation failed. This state
+     * can be found in `terminal_condition.state`.
+     * 
+ * + * bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReconciling() { + bitField1_ = (bitField1_ & ~0x00000008); + reconciling_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField1_ = (bitField1_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the
+     * resource. May be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField1_ |= 0x00000010; + 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.run.v2.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.Instance) + private static final com.google.cloud.run.v2.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.Instance(); + } + + public static com.google.cloud.run.v2.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance 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.run.v2.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceName.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceName.java new file mode 100644 index 000000000000..04a8d2ac9f5a --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 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.run.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + location = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + this.project = instanceName.project; + this.location = instanceName.location; + this.instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceOrBuilder.java new file mode 100644 index 000000000000..f393899055d9 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceOrBuilder.java @@ -0,0 +1,1313 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The fully qualified name of this Instance. In CreateInstanceRequest, this
+   * field is ignored, and instead composed from CreateInstanceRequest.parent
+   * and CreateInstanceRequest.instance_id.
+   *
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance_id}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * The fully qualified name of this Instance. In CreateInstanceRequest, this
+   * field is ignored, and instead composed from CreateInstanceRequest.parent
+   * and CreateInstanceRequest.instance_id.
+   *
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance_id}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * User-provided description of the Instance. This field currently has a
+   * 512-character limit.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * User-provided description of the Instance. This field currently has a
+   * 512-character limit.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Server assigned unique identifier for the trigger. The value
+   * is a UUID4 string and guaranteed to remain unchanged until the resource is
+   * deleted.
+   * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. Server assigned unique identifier for the trigger. The value
+   * is a UUID4 string and guaranteed to remain unchanged until the resource is
+   * deleted.
+   * 
+ * + * string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. A number that monotonically increases every time the user
+   * modifies the desired state.
+   * Please note that unlike v1, this is an int64 value. As with most Google
+   * APIs, its JSON representation will be a `string` instead of an `integer`.
+   * 
+ * + * int64 generation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The generation. + */ + long getGeneration(); + + /** map<string, string> labels = 6; */ + int getLabelsCount(); + + /** map<string, string> labels = 6; */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** map<string, string> labels = 6; */ + java.util.Map getLabelsMap(); + + /** map<string, string> labels = 6; */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** map<string, string> labels = 6; */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** map<string, string> annotations = 7; */ + int getAnnotationsCount(); + + /** map<string, string> annotations = 7; */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** map<string, string> annotations = 7; */ + java.util.Map getAnnotationsMap(); + + /** map<string, string> annotations = 7; */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** map<string, string> annotations = 7; */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The last-modified time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The last-modified time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The last-modified time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The deletion time.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + + /** + * + * + *
+   * Output only. The deletion time.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + + /** + * + * + *
+   * Output only. The deletion time.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + + /** + * + * + *
+   * Output only. For a deleted resource, the time after which it will be
+   * permamently deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + + /** + * + * + *
+   * Output only. For a deleted resource, the time after which it will be
+   * permamently deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + + /** + * + * + *
+   * Output only. For a deleted resource, the time after which it will be
+   * permamently deleted.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Email address of the authenticated creator.
+   * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The creator. + */ + java.lang.String getCreator(); + + /** + * + * + *
+   * Output only. Email address of the authenticated creator.
+   * 
+ * + * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for creator. + */ + com.google.protobuf.ByteString getCreatorBytes(); + + /** + * + * + *
+   * Output only. Email address of the last authenticated modifier.
+   * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastModifier. + */ + java.lang.String getLastModifier(); + + /** + * + * + *
+   * Output only. Email address of the last authenticated modifier.
+   * 
+ * + * string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for lastModifier. + */ + com.google.protobuf.ByteString getLastModifierBytes(); + + /** + * + * + *
+   * Arbitrary identifier for the API client.
+   * 
+ * + * string client = 14; + * + * @return The client. + */ + java.lang.String getClient(); + + /** + * + * + *
+   * Arbitrary identifier for the API client.
+   * 
+ * + * string client = 14; + * + * @return The bytes for client. + */ + com.google.protobuf.ByteString getClientBytes(); + + /** + * + * + *
+   * Arbitrary version identifier for the API client.
+   * 
+ * + * string client_version = 15; + * + * @return The clientVersion. + */ + java.lang.String getClientVersion(); + + /** + * + * + *
+   * Arbitrary version identifier for the API client.
+   * 
+ * + * string client_version = 15; + * + * @return The bytes for clientVersion. + */ + com.google.protobuf.ByteString getClientVersionBytes(); + + /** + * + * + *
+   * The launch stage as defined by [Google Cloud Platform
+   *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+   *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+   *  is assumed.
+   *  Set the launch stage to a preview stage on input to allow use of preview
+   *  features in that stage. On read (or output), describes whether the
+   *  resource uses preview features.
+   * <p>
+   *  For example, if ALPHA is provided as input, but only BETA and GA-level
+   *  features are used, this field will be BETA on output.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @return The enum numeric value on the wire for launchStage. + */ + int getLaunchStageValue(); + + /** + * + * + *
+   * The launch stage as defined by [Google Cloud Platform
+   *  Launch Stages](https://cloud.google.com/terms/launch-stages).
+   *  Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
+   *  is assumed.
+   *  Set the launch stage to a preview stage on input to allow use of preview
+   *  features in that stage. On read (or output), describes whether the
+   *  resource uses preview features.
+   * <p>
+   *  For example, if ALPHA is provided as input, but only BETA and GA-level
+   *  features are used, this field will be BETA on output.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 16; + * + * @return The launchStage. + */ + com.google.api.LaunchStage getLaunchStage(); + + /** + * + * + *
+   * Settings for the Binary Authorization feature.
+   * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + * + * @return Whether the binaryAuthorization field is set. + */ + boolean hasBinaryAuthorization(); + + /** + * + * + *
+   * Settings for the Binary Authorization feature.
+   * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + * + * @return The binaryAuthorization. + */ + com.google.cloud.run.v2.BinaryAuthorization getBinaryAuthorization(); + + /** + * + * + *
+   * Settings for the Binary Authorization feature.
+   * 
+ * + * .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + com.google.cloud.run.v2.BinaryAuthorizationOrBuilder getBinaryAuthorizationOrBuilder(); + + /** + * + * + *
+   * Optional. VPC Access configuration to use for this Revision. For more
+   * information, visit
+   * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+   * 
+ * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vpcAccess field is set. + */ + boolean hasVpcAccess(); + + /** + * + * + *
+   * Optional. VPC Access configuration to use for this Revision. For more
+   * information, visit
+   * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+   * 
+ * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vpcAccess. + */ + com.google.cloud.run.v2.VpcAccess getVpcAccess(); + + /** + * + * + *
+   * Optional. VPC Access configuration to use for this Revision. For more
+   * information, visit
+   * https://cloud.google.com/run/docs/configuring/connecting-vpc.
+   * 
+ * + * .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.run.v2.VpcAccessOrBuilder getVpcAccessOrBuilder(); + + /** + * string service_account = 19; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + + /** + * string service_account = 19; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getContainersList(); + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.run.v2.Container getContainers(int index); + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getContainersCount(); + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getContainersOrBuilderList(); + + /** + * + * + *
+   * Required. Holds the single container that defines the unit of execution for
+   * this Instance.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.run.v2.ContainerOrBuilder getContainersOrBuilder(int index); + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + java.util.List getVolumesList(); + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + com.google.cloud.run.v2.Volume getVolumes(int index); + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + int getVolumesCount(); + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + java.util.List getVolumesOrBuilderList(); + + /** + * + * + *
+   * A list of Volumes to make available to containers.
+   * 
+ * + * repeated .google.cloud.run.v2.Volume volumes = 21; + */ + com.google.cloud.run.v2.VolumeOrBuilder getVolumesOrBuilder(int index); + + /** + * + * + *
+   * A reference to a customer managed encryption key (CMEK) to use to encrypt
+   * this container image. For more information, go to
+   * https://cloud.google.com/run/docs/securing/using-cmek
+   * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @return The encryptionKey. + */ + java.lang.String getEncryptionKey(); + + /** + * + * + *
+   * A reference to a customer managed encryption key (CMEK) to use to encrypt
+   * this container image. For more information, go to
+   * https://cloud.google.com/run/docs/securing/using-cmek
+   * 
+ * + * string encryption_key = 22 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for encryptionKey. + */ + com.google.protobuf.ByteString getEncryptionKeyBytes(); + + /** + * + * + *
+   * The action to take if the encryption key is revoked.
+   * 
+ * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @return The enum numeric value on the wire for encryptionKeyRevocationAction. + */ + int getEncryptionKeyRevocationActionValue(); + + /** + * + * + *
+   * The action to take if the encryption key is revoked.
+   * 
+ * + * .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * + * + * @return The encryptionKeyRevocationAction. + */ + com.google.cloud.run.v2.EncryptionKeyRevocationAction getEncryptionKeyRevocationAction(); + + /** + * + * + *
+   * If encryption_key_revocation_action is SHUTDOWN, the duration before
+   * shutting down all instances. The minimum increment is 1 hour.
+   * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + * + * @return Whether the encryptionKeyShutdownDuration field is set. + */ + boolean hasEncryptionKeyShutdownDuration(); + + /** + * + * + *
+   * If encryption_key_revocation_action is SHUTDOWN, the duration before
+   * shutting down all instances. The minimum increment is 1 hour.
+   * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + * + * @return The encryptionKeyShutdownDuration. + */ + com.google.protobuf.Duration getEncryptionKeyShutdownDuration(); + + /** + * + * + *
+   * If encryption_key_revocation_action is SHUTDOWN, the duration before
+   * shutting down all instances. The minimum increment is 1 hour.
+   * 
+ * + * .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + com.google.protobuf.DurationOrBuilder getEncryptionKeyShutdownDurationOrBuilder(); + + /** + * + * + *
+   * Optional. The node selector for the instance.
+   * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nodeSelector field is set. + */ + boolean hasNodeSelector(); + + /** + * + * + *
+   * Optional. The node selector for the instance.
+   * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeSelector. + */ + com.google.cloud.run.v2.NodeSelector getNodeSelector(); + + /** + * + * + *
+   * Optional. The node selector for the instance.
+   * 
+ * + * + * .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.run.v2.NodeSelectorOrBuilder getNodeSelectorOrBuilder(); + + /** + * + * + *
+   * Optional. True if GPU zonal redundancy is disabled on this instance.
+   * 
+ * + * + * optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gpuZonalRedundancyDisabled field is set. + */ + boolean hasGpuZonalRedundancyDisabled(); + + /** + * + * + *
+   * Optional. True if GPU zonal redundancy is disabled on this instance.
+   * 
+ * + * + * optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gpuZonalRedundancyDisabled. + */ + boolean getGpuZonalRedundancyDisabled(); + + /** + * + * + *
+   * Optional. Provides the ingress settings for this Instance. On output,
+   * returns the currently observed ingress settings, or
+   * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+   * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ingress. + */ + int getIngressValue(); + + /** + * + * + *
+   * Optional. Provides the ingress settings for this Instance. On output,
+   * returns the currently observed ingress settings, or
+   * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
+   * 
+ * + * + * .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ingress. + */ + com.google.cloud.run.v2.IngressTraffic getIngress(); + + /** + * + * + *
+   * Optional. Disables IAM permission check for run.routes.invoke for callers
+   * of this Instance. For more information, visit
+   * https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
+   * 
+ * + * bool invoker_iam_disabled = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The invokerIamDisabled. + */ + boolean getInvokerIamDisabled(); + + /** + * + * + *
+   * Optional. IAP settings on the Instance.
+   * 
+ * + * bool iap_enabled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The iapEnabled. + */ + boolean getIapEnabled(); + + /** + * + * + *
+   * Output only. The generation of this Instance currently serving traffic. See
+   * comments in `reconciling` for additional information on reconciliation
+   * process in Cloud Run. Please note that unlike v1, this is an int64 value.
+   * As with most Google APIs, its JSON representation will be a `string`
+   * instead of an `integer`.
+   * 
+ * + * int64 observed_generation = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The observedGeneration. + */ + long getObservedGeneration(); + + /** + * + * + *
+   * Output only. The Google Console URI to obtain logs for the Instance.
+   * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logUri. + */ + java.lang.String getLogUri(); + + /** + * + * + *
+   * Output only. The Google Console URI to obtain logs for the Instance.
+   * 
+ * + * string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logUri. + */ + com.google.protobuf.ByteString getLogUriBytes(); + + /** + * + * + *
+   * Output only. The Condition of this Instance, containing its readiness
+   * status, and detailed error information in case it did not reach a serving
+   * state. See comments in `reconciling` for additional information on
+   * reconciliation process in Cloud Run.
+   * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminalCondition field is set. + */ + boolean hasTerminalCondition(); + + /** + * + * + *
+   * Output only. The Condition of this Instance, containing its readiness
+   * status, and detailed error information in case it did not reach a serving
+   * state. See comments in `reconciling` for additional information on
+   * reconciliation process in Cloud Run.
+   * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminalCondition. + */ + com.google.cloud.run.v2.Condition getTerminalCondition(); + + /** + * + * + *
+   * Output only. The Condition of this Instance, containing its readiness
+   * status, and detailed error information in case it did not reach a serving
+   * state. See comments in `reconciling` for additional information on
+   * reconciliation process in Cloud Run.
+   * 
+ * + * + * .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.run.v2.ConditionOrBuilder getTerminalConditionOrBuilder(); + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getConditionsList(); + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.run.v2.Condition getConditions(int index); + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getConditionsCount(); + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getConditionsOrBuilderList(); + + /** + * + * + *
+   * Output only. The Conditions of all other associated sub-resources. They
+   * contain additional diagnostics information in case the Instance does not
+   * reach its Serving state. See comments in `reconciling` for additional
+   * information on reconciliation process in Cloud Run.
+   * 
+ * + * + * repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.run.v2.ConditionOrBuilder getConditionsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getContainerStatusesList(); + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.run.v2.ContainerStatus getContainerStatuses(int index); + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getContainerStatusesCount(); + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getContainerStatusesOrBuilderList(); + + /** + * + * + *
+   * Output only. Status information for each of the specified containers. The
+   * status includes the resolved digest for specified images.
+   * 
+ * + * + * repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.run.v2.ContainerStatusOrBuilder getContainerStatusesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + boolean getSatisfiesPzs(); + + /** + * + * + *
+   * Output only. All URLs serving traffic for this Instance.
+   * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the urls. + */ + java.util.List getUrlsList(); + + /** + * + * + *
+   * Output only. All URLs serving traffic for this Instance.
+   * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of urls. + */ + int getUrlsCount(); + + /** + * + * + *
+   * Output only. All URLs serving traffic for this Instance.
+   * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The urls at the given index. + */ + java.lang.String getUrls(int index); + + /** + * + * + *
+   * Output only. All URLs serving traffic for this Instance.
+   * 
+ * + * repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the urls at the given index. + */ + com.google.protobuf.ByteString getUrlsBytes(int index); + + /** + * + * + *
+   * Output only. Returns true if the Instance is currently being acted upon by
+   * the system to bring it into the desired state.
+   *
+   * When a new Instance is created, or an existing one is updated, Cloud Run
+   * will asynchronously perform all necessary steps to bring the Instance to
+   * the desired serving state. This process is called reconciliation. While
+   * reconciliation is in process, `observed_generation` will have a transient
+   * value that might mismatch the intended state.
+   *  Once reconciliation is over (and this field is false), there are two
+   * possible outcomes: reconciliation succeeded and the serving state matches
+   * the Instance, or there was an error, and reconciliation failed. This state
+   * can be found in `terminal_condition.state`.
+   * 
+ * + * bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + boolean getReconciling(); + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the
+   * resource. May be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the
+   * resource. May be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceOuterClass.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceOuterClass.java new file mode 100644 index 000000000000..bf30555345a0 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/InstanceOuterClass.java @@ -0,0 +1,382 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public final class InstanceOuterClass { + private InstanceOuterClass() {} + + 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_run_v2_CreateInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_CreateInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_GetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_GetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_DeleteInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_DeleteInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_ListInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_ListInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_ListInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_ListInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_StopInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_StopInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_StartInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_StartInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_Instance_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_run_v2_Instance_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_run_v2_Instance_AnnotationsEntry_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/run/v2/instance.proto\022\023go" + + "ogle.cloud.run.v2\032\034google/api/annotation" + + "s.proto\032\027google/api/client.proto\032\037google" + + "/api/field_behavior.proto\032\035google/api/la" + + "unch_stage.proto\032\031google/api/resource.pr" + + "oto\032\030google/api/routing.proto\032#google/cl" + + "oud/run/v2/condition.proto\032*google/cloud/run/v2/container_status.proto\032!google/c" + + "loud/run/v2/k8s.min.proto\032)google/cloud/run/v2/vendor_settings.proto\032#google/lon" + + "grunning/operations.proto\032\036google/protob" + + "uf/duration.proto\032\037google/protobuf/timestamp.proto\"\270\001\n" + + "\025CreateInstanceRequest\0223\n" + + "\006parent\030\001 \001(" + + "\tB#\340A\002\372A\035\022\033run.googleapis.com/Instance\0224\n" + + "\010instance\030\002" + + " \001(\0132\035.google.cloud.run.v2.InstanceB\003\340A\002\022\030\n" + + "\013instance_id\030\003 \001(\tB\003\340A\002\022\032\n\r" + + "validate_only\030\004 \001(\010B\003\340A\001\"G\n" + + "\022GetInstanceRequest\0221\n" + + "\004name\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033run.googleapis.com/Instance\"y\n" + + "\025DeleteInstanceRequest\0221\n" + + "\004name\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033run.googleapis.com/Instance\022\032\n\r" + + "validate_only\030\002 \001(\010B\003\340A\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\"\227\001\n" + + "\024ListInstancesRequest\0223\n" + + "\006parent\030\001 \001(" + + "\tB#\340A\002\372A\035\022\033run.googleapis.com/Instance\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\031\n" + + "\014show_deleted\030\004 \001(\010B\003\340A\001\"b\n" + + "\025ListInstancesResponse\0220\n" + + "\tinstances\030\001 \003(\0132\035.google.cloud.run.v2.Instance\022\027\n" + + "\017next_page_token\030\002 \001(\t\"w\n" + + "\023StopInstanceRequest\0221\n" + + "\004name\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033run.googleapis.com/Instance\022\032\n\r" + + "validate_only\030\002 \001(\010B\003\340A\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\"x\n" + + "\024StartInstanceRequest\0221\n" + + "\004name\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033run.googleapis.com/Instance\022\032\n\r" + + "validate_only\030\002 \001(\010B\003\340A\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\"\324\016\n" + + "\010Instance\022\014\n" + + "\004name\030\001 \001(\t\022\023\n" + + "\013description\030\003 \001(\t\022\020\n" + + "\003uid\030\004 \001(\tB\003\340A\003\022\027\n\n" + + "generation\030\005 \001(\003B\003\340A\003\0229\n" + + "\006labels\030\006 \003(\0132).google.cloud.run.v2.Instance.LabelsEntry\022C\n" + + "\013annotations\030\007" + + " \003(\0132..google.cloud.run.v2.Instance.AnnotationsEntry\0224\n" + + "\013create_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013delete_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013expire_time\030\013" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\024\n" + + "\007creator\030\014 \001(\tB\003\340A\003\022\032\n\r" + + "last_modifier\030\r" + + " \001(\tB\003\340A\003\022\016\n" + + "\006client\030\016 \001(\t\022\026\n" + + "\016client_version\030\017 \001(\t\022-\n" + + "\014launch_stage\030\020 \001(\0162\027.google.api.LaunchStage\022F\n" + + "\024binary_authorization\030\021" + + " \001(\0132(.google.cloud.run.v2.BinaryAuthorization\0227\n\n" + + "vpc_access\030\022" + + " \001(\0132\036.google.cloud.run.v2.VpcAccessB\003\340A\001\022\027\n" + + "\017service_account\030\023 \001(\t\0227\n\n" + + "containers\030\024 \003(\0132\036.google.cloud.run.v2.ContainerB\003\340A\002\022,\n" + + "\007volumes\030\025 \003(\0132\033.google.cloud.run.v2.Volume\022>\n" + + "\016encryption_key\030\026 \001(\tB&\372A#\n" + + "!cloudkms.googleapis.com/CryptoKey\022\\\n" + + " encryption_key_revocation_action\030\030" + + " \001(\01622.google.cloud.run.v2.EncryptionKeyRevocationAction\022C\n" + + " encryption_key_shutdown_duration\030\031" + + " \001(\0132\031.google.protobuf.Duration\022=\n\r" + + "node_selector\030\032" + + " \001(\0132!.google.cloud.run.v2.NodeSelectorB\003\340A\001\022/\n" + + "\035gpu_zonal_redundancy_disabled\030\033" + + " \001(\010B\003\340A\001H\000\210\001\001\0229\n" + + "\007ingress\030\034" + + " \001(\0162#.google.cloud.run.v2.IngressTrafficB\003\340A\001\022!\n" + + "\024invoker_iam_disabled\030\035 \001(\010B\003\340A\001\022\030\n" + + "\013iap_enabled\030\036 \001(\010B\003\340A\001\022 \n" + + "\023observed_generation\030( \001(\003B\003\340A\003\022\024\n" + + "\007log_uri\030) \001(\tB\003\340A\003\022?\n" + + "\022terminal_condition\030*" + + " \001(\0132\036.google.cloud.run.v2.ConditionB\003\340A\003\0227\n\n" + + "conditions\030+ \003(\0132\036.google.cloud.run.v2.ConditionB\003\340A\003\022E\n" + + "\022container_statuses\030," + + " \003(\0132$.google.cloud.run.v2.ContainerStatusB\003\340A\003\022\032\n\r" + + "satisfies_pzs\030. \001(\010B\003\340A\003\022\021\n" + + "\004urls\030- \003(\tB\003\340A\003\022\030\n" + + "\013reconciling\030b \001(\010B\003\340A\003\022\021\n" + + "\004etag\030c \001(\tB\003\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:s\352Ap\n" + + "\033run.googleapis." + + "com/Instance\022\n" + + "\022cloud_sql_instance\030\003" + + " \001(\0132%.google.cloud.run.v2.CloudSqlInstanceH\000\022>\n" + "\tempty_dir\030\004 \001(\0132).google.cloud.run.v2.EmptyDirVolumeSourceH\000\0223\n" + "\003nfs\030\005 \001(\0132$.google.cloud.run.v2.NFSVolumeSourceH\000\0223\n" + "\003gcs\030\006 \001(\0132$.google.cloud.run.v2.GCSVolumeSourceH\000B\r\n" @@ -219,12 +220,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017timeout_seconds\030\002 \001(\005B\003\340A\001\022\033\n" + "\016period_seconds\030\003 \001(\005B\003\340A\001\022\036\n" + "\021failure_threshold\030\004 \001(\005B\003\340A\001\022;\n" - + "\010http_get\030\005" - + " \001(\0132\".google.cloud.run.v2.HTTPGetActionB\003\340A\001H\000\022?\n\n" + + "\010http_get\030\005 \001(\0132\".go" + + "ogle.cloud.run.v2.HTTPGetActionB\003\340A\001H\000\022?\n\n" + "tcp_socket\030\006" + " \001(\0132$.google.cloud.run.v2.TCPSocketActionB\003\340A\001H\000\0224\n" + "\004grpc\030\007" - + " \001(\0132\037.google.cloud.run.v2.GRPCActionB\003\340A\001H\000B\014\n\n" + + " \001(\0132\037.google.cloud.run.v2.GRPCActionB\003\340A\001H\000B\014\n" + + "\n" + "probe_type\"q\n\r" + "HTTPGetAction\022\021\n" + "\004path\030\001 \001(\tB\003\340A\001\022:\n" @@ -243,22 +245,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017function_target\030\001 \001(\tB\003\340A\003\022\034\n" + "\017source_location\030\002 \001(\tB\003\340A\003\"\310\001\n\n" + "SourceCode\022R\n" - + "\024cloud_storage_source\030\001" - + " \001(\01322.google.cloud.run.v2.SourceCode.CloudStorageSourceH\000\032W\n" + + "\024cloud_storage_source\030\001 \001(\01322.google." + + "cloud.run.v2.SourceCode.CloudStorageSourceH\000\032W\n" + "\022CloudStorageSource\022\023\n" + "\006bucket\030\001 \001(\tB\003\340A\002\022\023\n" + "\006object\030\002 \001(\tB\003\340A\002\022\027\n\n" + "generation\030\003 \001(\003B\003\340A\001B\r\n" + "\013source_typeB\351\003\n" - + "\027com.google.cloud.run" - + ".v2B\013K8sMinProtoP\001Z)cloud.google.com/go/run/apiv2/runpb;runpb\352Ax\n" - + "!cloudkms.googleapis.com/CryptoKey\022Sprojects/{project}/" - + "locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\352AJ\n" + + "\027com.goo" + + "gle.cloud.run.v2B\013K8sMinProtoP\001Z)cloud.google.com/go/run/apiv2/runpb;runpb\352Ax\n" + + "!cloudkms.googleapis.com/CryptoKey\022Sprojects/{project}/locations/{location}/keyRin" + + "gs/{key_ring}/cryptoKeys/{crypto_key}\352AJ\n" + "#secretmanager.googleapis.com/Secret\022#projects/{project}/secrets/{secret}\352Ad\n" - + "*secretmanager.googleapis.com/SecretVersion\0226projects/{" - + "project}/secrets/{secret}/versions/{version}\352Ad\n" - + "\"vpcaccess.googleapis.com/Connector\022>projects/{project}/locations/{locat" - + "ion}/connectors/{connector}b\006proto3" + + "*secretmanager.googleapis.com/SecretVersio" + + "n\0226projects/{project}/secrets/{secret}/versions/{version}\352Ad\n" + + "\"vpcaccess.googleapis.com/Connector\022>projects/{project}/loc" + + "ations/{location}/connectors/{connector}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -285,6 +287,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WorkingDir", "LivenessProbe", "StartupProbe", + "ReadinessProbe", "DependsOn", "BaseImageUri", "BuildInfo", diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesRequest.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesRequest.java new file mode 100644 index 000000000000..cc25c6124dbb --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesRequest.java @@ -0,0 +1,1055 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** + * + * + *
+ * Request message for retrieving a list of Instances.
+ * 
+ * + * Protobuf type {@code google.cloud.run.v2.ListInstancesRequest} + */ +public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.ListInstancesRequest) + ListInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListInstancesRequest.newBuilder() to construct. + private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.ListInstancesRequest.class, + com.google.cloud.run.v2.ListInstancesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The location and project to list resources on.
+   * Format: projects/{project}/locations/{location}, where {project} can be
+   * project id or number.
+   * 
+ * + * + * 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 location and project to list resources on.
+   * Format: projects/{project}/locations/{location}, where {project} can be
+   * project id or number.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Maximum number of Instances to return in this call.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token received from a previous call to ListInstances.
+   * All other parameters must match.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token received from a previous call to ListInstances.
+   * All other parameters must match.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHOW_DELETED_FIELD_NUMBER = 4; + private boolean showDeleted_ = false; + + /** + * + * + *
+   * Optional. If true, returns deleted (but unexpired) resources along with
+   * active ones.
+   * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + 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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (showDeleted_ != false) { + output.writeBool(4, showDeleted_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (showDeleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, showDeleted_); + } + 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.run.v2.ListInstancesRequest)) { + return super.equals(obj); + } + com.google.cloud.run.v2.ListInstancesRequest other = + (com.google.cloud.run.v2.ListInstancesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getShowDeleted() != other.getShowDeleted()) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + SHOW_DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeleted()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.ListInstancesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ListInstancesRequest 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.run.v2.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ListInstancesRequest 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.run.v2.ListInstancesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ListInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.ListInstancesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ListInstancesRequest 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.run.v2.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ListInstancesRequest 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.run.v2.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ListInstancesRequest 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.run.v2.ListInstancesRequest 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; + } + + /** + * + * + *
+   * Request message for retrieving a list of Instances.
+   * 
+ * + * Protobuf type {@code google.cloud.run.v2.ListInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.ListInstancesRequest) + com.google.cloud.run.v2.ListInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.ListInstancesRequest.class, + com.google.cloud.run.v2.ListInstancesRequest.Builder.class); + } + + // Construct using com.google.cloud.run.v2.ListInstancesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + showDeleted_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.ListInstancesRequest getDefaultInstanceForType() { + return com.google.cloud.run.v2.ListInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.ListInstancesRequest build() { + com.google.cloud.run.v2.ListInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.ListInstancesRequest buildPartial() { + com.google.cloud.run.v2.ListInstancesRequest result = + new com.google.cloud.run.v2.ListInstancesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.run.v2.ListInstancesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.showDeleted_ = showDeleted_; + } + } + + @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.run.v2.ListInstancesRequest) { + return mergeFrom((com.google.cloud.run.v2.ListInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.ListInstancesRequest other) { + if (other == com.google.cloud.run.v2.ListInstancesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getShowDeleted() != false) { + setShowDeleted(other.getShowDeleted()); + } + 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 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + showDeleted_ = input.readBool(); + 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 bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The location and project to list resources on.
+     * Format: projects/{project}/locations/{location}, where {project} can be
+     * project id or number.
+     * 
+ * + * + * 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 location and project to list resources on.
+     * Format: projects/{project}/locations/{location}, where {project} can be
+     * project id or number.
+     * 
+ * + * + * 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 location and project to list resources on.
+     * Format: projects/{project}/locations/{location}, where {project} can be
+     * project id or number.
+     * 
+ * + * + * 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 location and project to list resources on.
+     * Format: projects/{project}/locations/{location}, where {project} can be
+     * project id or number.
+     * 
+ * + * + * 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 location and project to list resources on.
+     * Format: projects/{project}/locations/{location}, where {project} can be
+     * project id or number.
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * Optional. Maximum number of Instances to return in this call.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Maximum number of Instances to return in this call.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Maximum number of Instances to return in this call.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token received from a previous call to ListInstances.
+     * All other parameters must match.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token received from a previous call to ListInstances.
+     * All other parameters must match.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token received from a previous call to ListInstances.
+     * All other parameters must match.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token received from a previous call to ListInstances.
+     * All other parameters must match.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token received from a previous call to ListInstances.
+     * All other parameters must match.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean showDeleted_; + + /** + * + * + *
+     * Optional. If true, returns deleted (but unexpired) resources along with
+     * active ones.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + + /** + * + * + *
+     * Optional. If true, returns deleted (but unexpired) resources along with
+     * active ones.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The showDeleted to set. + * @return This builder for chaining. + */ + public Builder setShowDeleted(boolean value) { + + showDeleted_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, returns deleted (but unexpired) resources along with
+     * active ones.
+     * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearShowDeleted() { + bitField0_ = (bitField0_ & ~0x00000008); + showDeleted_ = false; + 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.run.v2.ListInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.ListInstancesRequest) + private static final com.google.cloud.run.v2.ListInstancesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.ListInstancesRequest(); + } + + public static com.google.cloud.run.v2.ListInstancesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesRequest 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.run.v2.ListInstancesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesRequestOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesRequestOrBuilder.java new file mode 100644 index 000000000000..a4b0e94209d5 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesRequestOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface ListInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.ListInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The location and project to list resources on.
+   * Format: projects/{project}/locations/{location}, where {project} can be
+   * project id or number.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The location and project to list resources on.
+   * Format: projects/{project}/locations/{location}, where {project} can be
+   * project id or number.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Maximum number of Instances to return in this call.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token received from a previous call to ListInstances.
+   * All other parameters must match.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token received from a previous call to ListInstances.
+   * All other parameters must match.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. If true, returns deleted (but unexpired) resources along with
+   * active ones.
+   * 
+ * + * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showDeleted. + */ + boolean getShowDeleted(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesResponse.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesResponse.java new file mode 100644 index 000000000000..aabe5b0042dc --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesResponse.java @@ -0,0 +1,1152 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** + * + * + *
+ * Response message containing a list of Instances.
+ * 
+ * + * Protobuf type {@code google.cloud.run.v2.ListInstancesResponse} + */ +public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.ListInstancesResponse) + ListInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListInstancesResponse.newBuilder() to construct. + private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesResponse() { + instances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.ListInstancesResponse.class, + com.google.cloud.run.v2.ListInstancesResponse.Builder.class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List instances_; + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + @java.lang.Override + public java.util.List + getInstancesOrBuilderList() { + return instances_; + } + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.run.v2.Instance getInstances(int index) { + return instances_.get(index); + } + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.run.v2.InstanceOrBuilder getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token indicating there are more items than page_size. Use it in the next
+   * ListInstances request to continue.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token indicating there are more items than page_size. Use it in the next
+   * ListInstances request to continue.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(1, instances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.run.v2.ListInstancesResponse)) { + return super.equals(obj); + } + com.google.cloud.run.v2.ListInstancesResponse other = + (com.google.cloud.run.v2.ListInstancesResponse) obj; + + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.ListInstancesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ListInstancesResponse 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.run.v2.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ListInstancesResponse 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.run.v2.ListInstancesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.ListInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.ListInstancesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ListInstancesResponse 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.run.v2.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ListInstancesResponse 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.run.v2.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.ListInstancesResponse 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.run.v2.ListInstancesResponse 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; + } + + /** + * + * + *
+   * Response message containing a list of Instances.
+   * 
+ * + * Protobuf type {@code google.cloud.run.v2.ListInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.ListInstancesResponse) + com.google.cloud.run.v2.ListInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.ListInstancesResponse.class, + com.google.cloud.run.v2.ListInstancesResponse.Builder.class); + } + + // Construct using com.google.cloud.run.v2.ListInstancesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_ListInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.ListInstancesResponse getDefaultInstanceForType() { + return com.google.cloud.run.v2.ListInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.ListInstancesResponse build() { + com.google.cloud.run.v2.ListInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.ListInstancesResponse buildPartial() { + com.google.cloud.run.v2.ListInstancesResponse result = + new com.google.cloud.run.v2.ListInstancesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.run.v2.ListInstancesResponse result) { + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.run.v2.ListInstancesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.run.v2.ListInstancesResponse) { + return mergeFrom((com.google.cloud.run.v2.ListInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.ListInstancesResponse other) { + if (other == com.google.cloud.run.v2.ListInstancesResponse.getDefaultInstance()) return this; + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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: + { + com.google.cloud.run.v2.Instance m = + input.readMessage(com.google.cloud.run.v2.Instance.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Instance, + com.google.cloud.run.v2.Instance.Builder, + com.google.cloud.run.v2.InstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public com.google.cloud.run.v2.Instance getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder setInstances(int index, com.google.cloud.run.v2.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder setInstances( + int index, com.google.cloud.run.v2.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.run.v2.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder addInstances(int index, com.google.cloud.run.v2.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.run.v2.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder addInstances( + int index, com.google.cloud.run.v2.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder addAllInstances( + java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public com.google.cloud.run.v2.Instance.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public com.google.cloud.run.v2.InstanceOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public com.google.cloud.run.v2.Instance.Builder addInstancesBuilder() { + return getInstancesFieldBuilder() + .addBuilder(com.google.cloud.run.v2.Instance.getDefaultInstance()); + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public com.google.cloud.run.v2.Instance.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.cloud.run.v2.Instance.getDefaultInstance()); + } + + /** + * + * + *
+     * The resulting list of Instances.
+     * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + public java.util.List getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Instance, + com.google.cloud.run.v2.Instance.Builder, + com.google.cloud.run.v2.InstanceOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.run.v2.Instance, + com.google.cloud.run.v2.Instance.Builder, + com.google.cloud.run.v2.InstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token indicating there are more items than page_size. Use it in the next
+     * ListInstances request to continue.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token indicating there are more items than page_size. Use it in the next
+     * ListInstances request to continue.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token indicating there are more items than page_size. Use it in the next
+     * ListInstances request to continue.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token indicating there are more items than page_size. Use it in the next
+     * ListInstances request to continue.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token indicating there are more items than page_size. Use it in the next
+     * ListInstances request to continue.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = 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.run.v2.ListInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.ListInstancesResponse) + private static final com.google.cloud.run.v2.ListInstancesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.ListInstancesResponse(); + } + + public static com.google.cloud.run.v2.ListInstancesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesResponse 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.run.v2.ListInstancesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesResponseOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesResponseOrBuilder.java new file mode 100644 index 000000000000..a31ccac54bcf --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListInstancesResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface ListInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.ListInstancesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + java.util.List getInstancesList(); + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + com.google.cloud.run.v2.Instance getInstances(int index); + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + int getInstancesCount(); + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + java.util.List getInstancesOrBuilderList(); + + /** + * + * + *
+   * The resulting list of Instances.
+   * 
+ * + * repeated .google.cloud.run.v2.Instance instances = 1; + */ + com.google.cloud.run.v2.InstanceOrBuilder getInstancesOrBuilder(int index); + + /** + * + * + *
+   * A token indicating there are more items than page_size. Use it in the next
+   * ListInstances request to continue.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token indicating there are more items than page_size. Use it in the next
+   * ListInstances request to continue.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StartInstanceRequest.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StartInstanceRequest.java new file mode 100644 index 000000000000..b8ff9c339c68 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StartInstanceRequest.java @@ -0,0 +1,965 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** + * + * + *
+ * Request message for starting an Instance.
+ * 
+ * + * Protobuf type {@code google.cloud.run.v2.StartInstanceRequest} + */ +public final class StartInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.StartInstanceRequest) + StartInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use StartInstanceRequest.newBuilder() to construct. + private StartInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartInstanceRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StartInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StartInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.StartInstanceRequest.class, + com.google.cloud.run.v2.StartInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Instance to stop.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`,
+   * where `{project}` can be project id or number.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the Instance to stop.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`,
+   * where `{project}` can be project id or number.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. Indicates that the request should be validated without actually
+   * stopping any resources.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the resource.
+   * This may be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the resource.
+   * This may be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, etag_); + } + 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.run.v2.StartInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.run.v2.StartInstanceRequest other = + (com.google.cloud.run.v2.StartInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.StartInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.StartInstanceRequest 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.run.v2.StartInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.StartInstanceRequest 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.run.v2.StartInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.StartInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.StartInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.StartInstanceRequest 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.run.v2.StartInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.StartInstanceRequest 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.run.v2.StartInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.StartInstanceRequest 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.run.v2.StartInstanceRequest 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; + } + + /** + * + * + *
+   * Request message for starting an Instance.
+   * 
+ * + * Protobuf type {@code google.cloud.run.v2.StartInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.StartInstanceRequest) + com.google.cloud.run.v2.StartInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StartInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StartInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.StartInstanceRequest.class, + com.google.cloud.run.v2.StartInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.run.v2.StartInstanceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + validateOnly_ = false; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StartInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.StartInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.run.v2.StartInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.StartInstanceRequest build() { + com.google.cloud.run.v2.StartInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.StartInstanceRequest buildPartial() { + com.google.cloud.run.v2.StartInstanceRequest result = + new com.google.cloud.run.v2.StartInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.run.v2.StartInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + } + + @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.run.v2.StartInstanceRequest) { + return mergeFrom((com.google.cloud.run.v2.StartInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.StartInstanceRequest other) { + if (other == com.google.cloud.run.v2.StartInstanceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + 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 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + etag_ = 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * stopping any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * stopping any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * stopping any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = 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.run.v2.StartInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.StartInstanceRequest) + private static final com.google.cloud.run.v2.StartInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.StartInstanceRequest(); + } + + public static com.google.cloud.run.v2.StartInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartInstanceRequest 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.run.v2.StartInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StartInstanceRequestOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StartInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..10ffd88f5b07 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StartInstanceRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface StartInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.StartInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Instance to stop.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`,
+   * where `{project}` can be project id or number.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Instance to stop.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`,
+   * where `{project}` can be project id or number.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Indicates that the request should be validated without actually
+   * stopping any resources.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the resource.
+   * This may be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the resource.
+   * This may be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StopInstanceRequest.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StopInstanceRequest.java new file mode 100644 index 000000000000..1a939174e345 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StopInstanceRequest.java @@ -0,0 +1,965 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +/** + * + * + *
+ * Request message for deleting an Instance.
+ * 
+ * + * Protobuf type {@code google.cloud.run.v2.StopInstanceRequest} + */ +public final class StopInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.run.v2.StopInstanceRequest) + StopInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use StopInstanceRequest.newBuilder() to construct. + private StopInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopInstanceRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StopInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StopInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.StopInstanceRequest.class, + com.google.cloud.run.v2.StopInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Instance to stop.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`,
+   * where `{project}` can be project id or number.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the Instance to stop.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`,
+   * where `{project}` can be project id or number.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. Indicates that the request should be validated without actually
+   * stopping any resources.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the resource.
+   * This may be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the resource.
+   * This may be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, etag_); + } + 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.run.v2.StopInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.run.v2.StopInstanceRequest other = + (com.google.cloud.run.v2.StopInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.run.v2.StopInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.StopInstanceRequest 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.run.v2.StopInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.StopInstanceRequest 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.run.v2.StopInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.run.v2.StopInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.run.v2.StopInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.StopInstanceRequest 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.run.v2.StopInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.StopInstanceRequest 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.run.v2.StopInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.run.v2.StopInstanceRequest 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.run.v2.StopInstanceRequest 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; + } + + /** + * + * + *
+   * Request message for deleting an Instance.
+   * 
+ * + * Protobuf type {@code google.cloud.run.v2.StopInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.StopInstanceRequest) + com.google.cloud.run.v2.StopInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StopInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StopInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.run.v2.StopInstanceRequest.class, + com.google.cloud.run.v2.StopInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.run.v2.StopInstanceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + validateOnly_ = false; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.run.v2.InstanceOuterClass + .internal_static_google_cloud_run_v2_StopInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.run.v2.StopInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.run.v2.StopInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.run.v2.StopInstanceRequest build() { + com.google.cloud.run.v2.StopInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.run.v2.StopInstanceRequest buildPartial() { + com.google.cloud.run.v2.StopInstanceRequest result = + new com.google.cloud.run.v2.StopInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.run.v2.StopInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + } + + @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.run.v2.StopInstanceRequest) { + return mergeFrom((com.google.cloud.run.v2.StopInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.run.v2.StopInstanceRequest other) { + if (other == com.google.cloud.run.v2.StopInstanceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + 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 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + etag_ = 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Instance to stop.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`,
+     * where `{project}` can be project id or number.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * stopping any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * stopping any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates that the request should be validated without actually
+     * stopping any resources.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A system-generated fingerprint for this version of the resource.
+     * This may be used to detect modification conflict during updates.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = 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.run.v2.StopInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.run.v2.StopInstanceRequest) + private static final com.google.cloud.run.v2.StopInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.run.v2.StopInstanceRequest(); + } + + public static com.google.cloud.run.v2.StopInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopInstanceRequest 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.run.v2.StopInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StopInstanceRequestOrBuilder.java b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StopInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..5e2ed8373b79 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/StopInstanceRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 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/run/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.run.v2; + +public interface StopInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.StopInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Instance to stop.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`,
+   * where `{project}` can be project id or number.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Instance to stop.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`,
+   * where `{project}` can be project id or number.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Indicates that the request should be validated without actually
+   * stopping any resources.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the resource.
+   * This may be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. A system-generated fingerprint for this version of the resource.
+   * This may be used to detect modification conflict during updates.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/container_status.proto b/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/container_status.proto new file mode 100644 index 000000000000..6043fa698dcd --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/container_status.proto @@ -0,0 +1,35 @@ +// Copyright 2026 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.run.v2; + +option go_package = "cloud.google.com/go/run/apiv2/runpb;runpb"; +option java_multiple_files = true; +option java_outer_classname = "ContainerStatusProto"; +option java_package = "com.google.cloud.run.v2"; + +// ContainerStatus holds the information of container name and image digest +// value. +message ContainerStatus { + // The name of the container, if specified. + string name = 1; + + // ImageDigest holds the resolved digest for the image specified and resolved + // during the creation of Revision. This field holds the digest value + // regardless of whether a tag or digest was originally specified in the + // Container object. + string image_digest = 2; +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/instance.proto b/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/instance.proto new file mode 100644 index 000000000000..f8b88cd57e49 --- /dev/null +++ b/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/instance.proto @@ -0,0 +1,434 @@ +// Copyright 2026 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.run.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/launch_stage.proto"; +import "google/api/resource.proto"; +import "google/api/routing.proto"; +import "google/cloud/run/v2/condition.proto"; +import "google/cloud/run/v2/container_status.proto"; +import "google/cloud/run/v2/k8s.min.proto"; +import "google/cloud/run/v2/vendor_settings.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/run/apiv2/runpb;runpb"; +option java_multiple_files = true; +option java_package = "com.google.cloud.run.v2"; + +// The Cloud Run Instances API allows you to manage Cloud Run Instances. +service Instances { + option (google.api.default_host) = "run.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates an Instance. + rpc CreateInstance(CreateInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*}/instances" + body: "instance" + }; + option (google.api.routing) = { + routing_parameters { + field: "parent" + path_template: "projects/*/locations/{location=*}" + } + }; + option (google.api.method_signature) = "parent,instance"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "Instance" + }; + } + + // Deletes a Instance + rpc DeleteInstance(DeleteInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "projects/*/locations/{location=*}/**" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "Instance" + }; + } + + // Gets a Instance + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "projects/*/locations/{location=*}/**" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists Instances. Results are sorted by creation time, descending. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/instances" + }; + option (google.api.routing) = { + routing_parameters { + field: "parent" + path_template: "projects/*/locations/{location=*}" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Stops an Instance. + rpc StopInstance(StopInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/instances/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "Instance" + }; + } + + // Starts an Instance. + rpc StartInstance(StartInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/instances/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "Instance" + }; + } +} + +message CreateInstanceRequest { + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "run.googleapis.com/Instance" + } + ]; + + Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The unique identifier for the Instance. It must begin with + // letter, and cannot end with hyphen; must contain fewer than 50 characters. + // The name of the instance becomes {parent}/instances/{instance_id}. + string instance_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates that the request should be validated and default values + // populated, without persisting the request or creating any resources. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +message GetInstanceRequest { + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "run.googleapis.com/Instance" } + ]; +} + +message DeleteInstanceRequest { + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "run.googleapis.com/Instance" } + ]; + + // Optional. Indicates that the request should be validated without actually + // deleting any resources. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A system-generated fingerprint for this version of the + // resource. May be used to detect modification conflict during updates. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for retrieving a list of Instances. +message ListInstancesRequest { + // Required. The location and project to list resources on. + // Format: projects/{project}/locations/{location}, where {project} can be + // project id or number. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "run.googleapis.com/Instance" + } + ]; + + // Optional. Maximum number of Instances to return in this call. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token received from a previous call to ListInstances. + // All other parameters must match. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, returns deleted (but unexpired) resources along with + // active ones. + bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message containing a list of Instances. +message ListInstancesResponse { + // The resulting list of Instances. + repeated Instance instances = 1; + + // A token indicating there are more items than page_size. Use it in the next + // ListInstances request to continue. + string next_page_token = 2; +} + +// Request message for deleting an Instance. +message StopInstanceRequest { + // Required. The name of the Instance to stop. + // Format: + // `projects/{project}/locations/{location}/instances/{instance}`, + // where `{project}` can be project id or number. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "run.googleapis.com/Instance" } + ]; + + // Optional. Indicates that the request should be validated without actually + // stopping any resources. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A system-generated fingerprint for this version of the resource. + // This may be used to detect modification conflict during updates. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for starting an Instance. +message StartInstanceRequest { + // Required. The name of the Instance to stop. + // Format: + // `projects/{project}/locations/{location}/instances/{instance}`, + // where `{project}` can be project id or number. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "run.googleapis.com/Instance" } + ]; + + // Optional. Indicates that the request should be validated without actually + // stopping any resources. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A system-generated fingerprint for this version of the resource. + // This may be used to detect modification conflict during updates. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A Cloud Run Instance represents a single group of containers running in a +// region. +message Instance { + option (google.api.resource) = { + type: "run.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + plural: "instances" + singular: "instance" + }; + + // The fully qualified name of this Instance. In CreateInstanceRequest, this + // field is ignored, and instead composed from CreateInstanceRequest.parent + // and CreateInstanceRequest.instance_id. + // + // Format: + // projects/{project}/locations/{location}/instances/{instance_id} + string name = 1; + + // User-provided description of the Instance. This field currently has a + // 512-character limit. + string description = 3; + + // Output only. Server assigned unique identifier for the trigger. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. + string uid = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A number that monotonically increases every time the user + // modifies the desired state. + // Please note that unlike v1, this is an int64 value. As with most Google + // APIs, its JSON representation will be a `string` instead of an `integer`. + int64 generation = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + map labels = 6; + + map annotations = 7; + + // Output only. The creation time. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last-modified time. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The deletion time. + google.protobuf.Timestamp delete_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. For a deleted resource, the time after which it will be + // permamently deleted. + google.protobuf.Timestamp expire_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the authenticated creator. + string creator = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the last authenticated modifier. + string last_modifier = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Arbitrary identifier for the API client. + string client = 14; + + // Arbitrary version identifier for the API client. + string client_version = 15; + + // The launch stage as defined by [Google Cloud Platform + // Launch Stages](https://cloud.google.com/terms/launch-stages). + // Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + // is assumed. + // Set the launch stage to a preview stage on input to allow use of preview + // features in that stage. On read (or output), describes whether the + // resource uses preview features. + //

+ // For example, if ALPHA is provided as input, but only BETA and GA-level + // features are used, this field will be BETA on output. + google.api.LaunchStage launch_stage = 16; + + // Settings for the Binary Authorization feature. + BinaryAuthorization binary_authorization = 17; + + // Optional. VPC Access configuration to use for this Revision. For more + // information, visit + // https://cloud.google.com/run/docs/configuring/connecting-vpc. + VpcAccess vpc_access = 18 [(google.api.field_behavior) = OPTIONAL]; + + string service_account = 19; + + // Required. Holds the single container that defines the unit of execution for + // this Instance. + repeated Container containers = 20 [(google.api.field_behavior) = REQUIRED]; + + // A list of Volumes to make available to containers. + repeated Volume volumes = 21; + + // A reference to a customer managed encryption key (CMEK) to use to encrypt + // this container image. For more information, go to + // https://cloud.google.com/run/docs/securing/using-cmek + string encryption_key = 22 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; + + // The action to take if the encryption key is revoked. + EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + + // If encryption_key_revocation_action is SHUTDOWN, the duration before + // shutting down all instances. The minimum increment is 1 hour. + google.protobuf.Duration encryption_key_shutdown_duration = 25; + + // Optional. The node selector for the instance. + NodeSelector node_selector = 26 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. True if GPU zonal redundancy is disabled on this instance. + optional bool gpu_zonal_redundancy_disabled = 27 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Provides the ingress settings for this Instance. On output, + // returns the currently observed ingress settings, or + // INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + IngressTraffic ingress = 28 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Disables IAM permission check for run.routes.invoke for callers + // of this Instance. For more information, visit + // https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + bool invoker_iam_disabled = 29 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. IAP settings on the Instance. + bool iap_enabled = 30 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The generation of this Instance currently serving traffic. See + // comments in `reconciling` for additional information on reconciliation + // process in Cloud Run. Please note that unlike v1, this is an int64 value. + // As with most Google APIs, its JSON representation will be a `string` + // instead of an `integer`. + int64 observed_generation = 40 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Google Console URI to obtain logs for the Instance. + string log_uri = 41 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Condition of this Instance, containing its readiness + // status, and detailed error information in case it did not reach a serving + // state. See comments in `reconciling` for additional information on + // reconciliation process in Cloud Run. + Condition terminal_condition = 42 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Conditions of all other associated sub-resources. They + // contain additional diagnostics information in case the Instance does not + // reach its Serving state. See comments in `reconciling` for additional + // information on reconciliation process in Cloud Run. + repeated Condition conditions = 43 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status information for each of the specified containers. The + // status includes the resolved digest for specified images. + repeated ContainerStatus container_statuses = 44 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzs = 46 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. All URLs serving traffic for this Instance. + repeated string urls = 45 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Returns true if the Instance is currently being acted upon by + // the system to bring it into the desired state. + // + // When a new Instance is created, or an existing one is updated, Cloud Run + // will asynchronously perform all necessary steps to bring the Instance to + // the desired serving state. This process is called reconciliation. While + // reconciliation is in process, `observed_generation` will have a transient + // value that might mismatch the intended state. + // Once reconciliation is over (and this field is false), there are two + // possible outcomes: reconciliation succeeded and the serving state matches + // the Instance, or there was an error, and reconciliation failed. This state + // can be found in `terminal_condition.state`. + bool reconciling = 98 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A system-generated fingerprint for this version of the + // resource. May be used to detect modification conflict during updates. + string etag = 99 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/k8s.min.proto b/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/k8s.min.proto index 83b9af767870..0fe03f27aacb 100644 --- a/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/k8s.min.proto +++ b/java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/k8s.min.proto @@ -97,6 +97,9 @@ message Container { // fails. Probe startup_probe = 11; + // Readiness probe to be used for health checks. + Probe readiness_probe = 14; + // Names of the containers that must start before this container. repeated string depends_on = 12; diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateSetCredentialsProvider.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..19282db92c4d --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.InstancesSettings; +import com.google.cloud.run.v2.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + InstancesSettings instancesSettings = + InstancesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InstancesClient instancesClient = InstancesClient.create(instancesSettings); + } +} +// [END run_v2_generated_Instances_Create_SetCredentialsProvider_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateSetEndpoint.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..c8665bc4c2cb --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_Create_SetEndpoint_sync] +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.InstancesSettings; +import com.google.cloud.run.v2.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + InstancesSettings instancesSettings = + InstancesSettings.newBuilder().setEndpoint(myEndpoint).build(); + InstancesClient instancesClient = InstancesClient.create(instancesSettings); + } +} +// [END run_v2_generated_Instances_Create_SetEndpoint_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateUseHttpJsonTransport.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..30f6e96cbf26 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,39 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_Create_UseHttpJsonTransport_sync] +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.InstancesSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + InstancesSettings instancesSettings = InstancesSettings.newHttpJsonBuilder().build(); + InstancesClient instancesClient = InstancesClient.create(instancesSettings); + } +} +// [END run_v2_generated_Instances_Create_UseHttpJsonTransport_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/AsyncCreateInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/AsyncCreateInstance.java new file mode 100644 index 000000000000..5c2c7b9080c5 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/AsyncCreateInstance.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_CreateInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.run.v2.CreateInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateInstance { + + public static void main(String[] args) throws Exception { + asyncCreateInstance(); + } + + public static void asyncCreateInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInstance(Instance.newBuilder().build()) + .setInstanceId("instanceId902024336") + .setValidateOnly(true) + .build(); + ApiFuture future = instancesClient.createInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END run_v2_generated_Instances_CreateInstance_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/AsyncCreateInstanceLRO.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/AsyncCreateInstanceLRO.java new file mode 100644 index 000000000000..14936ed2878a --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/AsyncCreateInstanceLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_CreateInstance_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.run.v2.CreateInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.LocationName; + +public class AsyncCreateInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncCreateInstanceLRO(); + } + + public static void asyncCreateInstanceLRO() 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 (InstancesClient instancesClient = InstancesClient.create()) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInstance(Instance.newBuilder().build()) + .setInstanceId("instanceId902024336") + .setValidateOnly(true) + .build(); + OperationFuture future = + instancesClient.createInstanceOperationCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END run_v2_generated_Instances_CreateInstance_LRO_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstance.java new file mode 100644 index 000000000000..b4b168c2ba4e --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstance.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_CreateInstance_sync] +import com.google.cloud.run.v2.CreateInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.LocationName; + +public class SyncCreateInstance { + + public static void main(String[] args) throws Exception { + syncCreateInstance(); + } + + public static void syncCreateInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInstance(Instance.newBuilder().build()) + .setInstanceId("instanceId902024336") + .setValidateOnly(true) + .build(); + Instance response = instancesClient.createInstanceAsync(request).get(); + } + } +} +// [END run_v2_generated_Instances_CreateInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstanceLocationnameInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstanceLocationnameInstance.java new file mode 100644 index 000000000000..eaff16438d38 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstanceLocationnameInstance.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_CreateInstance_LocationnameInstance_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.LocationName; + +public class SyncCreateInstanceLocationnameInstance { + + public static void main(String[] args) throws Exception { + syncCreateInstanceLocationnameInstance(); + } + + public static void syncCreateInstanceLocationnameInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + Instance response = instancesClient.createInstanceAsync(parent, instance).get(); + } + } +} +// [END run_v2_generated_Instances_CreateInstance_LocationnameInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstanceStringInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstanceStringInstance.java new file mode 100644 index 000000000000..0301d38177c5 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/createinstance/SyncCreateInstanceStringInstance.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_CreateInstance_StringInstance_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.LocationName; + +public class SyncCreateInstanceStringInstance { + + public static void main(String[] args) throws Exception { + syncCreateInstanceStringInstance(); + } + + public static void syncCreateInstanceStringInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Instance instance = Instance.newBuilder().build(); + Instance response = instancesClient.createInstanceAsync(parent, instance).get(); + } + } +} +// [END run_v2_generated_Instances_CreateInstance_StringInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/AsyncDeleteInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/AsyncDeleteInstance.java new file mode 100644 index 000000000000..b2e48c143899 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/AsyncDeleteInstance.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_DeleteInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.run.v2.DeleteInstanceRequest; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteInstance { + + public static void main(String[] args) throws Exception { + asyncDeleteInstance(); + } + + public static void asyncDeleteInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + ApiFuture future = instancesClient.deleteInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END run_v2_generated_Instances_DeleteInstance_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/AsyncDeleteInstanceLRO.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/AsyncDeleteInstanceLRO.java new file mode 100644 index 000000000000..255ff7c56e1f --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/AsyncDeleteInstanceLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_DeleteInstance_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.run.v2.DeleteInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class AsyncDeleteInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteInstanceLRO(); + } + + public static void asyncDeleteInstanceLRO() 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 (InstancesClient instancesClient = InstancesClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + OperationFuture future = + instancesClient.deleteInstanceOperationCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END run_v2_generated_Instances_DeleteInstance_LRO_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstance.java new file mode 100644 index 000000000000..3e500556552a --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstance.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_DeleteInstance_sync] +import com.google.cloud.run.v2.DeleteInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncDeleteInstance { + + public static void main(String[] args) throws Exception { + syncDeleteInstance(); + } + + public static void syncDeleteInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + Instance response = instancesClient.deleteInstanceAsync(request).get(); + } + } +} +// [END run_v2_generated_Instances_DeleteInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstanceInstancename.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstanceInstancename.java new file mode 100644 index 000000000000..fad7cb7892db --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstanceInstancename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_DeleteInstance_Instancename_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncDeleteInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncDeleteInstanceInstancename(); + } + + public static void syncDeleteInstanceInstancename() 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 (InstancesClient instancesClient = InstancesClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + Instance response = instancesClient.deleteInstanceAsync(name).get(); + } + } +} +// [END run_v2_generated_Instances_DeleteInstance_Instancename_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstanceString.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstanceString.java new file mode 100644 index 000000000000..034d316b84da --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/deleteinstance/SyncDeleteInstanceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_DeleteInstance_String_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncDeleteInstanceString { + + public static void main(String[] args) throws Exception { + syncDeleteInstanceString(); + } + + public static void syncDeleteInstanceString() 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 (InstancesClient instancesClient = InstancesClient.create()) { + String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + Instance response = instancesClient.deleteInstanceAsync(name).get(); + } + } +} +// [END run_v2_generated_Instances_DeleteInstance_String_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/AsyncGetInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/AsyncGetInstance.java new file mode 100644 index 000000000000..656dd554b29d --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/AsyncGetInstance.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_GetInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.run.v2.GetInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class AsyncGetInstance { + + public static void main(String[] args) throws Exception { + asyncGetInstance(); + } + + public static void asyncGetInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ApiFuture future = instancesClient.getInstanceCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END run_v2_generated_Instances_GetInstance_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..405868c9d021 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstance.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_GetInstance_sync] +import com.google.cloud.run.v2.GetInstanceRequest; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + Instance response = instancesClient.getInstance(request); + } + } +} +// [END run_v2_generated_Instances_GetInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstanceInstancename.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstanceInstancename.java new file mode 100644 index 000000000000..6fda4886db00 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstanceInstancename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_GetInstance_Instancename_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncGetInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncGetInstanceInstancename(); + } + + public static void syncGetInstanceInstancename() 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 (InstancesClient instancesClient = InstancesClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + Instance response = instancesClient.getInstance(name); + } + } +} +// [END run_v2_generated_Instances_GetInstance_Instancename_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstanceString.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstanceString.java new file mode 100644 index 000000000000..a9f21c5e1fdf --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/getinstance/SyncGetInstanceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_GetInstance_String_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncGetInstanceString { + + public static void main(String[] args) throws Exception { + syncGetInstanceString(); + } + + public static void syncGetInstanceString() 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 (InstancesClient instancesClient = InstancesClient.create()) { + String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + Instance response = instancesClient.getInstance(name); + } + } +} +// [END run_v2_generated_Instances_GetInstance_String_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/AsyncListInstances.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/AsyncListInstances.java new file mode 100644 index 000000000000..fbd1bf49b857 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/AsyncListInstances.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_ListInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.ListInstancesRequest; +import com.google.cloud.run.v2.LocationName; + +public class AsyncListInstances { + + public static void main(String[] args) throws Exception { + asyncListInstances(); + } + + public static void asyncListInstances() 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 (InstancesClient instancesClient = InstancesClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + ApiFuture future = instancesClient.listInstancesPagedCallable().futureCall(request); + // Do something. + for (Instance element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END run_v2_generated_Instances_ListInstances_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/AsyncListInstancesPaged.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/AsyncListInstancesPaged.java new file mode 100644 index 000000000000..6d8d6efc099a --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/AsyncListInstancesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_ListInstances_Paged_async] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.ListInstancesRequest; +import com.google.cloud.run.v2.ListInstancesResponse; +import com.google.cloud.run.v2.LocationName; +import com.google.common.base.Strings; + +public class AsyncListInstancesPaged { + + public static void main(String[] args) throws Exception { + asyncListInstancesPaged(); + } + + public static void asyncListInstancesPaged() 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 (InstancesClient instancesClient = InstancesClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + while (true) { + ListInstancesResponse response = instancesClient.listInstancesCallable().call(request); + for (Instance element : response.getInstancesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END run_v2_generated_Instances_ListInstances_Paged_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstances.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstances.java new file mode 100644 index 000000000000..a01c642b69ea --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstances.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_ListInstances_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.ListInstancesRequest; +import com.google.cloud.run.v2.LocationName; + +public class SyncListInstances { + + public static void main(String[] args) throws Exception { + syncListInstances(); + } + + public static void syncListInstances() 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 (InstancesClient instancesClient = InstancesClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); + for (Instance element : instancesClient.listInstances(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END run_v2_generated_Instances_ListInstances_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstancesLocationname.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstancesLocationname.java new file mode 100644 index 000000000000..bad753e50684 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstancesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_ListInstances_Locationname_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.LocationName; + +public class SyncListInstancesLocationname { + + public static void main(String[] args) throws Exception { + syncListInstancesLocationname(); + } + + public static void syncListInstancesLocationname() 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 (InstancesClient instancesClient = InstancesClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Instance element : instancesClient.listInstances(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END run_v2_generated_Instances_ListInstances_Locationname_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstancesString.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstancesString.java new file mode 100644 index 000000000000..56935312e79d --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/listinstances/SyncListInstancesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_ListInstances_String_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.LocationName; + +public class SyncListInstancesString { + + public static void main(String[] args) throws Exception { + syncListInstancesString(); + } + + public static void syncListInstancesString() 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 (InstancesClient instancesClient = InstancesClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Instance element : instancesClient.listInstances(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END run_v2_generated_Instances_ListInstances_String_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/AsyncStartInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/AsyncStartInstance.java new file mode 100644 index 000000000000..f34197513d25 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/AsyncStartInstance.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StartInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.StartInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncStartInstance { + + public static void main(String[] args) throws Exception { + asyncStartInstance(); + } + + public static void asyncStartInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + ApiFuture future = instancesClient.startInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END run_v2_generated_Instances_StartInstance_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/AsyncStartInstanceLRO.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/AsyncStartInstanceLRO.java new file mode 100644 index 000000000000..a00c5ca2a566 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/AsyncStartInstanceLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StartInstance_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.StartInstanceRequest; + +public class AsyncStartInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncStartInstanceLRO(); + } + + public static void asyncStartInstanceLRO() 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 (InstancesClient instancesClient = InstancesClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + OperationFuture future = + instancesClient.startInstanceOperationCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END run_v2_generated_Instances_StartInstance_LRO_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstance.java new file mode 100644 index 000000000000..7c0a454720a4 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstance.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StartInstance_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.StartInstanceRequest; + +public class SyncStartInstance { + + public static void main(String[] args) throws Exception { + syncStartInstance(); + } + + public static void syncStartInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + Instance response = instancesClient.startInstanceAsync(request).get(); + } + } +} +// [END run_v2_generated_Instances_StartInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstanceInstancename.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstanceInstancename.java new file mode 100644 index 000000000000..89387e5e1afb --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstanceInstancename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StartInstance_Instancename_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncStartInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncStartInstanceInstancename(); + } + + public static void syncStartInstanceInstancename() 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 (InstancesClient instancesClient = InstancesClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + Instance response = instancesClient.startInstanceAsync(name).get(); + } + } +} +// [END run_v2_generated_Instances_StartInstance_Instancename_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstanceString.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstanceString.java new file mode 100644 index 000000000000..d74099e3e872 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/startinstance/SyncStartInstanceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StartInstance_String_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncStartInstanceString { + + public static void main(String[] args) throws Exception { + syncStartInstanceString(); + } + + public static void syncStartInstanceString() 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 (InstancesClient instancesClient = InstancesClient.create()) { + String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + Instance response = instancesClient.startInstanceAsync(name).get(); + } + } +} +// [END run_v2_generated_Instances_StartInstance_String_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/AsyncStopInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/AsyncStopInstance.java new file mode 100644 index 000000000000..6b2960e17566 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/AsyncStopInstance.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StopInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.StopInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncStopInstance { + + public static void main(String[] args) throws Exception { + asyncStopInstance(); + } + + public static void asyncStopInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + ApiFuture future = instancesClient.stopInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END run_v2_generated_Instances_StopInstance_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/AsyncStopInstanceLRO.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/AsyncStopInstanceLRO.java new file mode 100644 index 000000000000..a750c511ec79 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/AsyncStopInstanceLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StopInstance_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.StopInstanceRequest; + +public class AsyncStopInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncStopInstanceLRO(); + } + + public static void asyncStopInstanceLRO() 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 (InstancesClient instancesClient = InstancesClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + OperationFuture future = + instancesClient.stopInstanceOperationCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END run_v2_generated_Instances_StopInstance_LRO_async] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstance.java new file mode 100644 index 000000000000..9000cf5e7c09 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstance.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StopInstance_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; +import com.google.cloud.run.v2.StopInstanceRequest; + +public class SyncStopInstance { + + public static void main(String[] args) throws Exception { + syncStopInstance(); + } + + public static void syncStopInstance() 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 (InstancesClient instancesClient = InstancesClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + Instance response = instancesClient.stopInstanceAsync(request).get(); + } + } +} +// [END run_v2_generated_Instances_StopInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstanceInstancename.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstanceInstancename.java new file mode 100644 index 000000000000..ad0074cbd448 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstanceInstancename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StopInstance_Instancename_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncStopInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncStopInstanceInstancename(); + } + + public static void syncStopInstanceInstancename() 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 (InstancesClient instancesClient = InstancesClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + Instance response = instancesClient.stopInstanceAsync(name).get(); + } + } +} +// [END run_v2_generated_Instances_StopInstance_Instancename_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstanceString.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstanceString.java new file mode 100644 index 000000000000..a863c8b7357a --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instances/stopinstance/SyncStopInstanceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_Instances_StopInstance_String_sync] +import com.google.cloud.run.v2.Instance; +import com.google.cloud.run.v2.InstanceName; +import com.google.cloud.run.v2.InstancesClient; + +public class SyncStopInstanceString { + + public static void main(String[] args) throws Exception { + syncStopInstanceString(); + } + + public static void syncStopInstanceString() 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 (InstancesClient instancesClient = InstancesClient.create()) { + String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + Instance response = instancesClient.stopInstanceAsync(name).get(); + } + } +} +// [END run_v2_generated_Instances_StopInstance_String_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instancessettings/createinstance/SyncCreateInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instancessettings/createinstance/SyncCreateInstance.java new file mode 100644 index 000000000000..42767dd3af34 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instancessettings/createinstance/SyncCreateInstance.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_InstancesSettings_CreateInstance_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.run.v2.InstancesSettings; +import java.time.Duration; + +public class SyncCreateInstance { + + public static void main(String[] args) throws Exception { + syncCreateInstance(); + } + + public static void syncCreateInstance() 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 + InstancesSettings.Builder instancesSettingsBuilder = InstancesSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + instancesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END run_v2_generated_InstancesSettings_CreateInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/instancessettings/getinstance/SyncGetInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instancessettings/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..4ec58002cb35 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/instancessettings/getinstance/SyncGetInstance.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.run.v2.samples; + +// [START run_v2_generated_InstancesSettings_GetInstance_sync] +import com.google.cloud.run.v2.InstancesSettings; +import java.time.Duration; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() 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 + InstancesSettings.Builder instancesSettingsBuilder = InstancesSettings.newBuilder(); + instancesSettingsBuilder + .getInstanceSettings() + .setRetrySettings( + instancesSettingsBuilder + .getInstanceSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + InstancesSettings instancesSettings = instancesSettingsBuilder.build(); + } +} +// [END run_v2_generated_InstancesSettings_GetInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/instancesstubsettings/createinstance/SyncCreateInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/instancesstubsettings/createinstance/SyncCreateInstance.java new file mode 100644 index 000000000000..6647dcc29913 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/instancesstubsettings/createinstance/SyncCreateInstance.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.run.v2.stub.samples; + +// [START run_v2_generated_InstancesStubSettings_CreateInstance_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.run.v2.stub.InstancesStubSettings; +import java.time.Duration; + +public class SyncCreateInstance { + + public static void main(String[] args) throws Exception { + syncCreateInstance(); + } + + public static void syncCreateInstance() 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 + InstancesStubSettings.Builder instancesSettingsBuilder = InstancesStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + instancesSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END run_v2_generated_InstancesStubSettings_CreateInstance_sync] diff --git a/java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/instancesstubsettings/getinstance/SyncGetInstance.java b/java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/instancesstubsettings/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..3d47bd1d45c6 --- /dev/null +++ b/java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/instancesstubsettings/getinstance/SyncGetInstance.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.run.v2.stub.samples; + +// [START run_v2_generated_InstancesStubSettings_GetInstance_sync] +import com.google.cloud.run.v2.stub.InstancesStubSettings; +import java.time.Duration; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() 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 + InstancesStubSettings.Builder instancesSettingsBuilder = InstancesStubSettings.newBuilder(); + instancesSettingsBuilder + .getInstanceSettings() + .setRetrySettings( + instancesSettingsBuilder + .getInstanceSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + InstancesStubSettings instancesSettings = instancesSettingsBuilder.build(); + } +} +// [END run_v2_generated_InstancesStubSettings_GetInstance_sync]