diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java index eafb11a58..d17b42c95 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java @@ -672,7 +672,9 @@ public final UnaryCallable deleteAgentCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Exports the specified agent to a binary file. This method is a [long-running + * Exports the specified agent to a binary file. + * + *

This method is a [long-running * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The * returned `Operation` type has the following method-specific fields: * @@ -706,7 +708,9 @@ public final OperationFuture exportAgentAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Exports the specified agent to a binary file. This method is a [long-running + * Exports the specified agent to a binary file. + * + *

This method is a [long-running * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The * returned `Operation` type has the following method-specific fields: * @@ -740,7 +744,9 @@ public final OperationFuture exportAgentAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Exports the specified agent to a binary file. This method is a [long-running + * Exports the specified agent to a binary file. + * + *

This method is a [long-running * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The * returned `Operation` type has the following method-specific fields: * @@ -777,6 +783,15 @@ public final UnaryCallable exportAgentCallable() *

Replaces the current agent with a new one. Note that all existing resources in agent (e.g. * intents, entity types, flows) will be removed. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -806,6 +821,15 @@ public final OperationFuture restoreAgentAsync(RestoreAgentReques *

Replaces the current agent with a new one. Note that all existing resources in agent (e.g. * intents, entity types, flows) will be removed. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -836,6 +860,15 @@ public final OperationFuture restoreAgentAsync(RestoreAgentReques *

Replaces the current agent with a new one. Note that all existing resources in agent (e.g. * intents, entity types, flows) will be removed. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClient.java new file mode 100644 index 000000000..4e8607172 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClient.java @@ -0,0 +1,520 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +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.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.v3beta1.stub.DeploymentsStub; +import com.google.cloud.dialogflow.cx.v3beta1.stub.DeploymentsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +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 + * [Deployments][google.cloud.dialogflow.cx.v3beta1.Deployment]. + * + *

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
+ * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+ *   DeploymentName name =
+ *       DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
+ *   Deployment response = deploymentsClient.getDeployment(name);
+ * }
+ * }
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

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 DeploymentsSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * DeploymentsSettings deploymentsSettings =
+ *     DeploymentsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DeploymentsClient deploymentsClient = DeploymentsClient.create(deploymentsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * DeploymentsSettings deploymentsSettings =
+ *     DeploymentsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DeploymentsClient deploymentsClient = DeploymentsClient.create(deploymentsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DeploymentsClient implements BackgroundResource { + private final DeploymentsSettings settings; + private final DeploymentsStub stub; + + /** Constructs an instance of DeploymentsClient with default settings. */ + public static final DeploymentsClient create() throws IOException { + return create(DeploymentsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DeploymentsClient, 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 DeploymentsClient create(DeploymentsSettings settings) throws IOException { + return new DeploymentsClient(settings); + } + + /** + * Constructs an instance of DeploymentsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(DeploymentsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DeploymentsClient create(DeploymentsStub stub) { + return new DeploymentsClient(stub); + } + + /** + * Constructs an instance of DeploymentsClient, 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 DeploymentsClient(DeploymentsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DeploymentsStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DeploymentsClient(DeploymentsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final DeploymentsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DeploymentsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all deployments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   EnvironmentName parent =
+   *       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
+   *   for (Deployment element : deploymentsClient.listDeployments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to + * list all environments for. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/environments/<Environment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeploymentsPagedResponse listDeployments(EnvironmentName parent) { + ListDeploymentsRequest request = + ListDeploymentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeployments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all deployments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   String parent =
+   *       DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]")
+   *           .toString();
+   *   for (Deployment element : deploymentsClient.listDeployments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to + * list all environments for. Format: `projects/<Project ID>/locations/<Location + * ID>/agents/<Agent ID>/environments/<Environment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeploymentsPagedResponse listDeployments(String parent) { + ListDeploymentsRequest request = ListDeploymentsRequest.newBuilder().setParent(parent).build(); + return listDeployments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all deployments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   ListDeploymentsRequest request =
+   *       ListDeploymentsRequest.newBuilder()
+   *           .setParent(
+   *               DeploymentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Deployment element : deploymentsClient.listDeployments(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 ListDeploymentsPagedResponse listDeployments(ListDeploymentsRequest request) { + return listDeploymentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all deployments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   ListDeploymentsRequest request =
+   *       ListDeploymentsRequest.newBuilder()
+   *           .setParent(
+   *               DeploymentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentsClient.listDeploymentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Deployment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDeploymentsPagedCallable() { + return stub.listDeploymentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all deployments in the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   ListDeploymentsRequest request =
+   *       ListDeploymentsRequest.newBuilder()
+   *           .setParent(
+   *               DeploymentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListDeploymentsResponse response =
+   *         deploymentsClient.listDeploymentsCallable().call(request);
+   *     for (Deployment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDeploymentsCallable() { + return stub.listDeploymentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   DeploymentName name =
+   *       DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
+   *   Deployment response = deploymentsClient.getDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/deployments/<Deployment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Deployment getDeployment(DeploymentName name) { + GetDeploymentRequest request = + GetDeploymentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   String name =
+   *       DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]")
+   *           .toString();
+   *   Deployment response = deploymentsClient.getDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment + * ID>/deployments/<Deployment ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Deployment getDeployment(String name) { + GetDeploymentRequest request = GetDeploymentRequest.newBuilder().setName(name).build(); + return getDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   GetDeploymentRequest request =
+   *       GetDeploymentRequest.newBuilder()
+   *           .setName(
+   *               DeploymentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .build();
+   *   Deployment response = deploymentsClient.getDeployment(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 Deployment getDeployment(GetDeploymentRequest request) { + return getDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + * + *

Sample code: + * + *

{@code
+   * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+   *   GetDeploymentRequest request =
+   *       GetDeploymentRequest.newBuilder()
+   *           .setName(
+   *               DeploymentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = deploymentsClient.getDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   Deployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDeploymentCallable() { + return stub.getDeploymentCallable(); + } + + @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 ListDeploymentsPagedResponse + extends AbstractPagedListResponse< + ListDeploymentsRequest, + ListDeploymentsResponse, + Deployment, + ListDeploymentsPage, + ListDeploymentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDeploymentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDeploymentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDeploymentsPagedResponse(ListDeploymentsPage page) { + super(page, ListDeploymentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDeploymentsPage + extends AbstractPage< + ListDeploymentsRequest, ListDeploymentsResponse, Deployment, ListDeploymentsPage> { + + private ListDeploymentsPage( + PageContext context, + ListDeploymentsResponse response) { + super(context, response); + } + + private static ListDeploymentsPage createEmptyPage() { + return new ListDeploymentsPage(null, null); + } + + @Override + protected ListDeploymentsPage createPage( + PageContext context, + ListDeploymentsResponse response) { + return new ListDeploymentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDeploymentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDeploymentsRequest, + ListDeploymentsResponse, + Deployment, + ListDeploymentsPage, + ListDeploymentsFixedSizeCollection> { + + private ListDeploymentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDeploymentsFixedSizeCollection createEmptyCollection() { + return new ListDeploymentsFixedSizeCollection(null, 0); + } + + @Override + protected ListDeploymentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDeploymentsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsSettings.java new file mode 100644 index 000000000..ab262b81d --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsSettings.java @@ -0,0 +1,197 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.DeploymentsClient.ListDeploymentsPagedResponse; + +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.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.v3beta1.stub.DeploymentsStubSettings; +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 DeploymentsClient}. + * + *

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 total timeout of getDeployment to 30 seconds: + * + *

{@code
+ * DeploymentsSettings.Builder deploymentsSettingsBuilder = DeploymentsSettings.newBuilder();
+ * deploymentsSettingsBuilder
+ *     .getDeploymentSettings()
+ *     .setRetrySettings(
+ *         deploymentsSettingsBuilder
+ *             .getDeploymentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DeploymentsSettings deploymentsSettings = deploymentsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DeploymentsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listDeployments. */ + public PagedCallSettings< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings() { + return ((DeploymentsStubSettings) getStubSettings()).listDeploymentsSettings(); + } + + /** Returns the object with the settings used for calls to getDeployment. */ + public UnaryCallSettings getDeploymentSettings() { + return ((DeploymentsStubSettings) getStubSettings()).getDeploymentSettings(); + } + + public static final DeploymentsSettings create(DeploymentsStubSettings stub) throws IOException { + return new DeploymentsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DeploymentsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DeploymentsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DeploymentsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DeploymentsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DeploymentsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DeploymentsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DeploymentsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 DeploymentsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DeploymentsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DeploymentsStubSettings.newBuilder(clientContext)); + } + + protected Builder(DeploymentsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DeploymentsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DeploymentsStubSettings.newBuilder()); + } + + public DeploymentsStubSettings.Builder getStubSettingsBuilder() { + return ((DeploymentsStubSettings.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 listDeployments. */ + public PagedCallSettings.Builder< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings() { + return getStubSettingsBuilder().listDeploymentsSettings(); + } + + /** Returns the builder for the settings used for calls to getDeployment. */ + public UnaryCallSettings.Builder getDeploymentSettings() { + return getStubSettingsBuilder().getDeploymentSettings(); + } + + @Override + public DeploymentsSettings build() throws IOException { + return new DeploymentsSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java index 1763ab315..c838f770c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java @@ -428,6 +428,14 @@ public final UnaryCallable getEnvironmentCal * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -459,6 +467,14 @@ public final OperationFuture createEnvironmentAsync(
    * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified
    * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -488,6 +504,14 @@ public final OperationFuture createEnvironmentAsync(
    * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified
    * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -516,6 +540,14 @@ public final OperationFuture createEnvironmentAsync(
    * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified
    * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -544,6 +576,14 @@ public final OperationFuture createEnvironmentAsync(
    * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified
    * [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -570,6 +610,14 @@ public final UnaryCallable createEnvironmen
   /**
    * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -599,6 +647,14 @@ public final OperationFuture updateEnvironmentAsync(
   /**
    * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -624,6 +680,14 @@ public final OperationFuture updateEnvironmentAsync(
   /**
    * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -649,6 +713,14 @@ public final OperationFuture updateEnvironmentAsync(
   /**
    * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + * *

Sample code: * *

{@code
@@ -936,6 +1008,15 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory(
    * Kicks off a continuous test under the specified
    * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
    *
+   * 

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

- `metadata`: + * [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata] - + * `response`: + * [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse] + * *

Sample code: * *

{@code
@@ -963,6 +1044,15 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory(
    * Kicks off a continuous test under the specified
    * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
    *
+   * 

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

- `metadata`: + * [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata] - + * `response`: + * [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse] + * *

Sample code: * *

{@code
@@ -991,6 +1081,15 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory(
    * Kicks off a continuous test under the specified
    * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
    *
+   * 

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

- `metadata`: + * [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata] - + * `response`: + * [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse] + * *

Sample code: * *

{@code
@@ -1187,6 +1286,112 @@ public final ListContinuousTestResultsPagedResponse listContinuousTestResults(
     return stub.listContinuousTestResultsCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD.
+  /**
+   * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+   *
+   * 

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

- `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata] - + * `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse] + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeployFlowRequest request =
+   *       DeployFlowRequest.newBuilder()
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setFlowVersion(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   DeployFlowResponse response = environmentsClient.deployFlowAsync(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 deployFlowAsync( + DeployFlowRequest request) { + return deployFlowOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

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

- `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata] - + * `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse] + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeployFlowRequest request =
+   *       DeployFlowRequest.newBuilder()
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setFlowVersion(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.deployFlowOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DeployFlowResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deployFlowOperationCallable() { + return stub.deployFlowOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + *

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

- `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata] - + * `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse] + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeployFlowRequest request =
+   *       DeployFlowRequest.newBuilder()
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
+   *                   .toString())
+   *           .setFlowVersion(
+   *               VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = environmentsClient.deployFlowCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deployFlowCallable() { + return stub.deployFlowCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java index 9e9019e70..649842fc2 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java @@ -144,6 +144,17 @@ public UnaryCallSettings runContinuousTestS return ((EnvironmentsStubSettings) getStubSettings()).listContinuousTestResultsSettings(); } + /** Returns the object with the settings used for calls to deployFlow. */ + public UnaryCallSettings deployFlowSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).deployFlowSettings(); + } + + /** Returns the object with the settings used for calls to deployFlow. */ + public OperationCallSettings + deployFlowOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).deployFlowOperationSettings(); + } + public static final EnvironmentsSettings create(EnvironmentsStubSettings stub) throws IOException { return new EnvironmentsSettings.Builder(stub.toBuilder()).build(); @@ -313,6 +324,17 @@ public UnaryCallSettings.Builder deleteEnvironm return getStubSettingsBuilder().listContinuousTestResultsSettings(); } + /** Returns the builder for the settings used for calls to deployFlow. */ + public UnaryCallSettings.Builder deployFlowSettings() { + return getStubSettingsBuilder().deployFlowSettings(); + } + + /** Returns the builder for the settings used for calls to deployFlow. */ + public OperationCallSettings.Builder + deployFlowOperationSettings() { + return getStubSettingsBuilder().deployFlowOperationSettings(); + } + @Override public EnvironmentsSettings build() throws IOException { return new EnvironmentsSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java index 2fc52fe6c..a08f74d3b 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java @@ -686,6 +686,15 @@ public final UnaryCallable updateFlowCallable() { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -712,6 +721,15 @@ public final OperationFuture trainFlowAsync(FlowName name) { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -737,6 +755,15 @@ public final OperationFuture trainFlowAsync(String name) { /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -763,6 +790,15 @@ public final OperationFuture trainFlowAsync(TrainFlowRequest requ /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -789,6 +825,15 @@ public final OperationCallable trainFlowOperati /** * Trains the specified flow. Note that only the flow in 'draft' environment is trained. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -974,6 +1019,14 @@ public final FlowValidationResult getFlowValidationResult( /** * Imports the specified flow to the specified agent from a binary file. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -1001,6 +1054,14 @@ public final OperationFuture importFlowAsync( /** * Imports the specified flow to the specified agent from a binary file. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -1028,6 +1089,14 @@ public final OperationFuture importFlowAsync( /** * Imports the specified flow to the specified agent from a binary file. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] + * *

Note: You should always train a flow prior to sending it queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -1053,6 +1122,14 @@ public final UnaryCallable importFlowCallable() { /** * Exports the specified flow to a binary file. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] + * *

Note that resources (e.g. intents, entities, webhooks) that the flow references will also be * exported. * @@ -1082,6 +1159,14 @@ public final OperationFuture exportFlowAsync( /** * Exports the specified flow to a binary file. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] + * *

Note that resources (e.g. intents, entities, webhooks) that the flow references will also be * exported. * @@ -1111,6 +1196,14 @@ public final OperationFuture exportFlowAsync( /** * Exports the specified flow to a binary file. * + *

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] + * *

Note that resources (e.g. intents, entities, webhooks) that the flow references will also be * exported. * diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java index 67ca7b2d7..88846738b 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java @@ -677,7 +677,9 @@ public final UnaryCallable updateTestCaseCallab // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Kicks off a test case run. This method is a [long-running + * Kicks off a test case run. + * + *

This method is a [long-running * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The * returned `Operation` type has the following method-specific fields: * @@ -710,7 +712,9 @@ public final OperationFuture runTestCa // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Kicks off a test case run. This method is a [long-running + * Kicks off a test case run. + * + *

This method is a [long-running * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The * returned `Operation` type has the following method-specific fields: * @@ -743,7 +747,9 @@ public final OperationFuture runTestCa // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Kicks off a test case run. This method is a [long-running + * Kicks off a test case run. + * + *

This method is a [long-running * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The * returned `Operation` type has the following method-specific fields: * @@ -776,6 +782,15 @@ public final UnaryCallable runTestCaseCallable() /** * Kicks off a batch run of test cases. * + *

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

- `metadata`: + * [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata] - + * `response`: + * [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse] + * *

Sample code: * *

{@code
@@ -805,6 +820,15 @@ public final UnaryCallable runTestCaseCallable()
   /**
    * Kicks off a batch run of test cases.
    *
+   * 

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

- `metadata`: + * [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata] - + * `response`: + * [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse] + * *

Sample code: * *

{@code
@@ -835,6 +859,15 @@ public final UnaryCallable runTestCaseCallable()
   /**
    * Kicks off a batch run of test cases.
    *
+   * 

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

- `metadata`: + * [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata] - + * `response`: + * [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse] + * *

Sample code: * *

{@code
@@ -911,6 +944,15 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques
    * cases and won't overwite any existing ones. The provided ID in the imported test case is
    * neglected.
    *
+   * 

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

- `metadata`: + * [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata] - + * `response`: + * [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -938,6 +980,15 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques
    * cases and won't overwite any existing ones. The provided ID in the imported test case is
    * neglected.
    *
+   * 

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

- `metadata`: + * [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata] - + * `response`: + * [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -966,6 +1017,15 @@ public final CalculateCoverageResponse calculateCoverage(CalculateCoverageReques
    * cases and won't overwite any existing ones. The provided ID in the imported test case is
    * neglected.
    *
+   * 

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

- `metadata`: + * [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata] - + * `response`: + * [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -990,6 +1050,15 @@ public final UnaryCallable importTestCasesCal
    * Exports the test cases under the agent to a Cloud Storage bucket or a local file. Filter can be
    * applied to export a subset of test cases.
    *
+   * 

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

- `metadata`: + * [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata] - + * `response`: + * [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -1017,6 +1086,15 @@ public final UnaryCallable importTestCasesCal
    * Exports the test cases under the agent to a Cloud Storage bucket or a local file. Filter can be
    * applied to export a subset of test cases.
    *
+   * 

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

- `metadata`: + * [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata] - + * `response`: + * [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -1045,6 +1123,15 @@ public final UnaryCallable importTestCasesCal
    * Exports the test cases under the agent to a Cloud Storage bucket or a local file. Filter can be
    * applied to export a subset of test cases.
    *
+   * 

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

- `metadata`: + * [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata] - + * `response`: + * [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse] + * *

Sample code: * *

{@code
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java
index 6de0cdcd7..586b6b29f 100644
--- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java
@@ -419,6 +419,14 @@ public final UnaryCallable getVersionCallable() {
    * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
    *
+   * 

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

- `metadata`: + * [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version] + * *

Sample code: * *

{@code
@@ -450,6 +458,14 @@ public final OperationFuture createVers
    * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
    *
+   * 

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

- `metadata`: + * [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version] + * *

Sample code: * *

{@code
@@ -479,6 +495,14 @@ public final OperationFuture createVers
    * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
    *
+   * 

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

- `metadata`: + * [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version] + * *

Sample code: * *

{@code
@@ -507,6 +531,14 @@ public final OperationFuture createVers
    * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
    *
+   * 

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

- `metadata`: + * [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version] + * *

Sample code: * *

{@code
@@ -535,6 +567,14 @@ public final OperationFuture createVers
    * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
    *
+   * 

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

- `metadata`: + * [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version] + * *

Sample code: * *

{@code
@@ -730,6 +770,15 @@ public final UnaryCallable deleteVersionCallable()
   /**
    * Loads resources in the specified version to the draft flow.
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Sample code: * *

{@code
@@ -755,6 +804,15 @@ public final OperationFuture loadVersionAsync(VersionName name) {
   /**
    * Loads resources in the specified version to the draft flow.
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Sample code: * *

{@code
@@ -779,6 +837,15 @@ public final OperationFuture loadVersionAsync(String name) {
   /**
    * Loads resources in the specified version to the draft flow.
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Sample code: * *

{@code
@@ -805,6 +872,15 @@ public final OperationFuture loadVersionAsync(LoadVersionRequest
   /**
    * Loads resources in the specified version to the draft flow.
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Sample code: * *

{@code
@@ -831,6 +907,15 @@ public final OperationCallable loadVersionOpe
   /**
    * Loads resources in the specified version to the draft flow.
    *
+   * 

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

- `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + * *

Sample code: * *

{@code
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json
index ced8bd626..106c29b07 100644
--- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json
@@ -41,6 +41,21 @@
         }
       }
     },
+    "Deployments": {
+      "clients": {
+        "grpc": {
+          "libraryClient": "DeploymentsClient",
+          "rpcs": {
+            "GetDeployment": {
+              "methods": ["getDeployment", "getDeployment", "getDeployment", "getDeploymentCallable"]
+            },
+            "ListDeployments": {
+              "methods": ["listDeployments", "listDeployments", "listDeployments", "listDeploymentsPagedCallable", "listDeploymentsCallable"]
+            }
+          }
+        }
+      }
+    },
     "EntityTypes": {
       "clients": {
         "grpc": {
@@ -76,6 +91,9 @@
             "DeleteEnvironment": {
               "methods": ["deleteEnvironment", "deleteEnvironment", "deleteEnvironment", "deleteEnvironmentCallable"]
             },
+            "DeployFlow": {
+              "methods": ["deployFlowAsync", "deployFlowOperationCallable", "deployFlowCallable"]
+            },
             "GetEnvironment": {
               "methods": ["getEnvironment", "getEnvironment", "getEnvironment", "getEnvironmentCallable"]
             },
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java
index bf6e5890c..f891eb9b9 100644
--- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java
@@ -32,6 +32,21 @@
  * }
  * }
* + *

======================= DeploymentsClient ======================= + * + *

Service Description: Service for managing + * [Deployments][google.cloud.dialogflow.cx.v3beta1.Deployment]. + * + *

Sample for DeploymentsClient: + * + *

{@code
+ * try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
+ *   DeploymentName name =
+ *       DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
+ *   Deployment response = deploymentsClient.getDeployment(name);
+ * }
+ * }
+ * *

======================= EntityTypesClient ======================= * *

Service Description: Service for managing diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/DeploymentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/DeploymentsStub.java new file mode 100644 index 000000000..6b6604d14 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/DeploymentsStub.java @@ -0,0 +1,55 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.DeploymentsClient.ListDeploymentsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.Deployment; +import com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Deployments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class DeploymentsStub implements BackgroundResource { + + public UnaryCallable + listDeploymentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDeploymentsPagedCallable()"); + } + + public UnaryCallable listDeploymentsCallable() { + throw new UnsupportedOperationException("Not implemented: listDeploymentsCallable()"); + } + + public UnaryCallable getDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: getDeploymentCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/DeploymentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/DeploymentsStubSettings.java new file mode 100644 index 000000000..ed26fe9ac --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/DeploymentsStubSettings.java @@ -0,0 +1,375 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.DeploymentsClient.ListDeploymentsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +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.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.v3beta1.Deployment; +import com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse; +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 java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DeploymentsStub}. + * + *

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 total timeout of getDeployment to 30 seconds: + * + *

{@code
+ * DeploymentsStubSettings.Builder deploymentsSettingsBuilder =
+ *     DeploymentsStubSettings.newBuilder();
+ * deploymentsSettingsBuilder
+ *     .getDeploymentSettings()
+ *     .setRetrySettings(
+ *         deploymentsSettingsBuilder
+ *             .getDeploymentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DeploymentsStubSettings deploymentsSettings = deploymentsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DeploymentsStubSettings 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 PagedCallSettings< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings; + private final UnaryCallSettings getDeploymentSettings; + + private static final PagedListDescriptor< + ListDeploymentsRequest, ListDeploymentsResponse, Deployment> + LIST_DEPLOYMENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDeploymentsRequest injectToken( + ListDeploymentsRequest payload, String token) { + return ListDeploymentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDeploymentsRequest injectPageSize( + ListDeploymentsRequest payload, int pageSize) { + return ListDeploymentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDeploymentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDeploymentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDeploymentsResponse payload) { + return payload.getDeploymentsList() == null + ? ImmutableList.of() + : payload.getDeploymentsList(); + } + }; + + private static final PagedListResponseFactory< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + LIST_DEPLOYMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDeploymentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DEPLOYMENTS_PAGE_STR_DESC, request, context); + return ListDeploymentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listDeployments. */ + public PagedCallSettings< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings() { + return listDeploymentsSettings; + } + + /** Returns the object with the settings used for calls to getDeployment. */ + public UnaryCallSettings getDeploymentSettings() { + return getDeploymentSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DeploymentsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDeploymentsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + 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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DeploymentsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 DeploymentsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listDeploymentsSettings = settingsBuilder.listDeploymentsSettings().build(); + getDeploymentSettings = settingsBuilder.getDeploymentSettings().build(); + } + + /** Builder for DeploymentsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings; + private final UnaryCallSettings.Builder getDeploymentSettings; + 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() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(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); + + listDeploymentsSettings = PagedCallSettings.newBuilder(LIST_DEPLOYMENTS_PAGE_STR_FACT); + getDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDeploymentsSettings, getDeploymentSettings); + initDefaults(this); + } + + protected Builder(DeploymentsStubSettings settings) { + super(settings); + + listDeploymentsSettings = settings.listDeploymentsSettings.toBuilder(); + getDeploymentSettings = settings.getDeploymentSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDeploymentsSettings, getDeploymentSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listDeploymentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDeploymentSettings() + .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 listDeployments. */ + public PagedCallSettings.Builder< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings() { + return listDeploymentsSettings; + } + + /** Returns the builder for the settings used for calls to getDeployment. */ + public UnaryCallSettings.Builder getDeploymentSettings() { + return getDeploymentSettings; + } + + @Override + public DeploymentsStubSettings build() throws IOException { + return new DeploymentsStubSettings(this); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java index 84fa58c37..9aac7ea7d 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java @@ -26,6 +26,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse; import com.google.cloud.dialogflow.cx.v3beta1.Environment; import com.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest; @@ -129,6 +132,15 @@ public UnaryCallable runContinuousTestCalla throw new UnsupportedOperationException("Not implemented: listContinuousTestResultsCallable()"); } + public OperationCallable + deployFlowOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deployFlowOperationCallable()"); + } + + public UnaryCallable deployFlowCallable() { + throw new UnsupportedOperationException("Not implemented: deployFlowCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java index 681a329dc..d1a772c7a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java @@ -49,6 +49,9 @@ import com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult; import com.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse; import com.google.cloud.dialogflow.cx.v3beta1.Environment; import com.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest; @@ -140,6 +143,9 @@ public class EnvironmentsStubSettings extends StubSettings listContinuousTestResultsSettings; + private final UnaryCallSettings deployFlowSettings; + private final OperationCallSettings + deployFlowOperationSettings; private static final PagedListDescriptor< ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> @@ -416,6 +422,17 @@ public UnaryCallSettings runContinuousTestS return listContinuousTestResultsSettings; } + /** Returns the object with the settings used for calls to deployFlow. */ + public UnaryCallSettings deployFlowSettings() { + return deployFlowSettings; + } + + /** Returns the object with the settings used for calls to deployFlow. */ + public OperationCallSettings + deployFlowOperationSettings() { + return deployFlowOperationSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public EnvironmentsStub createStub() throws IOException { if (getTransportChannelProvider() @@ -506,6 +523,8 @@ protected EnvironmentsStubSettings(Builder settingsBuilder) throws IOException { runContinuousTestOperationSettings = settingsBuilder.runContinuousTestOperationSettings().build(); listContinuousTestResultsSettings = settingsBuilder.listContinuousTestResultsSettings().build(); + deployFlowSettings = settingsBuilder.deployFlowSettings().build(); + deployFlowOperationSettings = settingsBuilder.deployFlowOperationSettings().build(); } /** Builder for EnvironmentsStubSettings. */ @@ -541,6 +560,10 @@ public static class Builder extends StubSettings.Builder listContinuousTestResultsSettings; + private final UnaryCallSettings.Builder deployFlowSettings; + private final OperationCallSettings.Builder< + DeployFlowRequest, DeployFlowResponse, DeployFlowMetadata> + deployFlowOperationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -592,6 +615,8 @@ protected Builder(ClientContext clientContext) { runContinuousTestOperationSettings = OperationCallSettings.newBuilder(); listContinuousTestResultsSettings = PagedCallSettings.newBuilder(LIST_CONTINUOUS_TEST_RESULTS_PAGE_STR_FACT); + deployFlowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deployFlowOperationSettings = OperationCallSettings.newBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -602,7 +627,8 @@ protected Builder(ClientContext clientContext) { deleteEnvironmentSettings, lookupEnvironmentHistorySettings, runContinuousTestSettings, - listContinuousTestResultsSettings); + listContinuousTestResultsSettings, + deployFlowSettings); initDefaults(this); } @@ -620,6 +646,8 @@ protected Builder(EnvironmentsStubSettings settings) { runContinuousTestSettings = settings.runContinuousTestSettings.toBuilder(); runContinuousTestOperationSettings = settings.runContinuousTestOperationSettings.toBuilder(); listContinuousTestResultsSettings = settings.listContinuousTestResultsSettings.toBuilder(); + deployFlowSettings = settings.deployFlowSettings.toBuilder(); + deployFlowOperationSettings = settings.deployFlowOperationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -630,7 +658,8 @@ protected Builder(EnvironmentsStubSettings settings) { deleteEnvironmentSettings, lookupEnvironmentHistorySettings, runContinuousTestSettings, - listContinuousTestResultsSettings); + listContinuousTestResultsSettings, + deployFlowSettings); } private static Builder createDefault() { @@ -687,6 +716,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .deployFlowSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .createEnvironmentOperationSettings() .setInitialCallSettings( @@ -761,6 +795,29 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .deployFlowOperationSettings() + .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(DeployFlowResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeployFlowMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -857,6 +914,19 @@ public UnaryCallSettings.Builder deleteEnvironm return listContinuousTestResultsSettings; } + /** Returns the builder for the settings used for calls to deployFlow. */ + public UnaryCallSettings.Builder deployFlowSettings() { + return deployFlowSettings; + } + + /** Returns the builder for the settings used for calls to deployFlow. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deployFlowOperationSettings() { + return deployFlowOperationSettings; + } + @Override public EnvironmentsStubSettings build() throws IOException { return new EnvironmentsStubSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcDeploymentsCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcDeploymentsCallableFactory.java new file mode 100644 index 000000000..96b6ca89c --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcDeploymentsCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import com.google.api.core.BetaApi; +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 Deployments service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDeploymentsCallableFactory 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/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcDeploymentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcDeploymentsStub.java new file mode 100644 index 000000000..671aeccba --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcDeploymentsStub.java @@ -0,0 +1,209 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.DeploymentsClient.ListDeploymentsPagedResponse; + +import com.google.api.core.BetaApi; +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.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.Deployment; +import com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse; +import com.google.common.collect.ImmutableMap; +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 Deployments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDeploymentsStub extends DeploymentsStub { + private static final MethodDescriptor + listDeploymentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Deployments/ListDeployments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDeploymentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDeploymentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Deployments/GetDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Deployment.getDefaultInstance())) + .build(); + + private final UnaryCallable + listDeploymentsCallable; + private final UnaryCallable + listDeploymentsPagedCallable; + private final UnaryCallable getDeploymentCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDeploymentsStub create(DeploymentsStubSettings settings) + throws IOException { + return new GrpcDeploymentsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDeploymentsStub create(ClientContext clientContext) throws IOException { + return new GrpcDeploymentsStub(DeploymentsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDeploymentsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDeploymentsStub( + DeploymentsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDeploymentsStub, 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 GrpcDeploymentsStub(DeploymentsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDeploymentsCallableFactory()); + } + + /** + * Constructs an instance of GrpcDeploymentsStub, 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 GrpcDeploymentsStub( + DeploymentsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listDeploymentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDeploymentsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.listDeploymentsCallable = + callableFactory.createUnaryCallable( + listDeploymentsTransportSettings, settings.listDeploymentsSettings(), clientContext); + this.listDeploymentsPagedCallable = + callableFactory.createPagedCallable( + listDeploymentsTransportSettings, settings.listDeploymentsSettings(), clientContext); + this.getDeploymentCallable = + callableFactory.createUnaryCallable( + getDeploymentTransportSettings, settings.getDeploymentSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listDeploymentsCallable() { + return listDeploymentsCallable; + } + + @Override + public UnaryCallable + listDeploymentsPagedCallable() { + return listDeploymentsPagedCallable; + } + + @Override + public UnaryCallable getDeploymentCallable() { + return getDeploymentCallable; + } + + @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/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java index a8a707572..e6544fc29 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java @@ -30,6 +30,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse; import com.google.cloud.dialogflow.cx.v3beta1.Environment; import com.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest; @@ -155,6 +158,14 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { ProtoUtils.marshaller(ListContinuousTestResultsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deployFlowMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Environments/DeployFlow") + .setRequestMarshaller(ProtoUtils.marshaller(DeployFlowRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private final UnaryCallable listEnvironmentsCallable; private final UnaryCallable @@ -181,6 +192,9 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { private final UnaryCallable< ListContinuousTestResultsRequest, ListContinuousTestResultsPagedResponse> listContinuousTestResultsPagedCallable; + private final UnaryCallable deployFlowCallable; + private final OperationCallable + deployFlowOperationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -310,6 +324,16 @@ protected GrpcEnvironmentsStub( return params.build(); }) .build(); + GrpcCallSettings deployFlowTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deployFlowMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("environment", String.valueOf(request.getEnvironment())); + return params.build(); + }) + .build(); this.listEnvironmentsCallable = callableFactory.createUnaryCallable( @@ -378,6 +402,15 @@ protected GrpcEnvironmentsStub( listContinuousTestResultsTransportSettings, settings.listContinuousTestResultsSettings(), clientContext); + this.deployFlowCallable = + callableFactory.createUnaryCallable( + deployFlowTransportSettings, settings.deployFlowSettings(), clientContext); + this.deployFlowOperationCallable = + callableFactory.createOperationCallable( + deployFlowTransportSettings, + settings.deployFlowOperationSettings(), + clientContext, + operationsStub); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -467,6 +500,17 @@ public UnaryCallable runContinuousTestCalla return listContinuousTestResultsPagedCallable; } + @Override + public UnaryCallable deployFlowCallable() { + return deployFlowCallable; + } + + @Override + public OperationCallable + deployFlowOperationCallable() { + return deployFlowOperationCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClientTest.java new file mode 100644 index 000000000..954275de3 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClientTest.java @@ -0,0 +1,267 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.DeploymentsClient.ListDeploymentsPagedResponse; + +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.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +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 DeploymentsClientTest { + private static MockDeployments mockDeployments; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DeploymentsClient client; + + @BeforeClass + public static void startStaticServer() { + mockDeployments = new MockDeployments(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDeployments)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DeploymentsSettings settings = + DeploymentsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DeploymentsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listDeploymentsTest() throws Exception { + Deployment responsesElement = Deployment.newBuilder().build(); + ListDeploymentsResponse expectedResponse = + ListDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllDeployments(Arrays.asList(responsesElement)) + .build(); + mockDeployments.addResponse(expectedResponse); + + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + + ListDeploymentsPagedResponse pagedListResponse = client.listDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeploymentsList().get(0), resources.get(0)); + + List actualRequests = mockDeployments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeploymentsRequest actualRequest = ((ListDeploymentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeploymentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeployments.addException(exception); + + try { + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + client.listDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeploymentsTest2() throws Exception { + Deployment responsesElement = Deployment.newBuilder().build(); + ListDeploymentsResponse expectedResponse = + ListDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllDeployments(Arrays.asList(responsesElement)) + .build(); + mockDeployments.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDeploymentsPagedResponse pagedListResponse = client.listDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeploymentsList().get(0), resources.get(0)); + + List actualRequests = mockDeployments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeploymentsRequest actualRequest = ((ListDeploymentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeploymentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeployments.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName( + DeploymentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]") + .toString()) + .setFlowVersion( + VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]") + .toString()) + .setResult(Deployment.Result.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDeployments.addResponse(expectedResponse); + + DeploymentName name = + DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]"); + + Deployment actualResponse = client.getDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeployments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeploymentRequest actualRequest = ((GetDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeployments.addException(exception); + + try { + DeploymentName name = + DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]"); + client.getDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName( + DeploymentName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]") + .toString()) + .setFlowVersion( + VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]") + .toString()) + .setResult(Deployment.Result.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDeployments.addResponse(expectedResponse); + + String name = "name3373707"; + + Deployment actualResponse = client.getDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeployments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeploymentRequest actualRequest = ((GetDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeployments.addException(exception); + + try { + String name = "name3373707"; + client.getDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java index 31014e742..ff85bee91 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java @@ -187,6 +187,7 @@ public void getEnvironmentTest() throws Exception { .setDescription("description-1724546052") .addAllVersionConfigs(new ArrayList()) .setUpdateTime(Timestamp.newBuilder().build()) + .setTestCasesConfig(Environment.TestCasesConfig.newBuilder().build()) .build(); mockEnvironments.addResponse(expectedResponse); @@ -233,6 +234,7 @@ public void getEnvironmentTest2() throws Exception { .setDescription("description-1724546052") .addAllVersionConfigs(new ArrayList()) .setUpdateTime(Timestamp.newBuilder().build()) + .setTestCasesConfig(Environment.TestCasesConfig.newBuilder().build()) .build(); mockEnvironments.addResponse(expectedResponse); @@ -277,6 +279,7 @@ public void createEnvironmentTest() throws Exception { .setDescription("description-1724546052") .addAllVersionConfigs(new ArrayList()) .setUpdateTime(Timestamp.newBuilder().build()) + .setTestCasesConfig(Environment.TestCasesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -332,6 +335,7 @@ public void createEnvironmentTest2() throws Exception { .setDescription("description-1724546052") .addAllVersionConfigs(new ArrayList()) .setUpdateTime(Timestamp.newBuilder().build()) + .setTestCasesConfig(Environment.TestCasesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -387,6 +391,7 @@ public void updateEnvironmentTest() throws Exception { .setDescription("description-1724546052") .addAllVersionConfigs(new ArrayList()) .setUpdateTime(Timestamp.newBuilder().build()) + .setTestCasesConfig(Environment.TestCasesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -742,4 +747,68 @@ public void listContinuousTestResultsExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void deployFlowTest() throws Exception { + DeployFlowResponse expectedResponse = + DeployFlowResponse.newBuilder() + .setEnvironment(Environment.newBuilder().build()) + .setDeployment("deployment1939520197") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deployFlowTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + DeployFlowRequest request = + DeployFlowRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .setFlowVersion( + VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]") + .toString()) + .build(); + + DeployFlowResponse actualResponse = client.deployFlowAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeployFlowRequest actualRequest = ((DeployFlowRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getFlowVersion(), actualRequest.getFlowVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deployFlowExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + DeployFlowRequest request = + DeployFlowRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .setFlowVersion( + VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]") + .toString()) + .build(); + client.deployFlowAsync(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()); + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockDeployments.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockDeployments.java new file mode 100644 index 000000000..5c0de9731 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockDeployments.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +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 MockDeployments implements MockGrpcService { + private final MockDeploymentsImpl serviceImpl; + + public MockDeployments() { + serviceImpl = new MockDeploymentsImpl(); + } + + @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/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockDeploymentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockDeploymentsImpl.java new file mode 100644 index 000000000..dd83a83c3 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockDeploymentsImpl.java @@ -0,0 +1,102 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3beta1.DeploymentsGrpc.DeploymentsImplBase; +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 MockDeploymentsImpl extends DeploymentsImplBase { + private List requests; + private Queue responses; + + public MockDeploymentsImpl() { + 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 listDeployments( + ListDeploymentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDeploymentsResponse) { + requests.add(request); + responseObserver.onNext(((ListDeploymentsResponse) 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 ListDeployments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDeploymentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDeployment( + GetDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Deployment) { + requests.add(request); + responseObserver.onNext(((Deployment) 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 GetDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Deployment.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java index a916bfc3d..3264ac681 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java @@ -229,4 +229,24 @@ public void listContinuousTestResults( Exception.class.getName()))); } } + + @Override + public void deployFlow(DeployFlowRequest 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 DeployFlow, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/clirr-ignored-differences.xml b/grpc-google-cloud-dialogflow-cx-v3beta1/clirr-ignored-differences.xml new file mode 100644 index 000000000..7f41d632e --- /dev/null +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/clirr-ignored-differences.xml @@ -0,0 +1,8 @@ + + + + + 8001 + com/google/cloud/location/*Location* + + diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java index 34b90bd21..7ea7a8165 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsGrpc.java @@ -597,6 +597,13 @@ public void exportAgent( * Restores the specified agent from a binary file. * Replaces the current agent with a new one. Note that all existing resources * in agent (e.g. intents, entity types, flows) will be removed. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * Note: You should always train a flow prior to sending it queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -838,6 +845,13 @@ public void exportAgent( * Restores the specified agent from a binary file. * Replaces the current agent with a new one. Note that all existing resources * in agent (e.g. intents, entity types, flows) will be removed. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * Note: You should always train a flow prior to sending it queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -1005,6 +1019,13 @@ public com.google.longrunning.Operation exportAgent( * Restores the specified agent from a binary file. * Replaces the current agent with a new one. Note that all existing resources * in agent (e.g. intents, entity types, flows) will be removed. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * Note: You should always train a flow prior to sending it queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -1165,6 +1186,13 @@ protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca * Restores the specified agent from a binary file. * Replaces the current agent with a new one. Note that all existing resources * in agent (e.g. intents, entity types, flows) will be removed. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * Note: You should always train a flow prior to sending it queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsGrpc.java new file mode 100644 index 000000000..c671bcd13 --- /dev/null +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsGrpc.java @@ -0,0 +1,482 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.dialogflow.cx.v3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing [Deployments][google.cloud.dialogflow.cx.v3beta1.Deployment].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3beta1/deployment.proto") +public final class DeploymentsGrpc { + + private DeploymentsGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3beta1.Deployments"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse> + getListDeploymentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDeployments", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse> + getListDeploymentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse> + getListDeploymentsMethod; + if ((getListDeploymentsMethod = DeploymentsGrpc.getListDeploymentsMethod) == null) { + synchronized (DeploymentsGrpc.class) { + if ((getListDeploymentsMethod = DeploymentsGrpc.getListDeploymentsMethod) == null) { + DeploymentsGrpc.getListDeploymentsMethod = + getListDeploymentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDeployments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeploymentsMethodDescriptorSupplier("ListDeployments")) + .build(); + } + } + } + return getListDeploymentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Deployment> + getGetDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDeployment", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Deployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Deployment> + getGetDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Deployment> + getGetDeploymentMethod; + if ((getGetDeploymentMethod = DeploymentsGrpc.getGetDeploymentMethod) == null) { + synchronized (DeploymentsGrpc.class) { + if ((getGetDeploymentMethod = DeploymentsGrpc.getGetDeploymentMethod) == null) { + DeploymentsGrpc.getGetDeploymentMethod = + getGetDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Deployment + .getDefaultInstance())) + .setSchemaDescriptor(new DeploymentsMethodDescriptorSupplier("GetDeployment")) + .build(); + } + } + } + return getGetDeploymentMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DeploymentsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeploymentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentsStub(channel, callOptions); + } + }; + return DeploymentsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DeploymentsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeploymentsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentsBlockingStub(channel, callOptions); + } + }; + return DeploymentsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DeploymentsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeploymentsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentsFutureStub(channel, callOptions); + } + }; + return DeploymentsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Deployments][google.cloud.dialogflow.cx.v3beta1.Deployment].
+   * 
+ */ + public abstract static class DeploymentsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public void listDeployments( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDeploymentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * 
+ */ + public void getDeployment( + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDeploymentMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListDeploymentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse>( + this, METHODID_LIST_DEPLOYMENTS))) + .addMethod( + getGetDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest, + com.google.cloud.dialogflow.cx.v3beta1.Deployment>( + this, METHODID_GET_DEPLOYMENT))) + .build(); + } + } + + /** + * + * + *
+   * Service for managing [Deployments][google.cloud.dialogflow.cx.v3beta1.Deployment].
+   * 
+ */ + public static final class DeploymentsStub + extends io.grpc.stub.AbstractAsyncStub { + private DeploymentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeploymentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentsStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public void listDeployments( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDeploymentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * 
+ */ + public void getDeployment( + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service for managing [Deployments][google.cloud.dialogflow.cx.v3beta1.Deployment].
+   * 
+ */ + public static final class DeploymentsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DeploymentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeploymentsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse listDeployments( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDeploymentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Deployment getDeployment( + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDeploymentMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for managing [Deployments][google.cloud.dialogflow.cx.v3beta1.Deployment].
+   * 
+ */ + public static final class DeploymentsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DeploymentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeploymentsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse> + listDeployments(com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDeploymentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Deployment> + getDeployment(com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDeploymentMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_DEPLOYMENTS = 0; + private static final int METHODID_GET_DEPLOYMENT = 1; + + 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 DeploymentsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DeploymentsImplBase 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_LIST_DEPLOYMENTS: + serviceImpl.listDeployments( + (com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse>) + responseObserver); + break; + case METHODID_GET_DEPLOYMENT: + serviceImpl.getDeployment( + (com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) 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(); + } + } + } + + private abstract static class DeploymentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DeploymentsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Deployments"); + } + } + + private static final class DeploymentsFileDescriptorSupplier + extends DeploymentsBaseDescriptorSupplier { + DeploymentsFileDescriptorSupplier() {} + } + + private static final class DeploymentsMethodDescriptorSupplier + extends DeploymentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DeploymentsMethodDescriptorSupplier(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 (DeploymentsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DeploymentsFileDescriptorSupplier()) + .addMethod(getListDeploymentsMethod()) + .addMethod(getGetDeploymentMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java index 4643dc874..a77f62520 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java @@ -413,6 +413,51 @@ private EnvironmentsGrpc() {} return getListContinuousTestResultsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest, + com.google.longrunning.Operation> + getDeployFlowMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeployFlow", + requestType = com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest, + com.google.longrunning.Operation> + getDeployFlowMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest, + com.google.longrunning.Operation> + getDeployFlowMethod; + if ((getDeployFlowMethod = EnvironmentsGrpc.getDeployFlowMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getDeployFlowMethod = EnvironmentsGrpc.getDeployFlowMethod) == null) { + EnvironmentsGrpc.getDeployFlowMethod = + getDeployFlowMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeployFlow")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EnvironmentsMethodDescriptorSupplier("DeployFlow")) + .build(); + } + } + } + return getDeployFlowMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static EnvironmentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -498,6 +543,12 @@ public void getEnvironment( * *
      * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
      * 
*/ public void createEnvironment( @@ -512,6 +563,12 @@ public void createEnvironment( * *
      * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
      * 
*/ public void updateEnvironment( @@ -556,6 +613,11 @@ public void lookupEnvironmentHistory( * *
      * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata]
+     * - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse]
      * 
*/ public void runContinuousTest( @@ -581,6 +643,24 @@ public void listContinuousTestResults( getListContinuousTestResultsMethod(), responseObserver); } + /** + * + * + *
+     * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata]
+     * - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse]
+     * 
+ */ + public void deployFlow( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeployFlowMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -636,6 +716,12 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest, com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse>( this, METHODID_LIST_CONTINUOUS_TEST_RESULTS))) + .addMethod( + getDeployFlowMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest, + com.google.longrunning.Operation>(this, METHODID_DEPLOY_FLOW))) .build(); } } @@ -697,6 +783,12 @@ public void getEnvironment( * *
      * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
      * 
*/ public void createEnvironment( @@ -713,6 +805,12 @@ public void createEnvironment( * *
      * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
      * 
*/ public void updateEnvironment( @@ -763,6 +861,11 @@ public void lookupEnvironmentHistory( * *
      * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata]
+     * - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse]
      * 
*/ public void runContinuousTest( @@ -791,6 +894,25 @@ public void listContinuousTestResults( request, responseObserver); } + + /** + * + * + *
+     * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata]
+     * - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse]
+     * 
+ */ + public void deployFlow( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeployFlowMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -843,6 +965,12 @@ public com.google.cloud.dialogflow.cx.v3beta1.Environment getEnvironment( * *
      * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
      * 
*/ public com.google.longrunning.Operation createEnvironment( @@ -856,6 +984,12 @@ public com.google.longrunning.Operation createEnvironment( * *
      * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
      * 
*/ public com.google.longrunning.Operation updateEnvironment( @@ -896,6 +1030,11 @@ public com.google.protobuf.Empty deleteEnvironment( * *
      * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata]
+     * - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse]
      * 
*/ public com.google.longrunning.Operation runContinuousTest( @@ -917,6 +1056,24 @@ public com.google.longrunning.Operation runContinuousTest( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListContinuousTestResultsMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata]
+     * - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse]
+     * 
+ */ + public com.google.longrunning.Operation deployFlow( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeployFlowMethod(), getCallOptions(), request); + } } /** @@ -971,6 +1128,12 @@ protected EnvironmentsFutureStub build( * *
      * Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -984,6 +1147,12 @@ protected EnvironmentsFutureStub build( * *
      * Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1025,6 +1194,11 @@ protected EnvironmentsFutureStub build( * *
      * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata]
+     * - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1047,6 +1221,24 @@ protected EnvironmentsFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListContinuousTestResultsMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata]
+     * - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse]
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deployFlow(com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeployFlowMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_ENVIRONMENTS = 0; @@ -1057,6 +1249,7 @@ protected EnvironmentsFutureStub build( private static final int METHODID_LOOKUP_ENVIRONMENT_HISTORY = 5; private static final int METHODID_RUN_CONTINUOUS_TEST = 6; private static final int METHODID_LIST_CONTINUOUS_TEST_RESULTS = 7; + private static final int METHODID_DEPLOY_FLOW = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1122,6 +1315,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse>) responseObserver); break; + case METHODID_DEPLOY_FLOW: + serviceImpl.deployFlow( + (com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1194,6 +1392,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getLookupEnvironmentHistoryMethod()) .addMethod(getRunContinuousTestMethod()) .addMethod(getListContinuousTestResultsMethod()) + .addMethod(getDeployFlowMethod()) .build(); } } diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java index 76b873cc1..be61e7d50 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsGrpc.java @@ -611,6 +611,13 @@ public void updateFlow( *
      * Trains the specified flow. Note that only the flow in 'draft' environment
      * is trained.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: An [Empty
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
      * Note: You should always train a flow prior to sending it queries. See the
      * [training
      * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
@@ -660,6 +667,12 @@ public void getFlowValidationResult(
      *
      * 
      * Imports the specified flow to the specified agent from a binary file.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse]
      * Note: You should always train a flow prior to sending it queries. See the
      * [training
      * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
@@ -676,6 +689,12 @@ public void importFlow(
      *
      * 
      * Exports the specified flow to a binary file.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse]
      * Note that resources (e.g. intents, entities, webhooks) that the flow
      * references will also be exported.
      * 
@@ -856,6 +875,13 @@ public void updateFlow( *
      * Trains the specified flow. Note that only the flow in 'draft' environment
      * is trained.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: An [Empty
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
      * Note: You should always train a flow prior to sending it queries. See the
      * [training
      * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
@@ -910,6 +936,12 @@ public void getFlowValidationResult(
      *
      * 
      * Imports the specified flow to the specified agent from a binary file.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse]
      * Note: You should always train a flow prior to sending it queries. See the
      * [training
      * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
@@ -927,6 +959,12 @@ public void importFlow(
      *
      * 
      * Exports the specified flow to a binary file.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse]
      * Note that resources (e.g. intents, entities, webhooks) that the flow
      * references will also be exported.
      * 
@@ -1034,6 +1072,13 @@ public com.google.cloud.dialogflow.cx.v3beta1.Flow updateFlow( *
      * Trains the specified flow. Note that only the flow in 'draft' environment
      * is trained.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: An [Empty
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
      * Note: You should always train a flow prior to sending it queries. See the
      * [training
      * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
@@ -1079,6 +1124,12 @@ public com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult getFlowValida
      *
      * 
      * Imports the specified flow to the specified agent from a binary file.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse]
      * Note: You should always train a flow prior to sending it queries. See the
      * [training
      * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
@@ -1095,6 +1146,12 @@ public com.google.longrunning.Operation importFlow(
      *
      * 
      * Exports the specified flow to a binary file.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse]
      * Note that resources (e.g. intents, entities, webhooks) that the flow
      * references will also be exported.
      * 
@@ -1205,6 +1262,13 @@ public com.google.common.util.concurrent.ListenableFuture * Trains the specified flow. Note that only the flow in 'draft' environment * is trained. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: An [Empty + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) * Note: You should always train a flow prior to sending it queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -1253,6 +1317,12 @@ public com.google.common.util.concurrent.ListenableFuture * Imports the specified flow to the specified agent from a binary file. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] * Note: You should always train a flow prior to sending it queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -1269,6 +1339,12 @@ public com.google.common.util.concurrent.ListenableFuture * Exports the specified flow to a binary file. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: An empty [Struct + * message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + * - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] * Note that resources (e.g. intents, entities, webhooks) that the flow * references will also be exported. *
diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java index 0096bac5a..b4b5c0f8c 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesGrpc.java @@ -734,6 +734,11 @@ public void runTestCase( * *
      * Kicks off a batch run of test cases.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata]
+     * - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse]
      * 
*/ public void batchRunTestCases( @@ -766,6 +771,11 @@ public void calculateCoverage( * Imports the test cases from a Cloud Storage bucket or a local file. It * always creates new test cases and won't overwite any existing ones. The * provided ID in the imported test case is neglected. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata] + * - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse] *
*/ public void importTestCases( @@ -781,6 +791,11 @@ public void importTestCases( *
      * Exports the test cases under the agent to a Cloud Storage bucket or a local
      * file. Filter can be applied to export a subset of test cases.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata]
+     * - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse]
      * 
*/ public void exportTestCases( @@ -1035,6 +1050,11 @@ public void runTestCase( * *
      * Kicks off a batch run of test cases.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata]
+     * - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse]
      * 
*/ public void batchRunTestCases( @@ -1071,6 +1091,11 @@ public void calculateCoverage( * Imports the test cases from a Cloud Storage bucket or a local file. It * always creates new test cases and won't overwite any existing ones. The * provided ID in the imported test case is neglected. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata] + * - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse] *
*/ public void importTestCases( @@ -1088,6 +1113,11 @@ public void importTestCases( *
      * Exports the test cases under the agent to a Cloud Storage bucket or a local
      * file. Filter can be applied to export a subset of test cases.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata]
+     * - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse]
      * 
*/ public void exportTestCases( @@ -1243,6 +1273,11 @@ public com.google.longrunning.Operation runTestCase( * *
      * Kicks off a batch run of test cases.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata]
+     * - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse]
      * 
*/ public com.google.longrunning.Operation batchRunTestCases( @@ -1271,6 +1306,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse calculat * Imports the test cases from a Cloud Storage bucket or a local file. It * always creates new test cases and won't overwite any existing ones. The * provided ID in the imported test case is neglected. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata] + * - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse] *
*/ public com.google.longrunning.Operation importTestCases( @@ -1285,6 +1325,11 @@ public com.google.longrunning.Operation importTestCases( *
      * Exports the test cases under the agent to a Cloud Storage bucket or a local
      * file. Filter can be applied to export a subset of test cases.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata]
+     * - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse]
      * 
*/ public com.google.longrunning.Operation exportTestCases( @@ -1432,6 +1477,11 @@ protected TestCasesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * *
      * Kicks off a batch run of test cases.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata]
+     * - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1461,6 +1511,11 @@ protected TestCasesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * Imports the test cases from a Cloud Storage bucket or a local file. It * always creates new test cases and won't overwite any existing ones. The * provided ID in the imported test case is neglected. + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + * The returned `Operation` type has the following method-specific fields: + * - `metadata`: [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata] + * - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse] *
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1475,6 +1530,11 @@ protected TestCasesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions *
      * Exports the test cases under the agent to a Cloud Storage bucket or a local
      * file. Filter can be applied to export a subset of test cases.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata]
+     * - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsGrpc.java index f9ebf75da..fe1a48108 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsGrpc.java @@ -385,6 +385,11 @@ public void getVersion( * *
      * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata]
+     * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version]
      * 
*/ public void createVersion( @@ -428,6 +433,13 @@ public void deleteVersion( * *
      * Loads resources in the specified version to the draft flow.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: An [Empty
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
      * 
*/ public void loadVersion( @@ -536,6 +548,11 @@ public void getVersion( * *
      * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata]
+     * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version]
      * 
*/ public void createVersion( @@ -585,6 +602,13 @@ public void deleteVersion( * *
      * Loads resources in the specified version to the draft flow.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: An [Empty
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
      * 
*/ public void loadVersion( @@ -646,6 +670,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.Version getVersion( * *
      * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata]
+     * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version]
      * 
*/ public com.google.longrunning.Operation createVersion( @@ -685,6 +714,13 @@ public com.google.protobuf.Empty deleteVersion( * *
      * Loads resources in the specified version to the draft flow.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: An [Empty
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
      * 
*/ public com.google.longrunning.Operation loadVersion( @@ -745,6 +781,11 @@ protected VersionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * *
      * Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3beta1.Flow].
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata]
+     * - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -785,6 +826,13 @@ protected VersionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * *
      * Loads resources in the specified version to the draft flow.
+     * This method is a [long-running
+     * operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
+     * The returned `Operation` type has the following method-specific fields:
+     * - `metadata`: An empty [Struct
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
+     * - `response`: An [Empty
+     *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
      * 
*/ public com.google.common.util.concurrent.ListenableFuture diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationsGrpc.java deleted file mode 100644 index 16f28b5c2..000000000 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationsGrpc.java +++ /dev/null @@ -1,476 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.location; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * An abstract interface that provides location-related information for
- * a service. Service-specific metadata is provided through the
- * [Location.metadata][google.cloud.location.Location.metadata] field.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/location/locations.proto") -public final class LocationsGrpc { - - private LocationsGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.location.Locations"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.location.ListLocationsRequest, - com.google.cloud.location.ListLocationsResponse> - getListLocationsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListLocations", - requestType = com.google.cloud.location.ListLocationsRequest.class, - responseType = com.google.cloud.location.ListLocationsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.location.ListLocationsRequest, - com.google.cloud.location.ListLocationsResponse> - getListLocationsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.location.ListLocationsRequest, - com.google.cloud.location.ListLocationsResponse> - getListLocationsMethod; - if ((getListLocationsMethod = LocationsGrpc.getListLocationsMethod) == null) { - synchronized (LocationsGrpc.class) { - if ((getListLocationsMethod = LocationsGrpc.getListLocationsMethod) == null) { - LocationsGrpc.getListLocationsMethod = - getListLocationsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLocations")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.location.ListLocationsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.location.ListLocationsResponse.getDefaultInstance())) - .setSchemaDescriptor(new LocationsMethodDescriptorSupplier("ListLocations")) - .build(); - } - } - } - return getListLocationsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.location.GetLocationRequest, com.google.cloud.location.Location> - getGetLocationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetLocation", - requestType = com.google.cloud.location.GetLocationRequest.class, - responseType = com.google.cloud.location.Location.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.location.GetLocationRequest, com.google.cloud.location.Location> - getGetLocationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.location.GetLocationRequest, com.google.cloud.location.Location> - getGetLocationMethod; - if ((getGetLocationMethod = LocationsGrpc.getGetLocationMethod) == null) { - synchronized (LocationsGrpc.class) { - if ((getGetLocationMethod = LocationsGrpc.getGetLocationMethod) == null) { - LocationsGrpc.getGetLocationMethod = - getGetLocationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLocation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.location.GetLocationRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.location.Location.getDefaultInstance())) - .setSchemaDescriptor(new LocationsMethodDescriptorSupplier("GetLocation")) - .build(); - } - } - } - return getGetLocationMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static LocationsStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public LocationsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LocationsStub(channel, callOptions); - } - }; - return LocationsStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static LocationsBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public LocationsBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LocationsBlockingStub(channel, callOptions); - } - }; - return LocationsBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static LocationsFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public LocationsFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LocationsFutureStub(channel, callOptions); - } - }; - return LocationsFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * An abstract interface that provides location-related information for
-   * a service. Service-specific metadata is provided through the
-   * [Location.metadata][google.cloud.location.Location.metadata] field.
-   * 
- */ - public abstract static class LocationsImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Lists information about the supported locations for this service.
-     * 
- */ - public void listLocations( - com.google.cloud.location.ListLocationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListLocationsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets information about a location.
-     * 
- */ - public void getLocation( - com.google.cloud.location.GetLocationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetLocationMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListLocationsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.location.ListLocationsRequest, - com.google.cloud.location.ListLocationsResponse>( - this, METHODID_LIST_LOCATIONS))) - .addMethod( - getGetLocationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.location.GetLocationRequest, - com.google.cloud.location.Location>(this, METHODID_GET_LOCATION))) - .build(); - } - } - - /** - * - * - *
-   * An abstract interface that provides location-related information for
-   * a service. Service-specific metadata is provided through the
-   * [Location.metadata][google.cloud.location.Location.metadata] field.
-   * 
- */ - public static final class LocationsStub extends io.grpc.stub.AbstractAsyncStub { - private LocationsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected LocationsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LocationsStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists information about the supported locations for this service.
-     * 
- */ - public void listLocations( - com.google.cloud.location.ListLocationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListLocationsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets information about a location.
-     * 
- */ - public void getLocation( - com.google.cloud.location.GetLocationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetLocationMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * An abstract interface that provides location-related information for
-   * a service. Service-specific metadata is provided through the
-   * [Location.metadata][google.cloud.location.Location.metadata] field.
-   * 
- */ - public static final class LocationsBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private LocationsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected LocationsBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LocationsBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists information about the supported locations for this service.
-     * 
- */ - public com.google.cloud.location.ListLocationsResponse listLocations( - com.google.cloud.location.ListLocationsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListLocationsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets information about a location.
-     * 
- */ - public com.google.cloud.location.Location getLocation( - com.google.cloud.location.GetLocationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetLocationMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * An abstract interface that provides location-related information for
-   * a service. Service-specific metadata is provided through the
-   * [Location.metadata][google.cloud.location.Location.metadata] field.
-   * 
- */ - public static final class LocationsFutureStub - extends io.grpc.stub.AbstractFutureStub { - private LocationsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected LocationsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LocationsFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists information about the supported locations for this service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.location.ListLocationsResponse> - listLocations(com.google.cloud.location.ListLocationsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListLocationsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets information about a location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getLocation(com.google.cloud.location.GetLocationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetLocationMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_LOCATIONS = 0; - private static final int METHODID_GET_LOCATION = 1; - - 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 LocationsImplBase serviceImpl; - private final int methodId; - - MethodHandlers(LocationsImplBase 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_LIST_LOCATIONS: - serviceImpl.listLocations( - (com.google.cloud.location.ListLocationsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_LOCATION: - serviceImpl.getLocation( - (com.google.cloud.location.GetLocationRequest) 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(); - } - } - } - - private abstract static class LocationsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - LocationsBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.location.LocationsProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Locations"); - } - } - - private static final class LocationsFileDescriptorSupplier - extends LocationsBaseDescriptorSupplier { - LocationsFileDescriptorSupplier() {} - } - - private static final class LocationsMethodDescriptorSupplier - extends LocationsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - LocationsMethodDescriptorSupplier(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 (LocationsGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new LocationsFileDescriptorSupplier()) - .addMethod(getListLocationsMethod()) - .addMethod(getGetLocationMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/clirr-ignored-differences.xml b/proto-google-cloud-dialogflow-cx-v3beta1/clirr-ignored-differences.xml index 8beebc93f..c0b3abb21 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/clirr-ignored-differences.xml +++ b/proto-google-cloud-dialogflow-cx-v3beta1/clirr-ignored-differences.xml @@ -30,4 +30,17 @@ com/google/cloud/location/*OrBuilder boolean has*(*) + + + 8001 + com/google/cloud/location/*LocationRequest* + + + 8001 + com/google/cloud/location/*LocationsResponse* + + + 8001 + com/google/cloud/location/*Location* + diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowMetadata.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowMetadata.java new file mode 100644 index 000000000..94a102d3c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowMetadata.java @@ -0,0 +1,962 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow] long running
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} + */ +public final class DeployFlowMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) + DeployFlowMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployFlowMetadata.newBuilder() to construct. + private DeployFlowMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployFlowMetadata() { + testErrors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployFlowMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeployFlowMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + testErrors_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + testErrors_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestError.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + testErrors_ = java.util.Collections.unmodifiableList(testErrors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.Builder.class); + } + + public static final int TEST_ERRORS_FIELD_NUMBER = 1; + private java.util.List testErrors_; + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + @java.lang.Override + public java.util.List getTestErrorsList() { + return testErrors_; + } + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + @java.lang.Override + public java.util.List + getTestErrorsOrBuilderList() { + return testErrors_; + } + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + @java.lang.Override + public int getTestErrorsCount() { + return testErrors_.size(); + } + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestError getTestErrors(int index) { + return testErrors_.get(index); + } + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getTestErrorsOrBuilder( + int index) { + return testErrors_.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 < testErrors_.size(); i++) { + output.writeMessage(1, testErrors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < testErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, testErrors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) obj; + + if (!getTestErrorsList().equals(other.getTestErrorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTestErrorsCount() > 0) { + hash = (37 * hash) + TEST_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getTestErrorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow] long running
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTestErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (testErrorsBuilder_ == null) { + testErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + testErrorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata(this); + int from_bitField0_ = bitField0_; + if (testErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + testErrors_ = java.util.Collections.unmodifiableList(testErrors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.testErrors_ = testErrors_; + } else { + result.testErrors_ = testErrorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.getDefaultInstance()) + return this; + if (testErrorsBuilder_ == null) { + if (!other.testErrors_.isEmpty()) { + if (testErrors_.isEmpty()) { + testErrors_ = other.testErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestErrorsIsMutable(); + testErrors_.addAll(other.testErrors_); + } + onChanged(); + } + } else { + if (!other.testErrors_.isEmpty()) { + if (testErrorsBuilder_.isEmpty()) { + testErrorsBuilder_.dispose(); + testErrorsBuilder_ = null; + testErrors_ = other.testErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + testErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTestErrorsFieldBuilder() + : null; + } else { + testErrorsBuilder_.addAllMessages(other.testErrors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List testErrors_ = + java.util.Collections.emptyList(); + + private void ensureTestErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + testErrors_ = + new java.util.ArrayList(testErrors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + testErrorsBuilder_; + + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public java.util.List getTestErrorsList() { + if (testErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(testErrors_); + } else { + return testErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public int getTestErrorsCount() { + if (testErrorsBuilder_ == null) { + return testErrors_.size(); + } else { + return testErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError getTestErrors(int index) { + if (testErrorsBuilder_ == null) { + return testErrors_.get(index); + } else { + return testErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder setTestErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (testErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestErrorsIsMutable(); + testErrors_.set(index, value); + onChanged(); + } else { + testErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder setTestErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (testErrorsBuilder_ == null) { + ensureTestErrorsIsMutable(); + testErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + testErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder addTestErrors(com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (testErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestErrorsIsMutable(); + testErrors_.add(value); + onChanged(); + } else { + testErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder addTestErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (testErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestErrorsIsMutable(); + testErrors_.add(index, value); + onChanged(); + } else { + testErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder addTestErrors( + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (testErrorsBuilder_ == null) { + ensureTestErrorsIsMutable(); + testErrors_.add(builderForValue.build()); + onChanged(); + } else { + testErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder addTestErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (testErrorsBuilder_ == null) { + ensureTestErrorsIsMutable(); + testErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + testErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder addAllTestErrors( + java.lang.Iterable values) { + if (testErrorsBuilder_ == null) { + ensureTestErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testErrors_); + onChanged(); + } else { + testErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder clearTestErrors() { + if (testErrorsBuilder_ == null) { + testErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + testErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public Builder removeTestErrors(int index) { + if (testErrorsBuilder_ == null) { + ensureTestErrorsIsMutable(); + testErrors_.remove(index); + onChanged(); + } else { + testErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder getTestErrorsBuilder( + int index) { + return getTestErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getTestErrorsOrBuilder( + int index) { + if (testErrorsBuilder_ == null) { + return testErrors_.get(index); + } else { + return testErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public java.util.List + getTestErrorsOrBuilderList() { + if (testErrorsBuilder_ != null) { + return testErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(testErrors_); + } + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder addTestErrorsBuilder() { + return getTestErrorsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestError.getDefaultInstance()); + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder addTestErrorsBuilder( + int index) { + return getTestErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.TestError.getDefaultInstance()); + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + public java.util.List + getTestErrorsBuilderList() { + return getTestErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + getTestErrorsFieldBuilder() { + if (testErrorsBuilder_ == null) { + testErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder>( + testErrors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + testErrors_ = null; + } + return testErrorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployFlowMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeployFlowMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowMetadataOrBuilder.java new file mode 100644 index 000000000..0180694ea --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowMetadataOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeployFlowMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + java.util.List getTestErrorsList(); + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestError getTestErrors(int index); + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + int getTestErrorsCount(); + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + java.util.List + getTestErrorsOrBuilderList(); + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.TestError test_errors = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getTestErrorsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowRequest.java new file mode 100644 index 000000000..d4a3a2434 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowRequest.java @@ -0,0 +1,872 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} + */ +public final class DeployFlowRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) + DeployFlowRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployFlowRequest.newBuilder() to construct. + private DeployFlowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployFlowRequest() { + environment_ = ""; + flowVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployFlowRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeployFlowRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + environment_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + flowVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.Builder.class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object environment_; + /** + * + * + *
+   * Required. The environment to deploy the flow to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + 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(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The environment to deploy the flow to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FLOW_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object flowVersion_; + /** + * + * + *
+   * Required. The flow version to deploy.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * flows/<Flow ID>/versions/<Version ID>`.
+   * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flowVersion. + */ + @java.lang.Override + public java.lang.String getFlowVersion() { + java.lang.Object ref = flowVersion_; + 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(); + flowVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The flow version to deploy.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * flows/<Flow ID>/versions/<Version ID>`.
+   * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flowVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFlowVersionBytes() { + java.lang.Object ref = flowVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flowVersion_ = 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 (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!getFlowVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, flowVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!getFlowVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, flowVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getFlowVersion().equals(other.getFlowVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + FLOW_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getFlowVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest 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 [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + environment_ = ""; + + flowVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest(this); + result.environment_ = environment_; + result.flowVersion_ = flowVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.getDefaultInstance()) + return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + if (!other.getFlowVersion().isEmpty()) { + flowVersion_ = other.flowVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Required. The environment to deploy the flow to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The environment to deploy the flow to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The environment to deploy the flow to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The environment to deploy the flow to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The environment to deploy the flow to.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>`.
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + private java.lang.Object flowVersion_ = ""; + /** + * + * + *
+     * Required. The flow version to deploy.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flowVersion. + */ + public java.lang.String getFlowVersion() { + java.lang.Object ref = flowVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flowVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The flow version to deploy.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flowVersion. + */ + public com.google.protobuf.ByteString getFlowVersionBytes() { + java.lang.Object ref = flowVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flowVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The flow version to deploy.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The flowVersion to set. + * @return This builder for chaining. + */ + public Builder setFlowVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + flowVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The flow version to deploy.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearFlowVersion() { + + flowVersion_ = getDefaultInstance().getFlowVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The flow version to deploy.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * flows/<Flow ID>/versions/<Version ID>`.
+     * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for flowVersion to set. + * @return This builder for chaining. + */ + public Builder setFlowVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + flowVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployFlowRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeployFlowRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowRequestOrBuilder.java new file mode 100644 index 000000000..898aac1e8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowRequestOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeployFlowRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The environment to deploy the flow to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Required. The environment to deploy the flow to.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * environments/<Environment ID>`.
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * Required. The flow version to deploy.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * flows/<Flow ID>/versions/<Version ID>`.
+   * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flowVersion. + */ + java.lang.String getFlowVersion(); + /** + * + * + *
+   * Required. The flow version to deploy.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * flows/<Flow ID>/versions/<Version ID>`.
+   * 
+ * + * + * string flow_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flowVersion. + */ + com.google.protobuf.ByteString getFlowVersionBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowResponse.java new file mode 100644 index 000000000..184570ab8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowResponse.java @@ -0,0 +1,930 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse} + */ +public final class DeployFlowResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) + DeployFlowResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployFlowResponse.newBuilder() to construct. + private DeployFlowResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployFlowResponse() { + deployment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployFlowResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeployFlowResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.Environment.Builder subBuilder = null; + if (environment_ != null) { + subBuilder = environment_.toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Environment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(environment_); + environment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + deployment_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.Builder.class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.Environment environment_; + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Environment getEnvironment() { + return environment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Environment.getDefaultInstance() + : environment_; + } + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.EnvironmentOrBuilder getEnvironmentOrBuilder() { + return getEnvironment(); + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object deployment_; + /** + * + * + *
+   * The name of the flow version deployment.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * environments/<Environment ID>/deployments/<Deployment ID>`.
+   * 
+ * + * string deployment = 2; + * + * @return The deployment. + */ + @java.lang.Override + public java.lang.String getDeployment() { + java.lang.Object ref = deployment_; + 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(); + deployment_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the flow version deployment.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * environments/<Environment ID>/deployments/<Deployment ID>`.
+   * 
+ * + * string deployment = 2; + * + * @return The bytes for deployment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeploymentBytes() { + java.lang.Object ref = deployment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployment_ = 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 (environment_ != null) { + output.writeMessage(1, getEnvironment()); + } + if (!getDeploymentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deployment_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (environment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEnvironment()); + } + if (!getDeploymentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deployment_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) obj; + + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment().equals(other.getEnvironment())) return false; + } + if (!getDeployment().equals(other.getDeployment())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + } + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse 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 [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (environmentBuilder_ == null) { + environment_ = null; + } else { + environment_ = null; + environmentBuilder_ = null; + } + deployment_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse(this); + if (environmentBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.build(); + } + result.deployment_ = deployment_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.getDefaultInstance()) + return this; + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + if (!other.getDeployment().isEmpty()) { + deployment_ = other.deployment_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Environment environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Environment, + com.google.cloud.dialogflow.cx.v3beta1.Environment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.EnvironmentOrBuilder> + environmentBuilder_; + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return environmentBuilder_ != null || environment_ != null; + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + * + * @return The environment. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Environment getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Environment.getDefaultInstance() + : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + public Builder setEnvironment(com.google.cloud.dialogflow.cx.v3beta1.Environment value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + environmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + public Builder setEnvironment( + com.google.cloud.dialogflow.cx.v3beta1.Environment.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + public Builder mergeEnvironment(com.google.cloud.dialogflow.cx.v3beta1.Environment value) { + if (environmentBuilder_ == null) { + if (environment_ != null) { + environment_ = + com.google.cloud.dialogflow.cx.v3beta1.Environment.newBuilder(environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + environmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = null; + onChanged(); + } else { + environment_ = null; + environmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Environment.Builder getEnvironmentBuilder() { + + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.EnvironmentOrBuilder getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Environment.getDefaultInstance() + : environment_; + } + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Environment, + com.google.cloud.dialogflow.cx.v3beta1.Environment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.EnvironmentOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Environment, + com.google.cloud.dialogflow.cx.v3beta1.Environment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.EnvironmentOrBuilder>( + getEnvironment(), getParentForChildren(), isClean()); + environment_ = null; + } + return environmentBuilder_; + } + + private java.lang.Object deployment_ = ""; + /** + * + * + *
+     * The name of the flow version deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>/deployments/<Deployment ID>`.
+     * 
+ * + * string deployment = 2; + * + * @return The deployment. + */ + public java.lang.String getDeployment() { + java.lang.Object ref = deployment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the flow version deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>/deployments/<Deployment ID>`.
+     * 
+ * + * string deployment = 2; + * + * @return The bytes for deployment. + */ + public com.google.protobuf.ByteString getDeploymentBytes() { + java.lang.Object ref = deployment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the flow version deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>/deployments/<Deployment ID>`.
+     * 
+ * + * string deployment = 2; + * + * @param value The deployment to set. + * @return This builder for chaining. + */ + public Builder setDeployment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deployment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the flow version deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>/deployments/<Deployment ID>`.
+     * 
+ * + * string deployment = 2; + * + * @return This builder for chaining. + */ + public Builder clearDeployment() { + + deployment_ = getDefaultInstance().getDeployment(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the flow version deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+     * environments/<Environment ID>/deployments/<Deployment ID>`.
+     * 
+ * + * string deployment = 2; + * + * @param value The bytes for deployment to set. + * @return This builder for chaining. + */ + public Builder setDeploymentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deployment_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployFlowResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeployFlowResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowResponseOrBuilder.java new file mode 100644 index 000000000..b76138272 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeployFlowResponseOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeployFlowResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + * + * @return The environment. + */ + com.google.cloud.dialogflow.cx.v3beta1.Environment getEnvironment(); + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment environment = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.EnvironmentOrBuilder getEnvironmentOrBuilder(); + + /** + * + * + *
+   * The name of the flow version deployment.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * environments/<Environment ID>/deployments/<Deployment ID>`.
+   * 
+ * + * string deployment = 2; + * + * @return The deployment. + */ + java.lang.String getDeployment(); + /** + * + * + *
+   * The name of the flow version deployment.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
+   * environments/<Environment ID>/deployments/<Deployment ID>`.
+   * 
+ * + * string deployment = 2; + * + * @return The bytes for deployment. + */ + com.google.protobuf.ByteString getDeploymentBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Deployment.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Deployment.java new file mode 100644 index 000000000..c1502b7e2 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Deployment.java @@ -0,0 +1,3066 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Represents an deployment in an environment. A deployment happens when a flow
+ * version configured to be active in the environment. You can configure running
+ * pre-deployment steps, e.g. running validation test cases, experiment
+ * auto-rollout, etc.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Deployment} + */ +public final class Deployment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Deployment) + DeploymentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Deployment.newBuilder() to construct. + private Deployment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Deployment() { + name_ = ""; + flowVersion_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Deployment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Deployment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + flowVersion_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 34: + { + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(result_); + result_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.class, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder.class); + } + + /** + * + * + *
+   * The state of the deployment.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Deployment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The deployment is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + * + * + *
+     * The deployment succeeded.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + * + * + *
+     * The deployment failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The deployment is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + * + * + *
+     * The deployment succeeded.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + * + * + *
+     * The deployment failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return RUNNING; + case 2: + return SUCCEEDED; + case 3: + return FAILED; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.Deployment.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Deployment.State) + } + + public interface ResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Deployment.Result) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Results of test cases running before the deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @return A list containing the deploymentTestResults. + */ + java.util.List getDeploymentTestResultsList(); + /** + * + * + *
+     * Results of test cases running before the deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @return The count of deploymentTestResults. + */ + int getDeploymentTestResultsCount(); + /** + * + * + *
+     * Results of test cases running before the deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The deploymentTestResults at the given index. + */ + java.lang.String getDeploymentTestResults(int index); + /** + * + * + *
+     * Results of test cases running before the deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the deploymentTestResults at the given index. + */ + com.google.protobuf.ByteString getDeploymentTestResultsBytes(int index); + + /** + * + * + *
+     * The name of the experiment triggered by this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+     * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The experiment. + */ + java.lang.String getExperiment(); + /** + * + * + *
+     * The name of the experiment triggered by this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+     * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for experiment. + */ + com.google.protobuf.ByteString getExperimentBytes(); + } + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Deployment.Result} + */ + public static final class Result extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Deployment.Result) + ResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use Result.newBuilder() to construct. + private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Result() { + deploymentTestResults_ = com.google.protobuf.LazyStringArrayList.EMPTY; + experiment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Result(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Result( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deploymentTestResults_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deploymentTestResults_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + experiment_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deploymentTestResults_ = deploymentTestResults_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.class, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.Builder.class); + } + + public static final int DEPLOYMENT_TEST_RESULTS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList deploymentTestResults_; + /** + * + * + *
+     * Results of test cases running before the deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @return A list containing the deploymentTestResults. + */ + public com.google.protobuf.ProtocolStringList getDeploymentTestResultsList() { + return deploymentTestResults_; + } + /** + * + * + *
+     * Results of test cases running before the deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @return The count of deploymentTestResults. + */ + public int getDeploymentTestResultsCount() { + return deploymentTestResults_.size(); + } + /** + * + * + *
+     * Results of test cases running before the deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The deploymentTestResults at the given index. + */ + public java.lang.String getDeploymentTestResults(int index) { + return deploymentTestResults_.get(index); + } + /** + * + * + *
+     * Results of test cases running before the deployment.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+     * 
+ * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the deploymentTestResults at the given index. + */ + public com.google.protobuf.ByteString getDeploymentTestResultsBytes(int index) { + return deploymentTestResults_.getByteString(index); + } + + public static final int EXPERIMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object experiment_; + /** + * + * + *
+     * The name of the experiment triggered by this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+     * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The experiment. + */ + @java.lang.Override + public java.lang.String getExperiment() { + java.lang.Object ref = experiment_; + 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(); + experiment_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the experiment triggered by this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+     * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for experiment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExperimentBytes() { + java.lang.Object ref = experiment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + experiment_ = 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 < deploymentTestResults_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, deploymentTestResults_.getRaw(i)); + } + if (!getExperimentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, experiment_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < deploymentTestResults_.size(); i++) { + dataSize += computeStringSizeNoTag(deploymentTestResults_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeploymentTestResultsList().size(); + } + if (!getExperimentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, experiment_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result other = + (com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result) obj; + + if (!getDeploymentTestResultsList().equals(other.getDeploymentTestResultsList())) + return false; + if (!getExperiment().equals(other.getExperiment())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeploymentTestResultsCount() > 0) { + hash = (37 * hash) + DEPLOYMENT_TEST_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentTestResultsList().hashCode(); + } + hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; + hash = (53 * hash) + getExperiment().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result 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; + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Deployment.Result} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Deployment.Result) + com.google.cloud.dialogflow.cx.v3beta1.Deployment.ResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.class, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + deploymentTestResults_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + experiment_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result build() { + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = + new com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + deploymentTestResults_ = deploymentTestResults_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deploymentTestResults_ = deploymentTestResults_; + result.experiment_ = experiment_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.getDefaultInstance()) + return this; + if (!other.deploymentTestResults_.isEmpty()) { + if (deploymentTestResults_.isEmpty()) { + deploymentTestResults_ = other.deploymentTestResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeploymentTestResultsIsMutable(); + deploymentTestResults_.addAll(other.deploymentTestResults_); + } + onChanged(); + } + if (!other.getExperiment().isEmpty()) { + experiment_ = other.experiment_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList deploymentTestResults_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDeploymentTestResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deploymentTestResults_ = + new com.google.protobuf.LazyStringArrayList(deploymentTestResults_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @return A list containing the deploymentTestResults. + */ + public com.google.protobuf.ProtocolStringList getDeploymentTestResultsList() { + return deploymentTestResults_.getUnmodifiableView(); + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @return The count of deploymentTestResults. + */ + public int getDeploymentTestResultsCount() { + return deploymentTestResults_.size(); + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The deploymentTestResults at the given index. + */ + public java.lang.String getDeploymentTestResults(int index) { + return deploymentTestResults_.get(index); + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the deploymentTestResults at the given index. + */ + public com.google.protobuf.ByteString getDeploymentTestResultsBytes(int index) { + return deploymentTestResults_.getByteString(index); + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The deploymentTestResults to set. + * @return This builder for chaining. + */ + public Builder setDeploymentTestResults(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentTestResultsIsMutable(); + deploymentTestResults_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param value The deploymentTestResults to add. + * @return This builder for chaining. + */ + public Builder addDeploymentTestResults(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentTestResultsIsMutable(); + deploymentTestResults_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param values The deploymentTestResults to add. + * @return This builder for chaining. + */ + public Builder addAllDeploymentTestResults(java.lang.Iterable values) { + ensureDeploymentTestResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deploymentTestResults_); + onChanged(); + return this; + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDeploymentTestResults() { + deploymentTestResults_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Results of test cases running before the deployment.
+       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
+       * 
+ * + * + * repeated string deployment_test_results = 1 [(.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the deploymentTestResults to add. + * @return This builder for chaining. + */ + public Builder addDeploymentTestResultsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeploymentTestResultsIsMutable(); + deploymentTestResults_.add(value); + onChanged(); + return this; + } + + private java.lang.Object experiment_ = ""; + /** + * + * + *
+       * The name of the experiment triggered by this deployment.
+       * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+       * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The experiment. + */ + public java.lang.String getExperiment() { + java.lang.Object ref = experiment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + experiment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the experiment triggered by this deployment.
+       * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+       * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for experiment. + */ + public com.google.protobuf.ByteString getExperimentBytes() { + java.lang.Object ref = experiment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + experiment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the experiment triggered by this deployment.
+       * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+       * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The experiment to set. + * @return This builder for chaining. + */ + public Builder setExperiment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + experiment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the experiment triggered by this deployment.
+       * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+       * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearExperiment() { + + experiment_ = getDefaultInstance().getExperiment(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the experiment triggered by this deployment.
+       * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/environments/<Environment ID>/experiments/<Experiment ID>.
+       * 
+ * + * string experiment = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for experiment to set. + * @return This builder for chaining. + */ + public Builder setExperimentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + experiment_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Deployment.Result) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Deployment.Result) + private static final com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Result parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Result(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of the deployment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/deployments/<Deployment 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 name of the deployment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/deployments/<Deployment 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 FLOW_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object flowVersion_; + /** + * + * + *
+   * The name of the flow version for this deployment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Verion ID>.
+   * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flowVersion. + */ + @java.lang.Override + public java.lang.String getFlowVersion() { + java.lang.Object ref = flowVersion_; + 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(); + flowVersion_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the flow version for this deployment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Verion ID>.
+   * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flowVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFlowVersionBytes() { + java.lang.Object ref = flowVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flowVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + * + * + *
+   * The current state of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The current state of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.Deployment.State result = + com.google.cloud.dialogflow.cx.v3beta1.Deployment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Deployment.State.UNRECOGNIZED + : result; + } + + public static final int RESULT_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result result_; + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result getResult() { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.ResultOrBuilder getResultOrBuilder() { + return getResult(); + } + + public static final int START_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Start time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Start time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Start time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * End time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * End time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * End time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getFlowVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, flowVersion_); + } + if (state_ + != com.google.cloud.dialogflow.cx.v3beta1.Deployment.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (result_ != null) { + output.writeMessage(4, getResult()); + } + if (startTime_ != null) { + output.writeMessage(5, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(6, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getFlowVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, flowVersion_); + } + if (state_ + != com.google.cloud.dialogflow.cx.v3beta1.Deployment.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getResult()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Deployment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Deployment other = + (com.google.cloud.dialogflow.cx.v3beta1.Deployment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getFlowVersion().equals(other.getFlowVersion())) return false; + if (state_ != other.state_) return false; + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + FLOW_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getFlowVersion().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.Deployment 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 an deployment in an environment. A deployment happens when a flow
+   * version configured to be active in the environment. You can configure running
+   * pre-deployment steps, e.g. running validation test cases, experiment
+   * auto-rollout, etc.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Deployment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Deployment) + com.google.cloud.dialogflow.cx.v3beta1.DeploymentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.class, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Deployment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + flowVersion_ = ""; + + state_ = 0; + + if (resultBuilder_ == null) { + result_ = null; + } else { + result_ = null; + resultBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Deployment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment build() { + com.google.cloud.dialogflow.cx.v3beta1.Deployment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Deployment result = + new com.google.cloud.dialogflow.cx.v3beta1.Deployment(this); + result.name_ = name_; + result.flowVersion_ = flowVersion_; + result.state_ = state_; + if (resultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = resultBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Deployment) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Deployment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Deployment other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Deployment.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getFlowVersion().isEmpty()) { + flowVersion_ = other.flowVersion_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasResult()) { + mergeResult(other.getResult()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.cx.v3beta1.Deployment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Deployment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment 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 name of the deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment 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 name of the deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment 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; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment ID>.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment 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; + onChanged(); + return this; + } + + private java.lang.Object flowVersion_ = ""; + /** + * + * + *
+     * The name of the flow version for this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Verion ID>.
+     * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flowVersion. + */ + public java.lang.String getFlowVersion() { + java.lang.Object ref = flowVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flowVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the flow version for this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Verion ID>.
+     * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flowVersion. + */ + public com.google.protobuf.ByteString getFlowVersionBytes() { + java.lang.Object ref = flowVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flowVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the flow version for this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Verion ID>.
+     * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The flowVersion to set. + * @return This builder for chaining. + */ + public Builder setFlowVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + flowVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the flow version for this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Verion ID>.
+     * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearFlowVersion() { + + flowVersion_ = getDefaultInstance().getFlowVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the flow version for this deployment.
+     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Verion ID>.
+     * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for flowVersion to set. + * @return This builder for chaining. + */ + public Builder setFlowVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + flowVersion_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The current state of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current state of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.Deployment.State result = + com.google.cloud.dialogflow.cx.v3beta1.Deployment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Deployment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The current state of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.dialogflow.cx.v3beta1.Deployment.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.ResultOrBuilder> + resultBuilder_; + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return resultBuilder_ != null || result_ != null; + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + * + * @return The result. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + public Builder setResult(com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + public Builder setResult( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + public Builder mergeResult(com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.newBuilder(result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + resultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + result_ = null; + onChanged(); + } else { + result_ = null; + resultBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.ResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.ResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.ResultOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Start time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * End time of this deployment.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Deployment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Deployment) + private static final com.google.cloud.dialogflow.cx.v3beta1.Deployment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Deployment(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Deployment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Deployment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Deployment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentName.java new file mode 100644 index 000000000..f32ab0db7 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +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 DeploymentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_ENVIRONMENT_DEPLOYMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String environment; + private final String deployment; + + @Deprecated + protected DeploymentName() { + project = null; + location = null; + agent = null; + environment = null; + deployment = null; + } + + private DeploymentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + deployment = Preconditions.checkNotNull(builder.getDeployment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getEnvironment() { + return environment; + } + + public String getDeployment() { + return deployment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DeploymentName of( + String project, String location, String agent, String environment, String deployment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setEnvironment(environment) + .setDeployment(deployment) + .build(); + } + + public static String format( + String project, String location, String agent, String environment, String deployment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setEnvironment(environment) + .setDeployment(deployment) + .build() + .toString(); + } + + public static DeploymentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_ENVIRONMENT_DEPLOYMENT.validatedMatch( + formattedString, "DeploymentName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("environment"), + matchMap.get("deployment")); + } + + 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 (DeploymentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_ENVIRONMENT_DEPLOYMENT.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 (environment != null) { + fieldMapBuilder.put("environment", environment); + } + if (deployment != null) { + fieldMapBuilder.put("deployment", deployment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_ENVIRONMENT_DEPLOYMENT.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "environment", + environment, + "deployment", + deployment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DeploymentName that = ((DeploymentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.environment, that.environment) + && Objects.equals(this.deployment, that.deployment); + } + 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(environment); + h *= 1000003; + h ^= Objects.hashCode(deployment); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String environment; + private String deployment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getEnvironment() { + return environment; + } + + public String getDeployment() { + return deployment; + } + + 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 setEnvironment(String environment) { + this.environment = environment; + return this; + } + + public Builder setDeployment(String deployment) { + this.deployment = deployment; + return this; + } + + private Builder(DeploymentName deploymentName) { + this.project = deploymentName.project; + this.location = deploymentName.location; + this.agent = deploymentName.agent; + this.environment = deploymentName.environment; + this.deployment = deploymentName.deployment; + } + + public DeploymentName build() { + return new DeploymentName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentOrBuilder.java new file mode 100644 index 000000000..eed7c1d96 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentOrBuilder.java @@ -0,0 +1,213 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeploymentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Deployment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the deployment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/deployments/<Deployment ID>.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the deployment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/deployments/<Deployment ID>.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The name of the flow version for this deployment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Verion ID>.
+   * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The flowVersion. + */ + java.lang.String getFlowVersion(); + /** + * + * + *
+   * The name of the flow version for this deployment.
+   * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Verion ID>.
+   * 
+ * + * string flow_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for flowVersion. + */ + com.google.protobuf.ByteString getFlowVersionBytes(); + + /** + * + * + *
+   * The current state of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The current state of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.State state = 3; + * + * @return The state. + */ + com.google.cloud.dialogflow.cx.v3beta1.Deployment.State getState(); + + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + * + * @return The result. + */ + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Result getResult(); + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Deployment.Result result = 4; + */ + com.google.cloud.dialogflow.cx.v3beta1.Deployment.ResultOrBuilder getResultOrBuilder(); + + /** + * + * + *
+   * Start time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Start time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Start time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * End time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * End time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * End time of this deployment.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentProto.java new file mode 100644 index 000000000..352be4aa4 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentProto.java @@ -0,0 +1,189 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class DeploymentProto { + private DeploymentProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/dialogflow/cx/v3beta1/dep" + + "loyment.proto\022\"google.cloud.dialogflow.c" + + "x.v3beta1\032\034google/api/annotations.proto\032" + + "\027google/api/client.proto\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\032\033google/protobuf/empty.proto\032 googl" + + "e/protobuf/field_mask.proto\032\037google/prot" + + "obuf/timestamp.proto\"\275\005\n\nDeployment\022\014\n\004n" + + "ame\030\001 \001(\t\022<\n\014flow_version\030\002 \001(\tB&\372A#\n!di" + + "alogflow.googleapis.com/Version\022C\n\005state" + + "\030\003 \001(\01624.google.cloud.dialogflow.cx.v3be" + + "ta1.Deployment.State\022E\n\006result\030\004 \001(\01325.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Deploy" + + "ment.Result\022.\n\nstart_time\030\005 \001(\0132\032.google" + + ".protobuf.Timestamp\022,\n\010end_time\030\006 \001(\0132\032." + + "google.protobuf.Timestamp\032\227\001\n\006Result\022N\n\027" + + "deployment_test_results\030\001 \003(\tB-\372A*\n(dial" + + "ogflow.googleapis.com/TestCaseResult\022=\n\n" + + "experiment\030\002 \001(\tB)\372A&\n$dialogflow.google" + + "apis.com/Experiment\"F\n\005State\022\025\n\021STATE_UN" + + "SPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002\022" + + "\n\n\006FAILED\020\003:\226\001\352A\222\001\n$dialogflow.googleapi" + + "s.com/Deployment\022jprojects/{project}/loc" + + "ations/{location}/agents/{agent}/environ" + + "ments/{environment}/deployments/{deploym" + + "ent}\"}\n\026ListDeploymentsRequest\022<\n\006parent" + + "\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.googleapis.co" + + "m/Deployment\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" + + "token\030\003 \001(\t\"w\n\027ListDeploymentsResponse\022C" + + "\n\013deployments\030\001 \003(\0132..google.cloud.dialo" + + "gflow.cx.v3beta1.Deployment\022\027\n\017next_page" + + "_token\030\002 \001(\t\"R\n\024GetDeploymentRequest\022:\n\004" + + "name\030\001 \001(\tB,\340A\002\372A&\n$dialogflow.googleapi" + + "s.com/Deployment2\314\004\n\013Deployments\022\351\001\n\017Lis" + + "tDeployments\022:.google.cloud.dialogflow.c" + + "x.v3beta1.ListDeploymentsRequest\032;.googl" + + "e.cloud.dialogflow.cx.v3beta1.ListDeploy" + + "mentsResponse\"]\202\323\344\223\002N\022L/v3beta1/{parent=" + + "projects/*/locations/*/agents/*/environm" + + "ents/*}/deployments\332A\006parent\022\326\001\n\rGetDepl" + + "oyment\0228.google.cloud.dialogflow.cx.v3be" + + "ta1.GetDeploymentRequest\032..google.cloud." + + "dialogflow.cx.v3beta1.Deployment\"[\202\323\344\223\002N" + + "\022L/v3beta1/{name=projects/*/locations/*/" + + "agents/*/environments/*/deployments/*}\332A" + + "\004name\032x\312A\031dialogflow.googleapis.com\322AYht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "form,https://www.googleapis.com/auth/dia" + + "logflowB\327\001\n&com.google.cloud.dialogflow." + + "cx.v3beta1B\017DeploymentProtoP\001ZDgoogle.go" + + "lang.org/genproto/googleapis/cloud/dialo" + + "gflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google.Clo" + + "ud.Dialogflow.Cx.V3Beta1\352\002&Google::Cloud" + + "::Dialogflow::CX::V3beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_descriptor, + new java.lang.String[] { + "Name", "FlowVersion", "State", "Result", "StartTime", "EndTime", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Deployment_Result_descriptor, + new java.lang.String[] { + "DeploymentTestResults", "Experiment", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_descriptor, + new java.lang.String[] { + "Deployments", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + 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.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Environment.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Environment.java index f46512d9b..df003acf1 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Environment.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Environment.java @@ -131,6 +131,24 @@ private Environment( extensionRegistry)); break; } + case 58: + { + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.Builder + subBuilder = null; + if (testCasesConfig_ != null) { + subBuilder = testCasesConfig_.toBuilder(); + } + testCasesConfig_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testCasesConfig_); + testCasesConfig_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -683,98 +701,1146 @@ public Builder mergeFrom( return this; } - private java.lang.Object version_ = ""; + private java.lang.Object version_ = ""; + /** + * + * + *
+       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * 
+ * + * + * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * 
+ * + * + * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * 
+ * + * + * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * 
+ * + * + * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
+       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * 
+ * + * + * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TestCasesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A list of test case names to run. They should be under the same agent.
+     * Format of each test case name: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+     * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the testCases. + */ + java.util.List getTestCasesList(); + /** + * + * + *
+     * A list of test case names to run. They should be under the same agent.
+     * Format of each test case name: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+     * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of testCases. + */ + int getTestCasesCount(); + /** + * + * + *
+     * A list of test case names to run. They should be under the same agent.
+     * Format of each test case name: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+     * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + java.lang.String getTestCases(int index); + /** + * + * + *
+     * A list of test case names to run. They should be under the same agent.
+     * Format of each test case name: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+     * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + com.google.protobuf.ByteString getTestCasesBytes(int index); + + /** + * + * + *
+     * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] periodically.
+     * Default false. If set to true, run once a day.
+     * 
+ * + * bool enable_continuous_run = 2; + * + * @return The enableContinuousRun. + */ + boolean getEnableContinuousRun(); + + /** + * + * + *
+     * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] before
+     * deploying a flow version to the environment. Default false.
+     * 
+ * + * bool enable_predeployment_run = 3; + * + * @return The enablePredeploymentRun. + */ + boolean getEnablePredeploymentRun(); + } + /** + * + * + *
+   * The configuration for continuous tests.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig} + */ + public static final class TestCasesConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) + TestCasesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestCasesConfig.newBuilder() to construct. + private TestCasesConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestCasesConfig() { + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TestCasesConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestCasesConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + testCases_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + testCases_.add(s); + break; + } + case 16: + { + enableContinuousRun_ = input.readBool(); + break; + } + case 24: + { + enablePredeploymentRun_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + testCases_ = testCases_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.Builder.class); + } + + public static final int TEST_CASES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList testCases_; + /** + * + * + *
+     * A list of test case names to run. They should be under the same agent.
+     * Format of each test case name: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+     * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the testCases. + */ + public com.google.protobuf.ProtocolStringList getTestCasesList() { + return testCases_; + } + /** + * + * + *
+     * A list of test case names to run. They should be under the same agent.
+     * Format of each test case name: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+     * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of testCases. + */ + public int getTestCasesCount() { + return testCases_.size(); + } + /** + * + * + *
+     * A list of test case names to run. They should be under the same agent.
+     * Format of each test case name: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+     * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + public java.lang.String getTestCases(int index) { + return testCases_.get(index); + } + /** + * + * + *
+     * A list of test case names to run. They should be under the same agent.
+     * Format of each test case name: `projects/<Project ID>/locations/
+     * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+     * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + public com.google.protobuf.ByteString getTestCasesBytes(int index) { + return testCases_.getByteString(index); + } + + public static final int ENABLE_CONTINUOUS_RUN_FIELD_NUMBER = 2; + private boolean enableContinuousRun_; + /** + * + * + *
+     * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] periodically.
+     * Default false. If set to true, run once a day.
+     * 
+ * + * bool enable_continuous_run = 2; + * + * @return The enableContinuousRun. + */ + @java.lang.Override + public boolean getEnableContinuousRun() { + return enableContinuousRun_; + } + + public static final int ENABLE_PREDEPLOYMENT_RUN_FIELD_NUMBER = 3; + private boolean enablePredeploymentRun_; + /** + * + * + *
+     * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] before
+     * deploying a flow version to the environment. Default false.
+     * 
+ * + * bool enable_predeployment_run = 3; + * + * @return The enablePredeploymentRun. + */ + @java.lang.Override + public boolean getEnablePredeploymentRun() { + return enablePredeploymentRun_; + } + + 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 < testCases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, testCases_.getRaw(i)); + } + if (enableContinuousRun_ != false) { + output.writeBool(2, enableContinuousRun_); + } + if (enablePredeploymentRun_ != false) { + output.writeBool(3, enablePredeploymentRun_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < testCases_.size(); i++) { + dataSize += computeStringSizeNoTag(testCases_.getRaw(i)); + } + size += dataSize; + size += 1 * getTestCasesList().size(); + } + if (enableContinuousRun_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableContinuousRun_); + } + if (enablePredeploymentRun_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enablePredeploymentRun_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig other = + (com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) obj; + + if (!getTestCasesList().equals(other.getTestCasesList())) return false; + if (getEnableContinuousRun() != other.getEnableContinuousRun()) return false; + if (getEnablePredeploymentRun() != other.getEnablePredeploymentRun()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTestCasesCount() > 0) { + hash = (37 * hash) + TEST_CASES_FIELD_NUMBER; + hash = (53 * hash) + getTestCasesList().hashCode(); + } + hash = (37 * hash) + ENABLE_CONTINUOUS_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableContinuousRun()); + hash = (37 * hash) + ENABLE_PREDEPLOYMENT_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePredeploymentRun()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig 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 configuration for continuous tests.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + enableContinuousRun_ = false; + + enablePredeploymentRun_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig build() { + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig result = + new com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + testCases_ = testCases_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.testCases_ = testCases_; + result.enableContinuousRun_ = enableContinuousRun_; + result.enablePredeploymentRun_ = enablePredeploymentRun_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + .getDefaultInstance()) return this; + if (!other.testCases_.isEmpty()) { + if (testCases_.isEmpty()) { + testCases_ = other.testCases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestCasesIsMutable(); + testCases_.addAll(other.testCases_); + } + onChanged(); + } + if (other.getEnableContinuousRun() != false) { + setEnableContinuousRun(other.getEnableContinuousRun()); + } + if (other.getEnablePredeploymentRun() != false) { + setEnablePredeploymentRun(other.getEnablePredeploymentRun()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList testCases_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTestCasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + testCases_ = new com.google.protobuf.LazyStringArrayList(testCases_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the testCases. + */ + public com.google.protobuf.ProtocolStringList getTestCasesList() { + return testCases_.getUnmodifiableView(); + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of testCases. + */ + public int getTestCasesCount() { + return testCases_.size(); + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The testCases at the given index. + */ + public java.lang.String getTestCases(int index) { + return testCases_.get(index); + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the testCases at the given index. + */ + public com.google.protobuf.ByteString getTestCasesBytes(int index) { + return testCases_.getByteString(index); + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The testCases to set. + * @return This builder for chaining. + */ + public Builder setTestCases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The testCases to add. + * @return This builder for chaining. + */ + public Builder addTestCases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCasesIsMutable(); + testCases_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param values The testCases to add. + * @return This builder for chaining. + */ + public Builder addAllTestCases(java.lang.Iterable values) { + ensureTestCasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCases_); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTestCases() { + testCases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of test case names to run. They should be under the same agent.
+       * Format of each test case name: `projects/<Project ID>/locations/
+       * <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`
+       * 
+ * + * repeated string test_cases = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the testCases to add. + * @return This builder for chaining. + */ + public Builder addTestCasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTestCasesIsMutable(); + testCases_.add(value); + onChanged(); + return this; + } + + private boolean enableContinuousRun_; /** * * *
-       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] periodically.
+       * Default false. If set to true, run once a day.
        * 
* - * - * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * bool enable_continuous_run = 2; * - * @return The version. + * @return The enableContinuousRun. */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public boolean getEnableContinuousRun() { + return enableContinuousRun_; } /** * * *
-       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] periodically.
+       * Default false. If set to true, run once a day.
        * 
* - * - * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * bool enable_continuous_run = 2; * - * @return The bytes for version. + * @param value The enableContinuousRun to set. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setEnableContinuousRun(boolean value) { + + enableContinuousRun_ = value; + onChanged(); + return this; } /** * * *
-       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] periodically.
+       * Default false. If set to true, run once a day.
        * 
* - * - * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * bool enable_continuous_run = 2; * - * @param value The version to set. * @return This builder for chaining. */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder clearEnableContinuousRun() { - version_ = value; + enableContinuousRun_ = false; onChanged(); return this; } + + private boolean enablePredeploymentRun_; /** * * *
-       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] before
+       * deploying a flow version to the environment. Default false.
        * 
* - * - * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * bool enable_predeployment_run = 3; + * + * @return The enablePredeploymentRun. + */ + @java.lang.Override + public boolean getEnablePredeploymentRun() { + return enablePredeploymentRun_; + } + /** * + * + *
+       * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] before
+       * deploying a flow version to the environment. Default false.
+       * 
+ * + * bool enable_predeployment_run = 3; + * + * @param value The enablePredeploymentRun to set. * @return This builder for chaining. */ - public Builder clearVersion() { + public Builder setEnablePredeploymentRun(boolean value) { - version_ = getDefaultInstance().getVersion(); + enablePredeploymentRun_ = value; onChanged(); return this; } @@ -782,24 +1848,17 @@ public Builder clearVersion() { * * *
-       * Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
-       * ID>/flows/<Flow ID>/versions/<Version ID>.
+       * Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] before
+       * deploying a flow version to the environment. Default false.
        * 
* - * - * string version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * bool enable_predeployment_run = 3; * - * @param value The bytes for version to set. * @return This builder for chaining. */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + public Builder clearEnablePredeploymentRun() { - version_ = value; + enablePredeploymentRun_ = false; onChanged(); return this; } @@ -816,44 +1875,44 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig) - private static final com.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig(); } - public static com.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + public static com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig 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 VersionConfig parsePartialFrom( + public TestCasesConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VersionConfig(input, extensionRegistry); + return new TestCasesConfig(input, extensionRegistry); } }; - 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.v3beta1.Environment.VersionConfig + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -1162,6 +2221,58 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } + public static final int TEST_CASES_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig testCasesConfig_; + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + * + * @return Whether the testCasesConfig field is set. + */ + @java.lang.Override + public boolean hasTestCasesConfig() { + return testCasesConfig_ != null; + } + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + * + * @return The testCasesConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig getTestCasesConfig() { + return testCasesConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.getDefaultInstance() + : testCasesConfig_; + } + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfigOrBuilder + getTestCasesConfigOrBuilder() { + return getTestCasesConfig(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1191,6 +2302,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < versionConfigs_.size(); i++) { output.writeMessage(6, versionConfigs_.get(i)); } + if (testCasesConfig_ != null) { + output.writeMessage(7, getTestCasesConfig()); + } unknownFields.writeTo(output); } @@ -1215,6 +2329,9 @@ public int getSerializedSize() { for (int i = 0; i < versionConfigs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, versionConfigs_.get(i)); } + if (testCasesConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTestCasesConfig()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1239,6 +2356,10 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } + if (hasTestCasesConfig() != other.hasTestCasesConfig()) return false; + if (hasTestCasesConfig()) { + if (!getTestCasesConfig().equals(other.getTestCasesConfig())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1264,6 +2385,10 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } + if (hasTestCasesConfig()) { + hash = (37 * hash) + TEST_CASES_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTestCasesConfig().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1436,6 +2561,12 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } + if (testCasesConfigBuilder_ == null) { + testCasesConfig_ = null; + } else { + testCasesConfig_ = null; + testCasesConfigBuilder_ = null; + } return this; } @@ -1481,6 +2612,11 @@ public com.google.cloud.dialogflow.cx.v3beta1.Environment buildPartial() { } else { result.updateTime_ = updateTimeBuilder_.build(); } + if (testCasesConfigBuilder_ == null) { + result.testCasesConfig_ = testCasesConfig_; + } else { + result.testCasesConfig_ = testCasesConfigBuilder_.build(); + } onBuilt(); return result; } @@ -1573,6 +2709,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Environment othe if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } + if (other.hasTestCasesConfig()) { + mergeTestCasesConfig(other.getTestCasesConfig()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2608,6 +3747,209 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTimeBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig testCasesConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig, + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfigOrBuilder> + testCasesConfigBuilder_; + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + * + * @return Whether the testCasesConfig field is set. + */ + public boolean hasTestCasesConfig() { + return testCasesConfigBuilder_ != null || testCasesConfig_ != null; + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + * + * @return The testCasesConfig. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig getTestCasesConfig() { + if (testCasesConfigBuilder_ == null) { + return testCasesConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + .getDefaultInstance() + : testCasesConfig_; + } else { + return testCasesConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public Builder setTestCasesConfig( + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig value) { + if (testCasesConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testCasesConfig_ = value; + onChanged(); + } else { + testCasesConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public Builder setTestCasesConfig( + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.Builder + builderForValue) { + if (testCasesConfigBuilder_ == null) { + testCasesConfig_ = builderForValue.build(); + onChanged(); + } else { + testCasesConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public Builder mergeTestCasesConfig( + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig value) { + if (testCasesConfigBuilder_ == null) { + if (testCasesConfig_ != null) { + testCasesConfig_ = + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.newBuilder( + testCasesConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + testCasesConfig_ = value; + } + onChanged(); + } else { + testCasesConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public Builder clearTestCasesConfig() { + if (testCasesConfigBuilder_ == null) { + testCasesConfig_ = null; + onChanged(); + } else { + testCasesConfig_ = null; + testCasesConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.Builder + getTestCasesConfigBuilder() { + + onChanged(); + return getTestCasesConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfigOrBuilder + getTestCasesConfigOrBuilder() { + if (testCasesConfigBuilder_ != null) { + return testCasesConfigBuilder_.getMessageOrBuilder(); + } else { + return testCasesConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + .getDefaultInstance() + : testCasesConfig_; + } + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig, + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfigOrBuilder> + getTestCasesConfigFieldBuilder() { + if (testCasesConfigBuilder_ == null) { + testCasesConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig, + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfigOrBuilder>( + getTestCasesConfig(), getParentForChildren(), isClean()); + testCasesConfig_ = null; + } + return testCasesConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentOrBuilder.java index d90706d1c..357c633c2 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentOrBuilder.java @@ -223,4 +223,43 @@ public interface EnvironmentOrBuilder * */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + * + * @return Whether the testCasesConfig field is set. + */ + boolean hasTestCasesConfig(); + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + * + * @return The testCasesConfig. + */ + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig getTestCasesConfig(); + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig test_cases_config = 7; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfigOrBuilder + getTestCasesConfigOrBuilder(); } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentProto.java index c748a0bd3..8b2a267d7 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentProto.java @@ -35,6 +35,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_VersionConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_VersionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_ListEnvironmentsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -91,6 +95,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -109,131 +125,151 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "1/test_case.proto\032#google/longrunning/op" + "erations.proto\032\033google/protobuf/empty.pr" + "oto\032 google/protobuf/field_mask.proto\032\037g" - + "oogle/protobuf/timestamp.proto\"\252\003\n\013Envir" + + "oogle/protobuf/timestamp.proto\"\230\005\n\013Envir" + "onment\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001" + "(\tB\003\340A\002\022\023\n\013description\030\003 \001(\t\022[\n\017version_" + "configs\030\006 \003(\0132=.google.cloud.dialogflow." + "cx.v3beta1.Environment.VersionConfigB\003\340A" + "\002\0224\n\013update_time\030\005 \001(\0132\032.google.protobuf" - + ".TimestampB\003\340A\003\032K\n\rVersionConfig\022:\n\007vers" - + "ion\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis" - + ".com/Version:}\352Az\n%dialogflow.googleapis" - + ".com/Environment\022Qprojects/{project}/loc" - + "ations/{location}/agents/{agent}/environ" - + "ments/{environment}\"\177\n\027ListEnvironmentsR" - + "equest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%dialogfl" - + "ow.googleapis.com/Environment\022\021\n\tpage_si" - + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"z\n\030ListEnvi" - + "ronmentsResponse\022E\n\014environments\030\001 \003(\0132/" - + ".google.cloud.dialogflow.cx.v3beta1.Envi" - + "ronment\022\027\n\017next_page_token\030\002 \001(\t\"T\n\025GetE" - + "nvironmentRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n" - + "%dialogflow.googleapis.com/Environment\"\244" - + "\001\n\030CreateEnvironmentRequest\022=\n\006parent\030\001 " - + "\001(\tB-\340A\002\372A\'\022%dialogflow.googleapis.com/E" - + "nvironment\022I\n\013environment\030\002 \001(\0132/.google" - + ".cloud.dialogflow.cx.v3beta1.Environment" - + "B\003\340A\002\"\233\001\n\030UpdateEnvironmentRequest\022I\n\013en" - + "vironment\030\001 \001(\0132/.google.cloud.dialogflo" - + "w.cx.v3beta1.EnvironmentB\003\340A\002\0224\n\013update_" - + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003" - + "\340A\002\"W\n\030DeleteEnvironmentRequest\022;\n\004name\030" - + "\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.com" - + "/Environment\"\205\001\n\037LookupEnvironmentHistor" - + "yRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dialogfl" - + "ow.googleapis.com/Environment\022\021\n\tpage_si" - + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\202\001\n LookupE" - + "nvironmentHistoryResponse\022E\n\014environment" - + "s\030\001 \003(\0132/.google.cloud.dialogflow.cx.v3b" - + "eta1.Environment\022\027\n\017next_page_token\030\002 \001(" - + "\t\"\215\004\n\024ContinuousTestResult\022\014\n\004name\030\001 \001(\t" - + "\022]\n\006result\030\002 \001(\0162M.google.cloud.dialogfl" - + "ow.cx.v3beta1.ContinuousTestResult.Aggre" - + "gatedTestResult\022H\n\021test_case_results\030\003 \003" - + "(\tB-\372A*\n(dialogflow.googleapis.com/TestC" - + "aseResult\022,\n\010run_time\030\004 \001(\0132\032.google.pro" - + "tobuf.Timestamp\"V\n\024AggregatedTestResult\022" - + "&\n\"AGGREGATED_TEST_RESULT_UNSPECIFIED\020\000\022" - + "\n\n\006PASSED\020\001\022\n\n\006FAILED\020\002:\267\001\352A\263\001\n.dialogfl" - + "ow.googleapis.com/ContinuousTestResult\022\200" - + "\001projects/{project}/locations/{location}" - + "/agents/{agent}/environments/{environmen" - + "t}/continuousTestResults/{continuous_tes" - + "t_result}\"^\n\030RunContinuousTestRequest\022B\n" - + "\013environment\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.g" - + "oogleapis.com/Environment\"u\n\031RunContinuo" - + "usTestResponse\022X\n\026continuous_test_result" - + "\030\001 \001(\01328.google.cloud.dialogflow.cx.v3be" - + "ta1.ContinuousTestResult\"Z\n\031RunContinuou" - + "sTestMetadata\022=\n\006errors\030\001 \003(\0132-.google.c" - + "loud.dialogflow.cx.v3beta1.TestError\"\221\001\n" - + " ListContinuousTestResultsRequest\022F\n\006par" - + "ent\030\001 \001(\tB6\340A\002\372A0\022.dialogflow.googleapis" - + ".com/ContinuousTestResult\022\021\n\tpage_size\030\002" - + " \001(\005\022\022\n\npage_token\030\003 \001(\t\"\227\001\n!ListContinu" - + "ousTestResultsResponse\022Y\n\027continuous_tes" - + "t_results\030\001 \003(\01328.google.cloud.dialogflo" - + "w.cx.v3beta1.ContinuousTestResult\022\027\n\017nex" - + "t_page_token\030\002 \001(\t2\304\020\n\014Environments\022\336\001\n\020" - + "ListEnvironments\022;.google.cloud.dialogfl" - + "ow.cx.v3beta1.ListEnvironmentsRequest\032<." - + "google.cloud.dialogflow.cx.v3beta1.ListE" - + "nvironmentsResponse\"O\202\323\344\223\002@\022>/v3beta1/{p" - + "arent=projects/*/locations/*/agents/*}/e" - + "nvironments\332A\006parent\022\313\001\n\016GetEnvironment\022" - + "9.google.cloud.dialogflow.cx.v3beta1.Get" - + "EnvironmentRequest\032/.google.cloud.dialog" - + "flow.cx.v3beta1.Environment\"M\202\323\344\223\002@\022>/v3" - + "beta1/{name=projects/*/locations/*/agent" - + "s/*/environments/*}\332A\004name\022\203\002\n\021CreateEnv" - + "ironment\022<.google.cloud.dialogflow.cx.v3" - + "beta1.CreateEnvironmentRequest\032\035.google." - + "longrunning.Operation\"\220\001\202\323\344\223\002M\">/v3beta1" - + "/{parent=projects/*/locations/*/agents/*" - + "}/environments:\013environment\332A\022parent,env" - + "ironment\312A%\n\013Environment\022\026google.protobu" - + "f.Struct\022\224\002\n\021UpdateEnvironment\022<.google." - + "cloud.dialogflow.cx.v3beta1.UpdateEnviro" - + "nmentRequest\032\035.google.longrunning.Operat" - + "ion\"\241\001\202\323\344\223\002Y2J/v3beta1/{environment.name" - + "=projects/*/locations/*/agents/*/environ" - + "ments/*}:\013environment\332A\027environment,upda" - + "te_mask\312A%\n\013Environment\022\026google.protobuf" - + ".Struct\022\270\001\n\021DeleteEnvironment\022<.google.c" - + "loud.dialogflow.cx.v3beta1.DeleteEnviron" - + "mentRequest\032\026.google.protobuf.Empty\"M\202\323\344" - + "\223\002@*>/v3beta1/{name=projects/*/locations" - + "/*/agents/*/environments/*}\332A\004name\022\215\002\n\030L" - + "ookupEnvironmentHistory\022C.google.cloud.d" - + "ialogflow.cx.v3beta1.LookupEnvironmentHi" - + "storyRequest\032D.google.cloud.dialogflow.c" - + "x.v3beta1.LookupEnvironmentHistoryRespon" - + "se\"f\202\323\344\223\002Y\022W/v3beta1/{name=projects/*/lo" - + "cations/*/agents/*/environments/*}:looku" - + "pEnvironmentHistory\332A\004name\022\216\002\n\021RunContin" - + "uousTest\022<.google.cloud.dialogflow.cx.v3" - + "beta1.RunContinuousTestRequest\032\035.google." - + "longrunning.Operation\"\233\001\202\323\344\223\002\\\"W/v3beta1" - + "/{environment=projects/*/locations/*/age" - + "nts/*/environments/*}:runContinuousTest:" - + "\001*\312A6\n\031RunContinuousTestResponse\022\031RunCon" - + "tinuousTestMetadata\022\221\002\n\031ListContinuousTe" - + "stResults\022D.google.cloud.dialogflow.cx.v" - + "3beta1.ListContinuousTestResultsRequest\032" - + "E.google.cloud.dialogflow.cx.v3beta1.Lis" - + "tContinuousTestResultsResponse\"g\202\323\344\223\002X\022V" - + "/v3beta1/{parent=projects/*/locations/*/" - + "agents/*/environments/*}/continuousTestR" - + "esults\332A\006parent\032x\312A\031dialogflow.googleapi" - + "s.com\322AYhttps://www.googleapis.com/auth/" - + "cloud-platform,https://www.googleapis.co" - + "m/auth/dialogflowB\330\001\n&com.google.cloud.d" - + "ialogflow.cx.v3beta1B\020EnvironmentProtoP\001" - + "ZDgoogle.golang.org/genproto/googleapis/" - + "cloud/dialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002" - + "\"Google.Cloud.Dialogflow.Cx.V3Beta1\352\002&Go" - + "ogle::Cloud::Dialogflow::CX::V3beta1b\006pr" - + "oto3" + + ".TimestampB\003\340A\003\022Z\n\021test_cases_config\030\007 \001" + + "(\0132?.google.cloud.dialogflow.cx.v3beta1." + + "Environment.TestCasesConfig\032K\n\rVersionCo" + + "nfig\022:\n\007version\030\001 \001(\tB)\340A\002\372A#\n!dialogflo" + + "w.googleapis.com/Version\032\217\001\n\017TestCasesCo" + + "nfig\022;\n\ntest_cases\030\001 \003(\tB\'\372A$\n\"dialogflo" + + "w.googleapis.com/TestCase\022\035\n\025enable_cont" + + "inuous_run\030\002 \001(\010\022 \n\030enable_predeployment" + + "_run\030\003 \001(\010:}\352Az\n%dialogflow.googleapis.c" + + "om/Environment\022Qprojects/{project}/locat" + + "ions/{location}/agents/{agent}/environme" + + "nts/{environment}\"\177\n\027ListEnvironmentsReq" + + "uest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%dialogflow" + + ".googleapis.com/Environment\022\021\n\tpage_size" + + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"z\n\030ListEnviro" + + "nmentsResponse\022E\n\014environments\030\001 \003(\0132/.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Enviro" + + "nment\022\027\n\017next_page_token\030\002 \001(\t\"T\n\025GetEnv" + + "ironmentRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%d" + + "ialogflow.googleapis.com/Environment\"\244\001\n" + + "\030CreateEnvironmentRequest\022=\n\006parent\030\001 \001(" + + "\tB-\340A\002\372A\'\022%dialogflow.googleapis.com/Env" + + "ironment\022I\n\013environment\030\002 \001(\0132/.google.c" + + "loud.dialogflow.cx.v3beta1.EnvironmentB\003" + + "\340A\002\"\233\001\n\030UpdateEnvironmentRequest\022I\n\013envi" + + "ronment\030\001 \001(\0132/.google.cloud.dialogflow." + + "cx.v3beta1.EnvironmentB\003\340A\002\0224\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A" + + "\002\"W\n\030DeleteEnvironmentRequest\022;\n\004name\030\001 " + + "\001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.com/E" + + "nvironment\"\205\001\n\037LookupEnvironmentHistoryR" + + "equest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow" + + ".googleapis.com/Environment\022\021\n\tpage_size" + + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\202\001\n LookupEnv" + + "ironmentHistoryResponse\022E\n\014environments\030" + + "\001 \003(\0132/.google.cloud.dialogflow.cx.v3bet" + + "a1.Environment\022\027\n\017next_page_token\030\002 \001(\t\"" + + "\215\004\n\024ContinuousTestResult\022\014\n\004name\030\001 \001(\t\022]" + + "\n\006result\030\002 \001(\0162M.google.cloud.dialogflow" + + ".cx.v3beta1.ContinuousTestResult.Aggrega" + + "tedTestResult\022H\n\021test_case_results\030\003 \003(\t" + + "B-\372A*\n(dialogflow.googleapis.com/TestCas" + + "eResult\022,\n\010run_time\030\004 \001(\0132\032.google.proto" + + "buf.Timestamp\"V\n\024AggregatedTestResult\022&\n" + + "\"AGGREGATED_TEST_RESULT_UNSPECIFIED\020\000\022\n\n" + + "\006PASSED\020\001\022\n\n\006FAILED\020\002:\267\001\352A\263\001\n.dialogflow" + + ".googleapis.com/ContinuousTestResult\022\200\001p" + + "rojects/{project}/locations/{location}/a" + + "gents/{agent}/environments/{environment}" + + "/continuousTestResults/{continuous_test_" + + "result}\"^\n\030RunContinuousTestRequest\022B\n\013e" + + "nvironment\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.goo" + + "gleapis.com/Environment\"u\n\031RunContinuous" + + "TestResponse\022X\n\026continuous_test_result\030\001" + + " \001(\01328.google.cloud.dialogflow.cx.v3beta" + + "1.ContinuousTestResult\"Z\n\031RunContinuousT" + + "estMetadata\022=\n\006errors\030\001 \003(\0132-.google.clo" + + "ud.dialogflow.cx.v3beta1.TestError\"\221\001\n L" + + "istContinuousTestResultsRequest\022F\n\006paren" + + "t\030\001 \001(\tB6\340A\002\372A0\022.dialogflow.googleapis.c" + + "om/ContinuousTestResult\022\021\n\tpage_size\030\002 \001" + + "(\005\022\022\n\npage_token\030\003 \001(\t\"\227\001\n!ListContinuou" + + "sTestResultsResponse\022Y\n\027continuous_test_" + + "results\030\001 \003(\01328.google.cloud.dialogflow." + + "cx.v3beta1.ContinuousTestResult\022\027\n\017next_" + + "page_token\030\002 \001(\t\"\230\001\n\021DeployFlowRequest\022B" + + "\n\013environment\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow." + + "googleapis.com/Environment\022?\n\014flow_versi" + + "on\030\002 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis." + + "com/Version\"n\n\022DeployFlowResponse\022D\n\013env" + + "ironment\030\001 \001(\0132/.google.cloud.dialogflow" + + ".cx.v3beta1.Environment\022\022\n\ndeployment\030\002 " + + "\001(\t\"X\n\022DeployFlowMetadata\022B\n\013test_errors" + + "\030\001 \003(\0132-.google.cloud.dialogflow.cx.v3be" + + "ta1.TestError2\262\022\n\014Environments\022\336\001\n\020ListE" + + "nvironments\022;.google.cloud.dialogflow.cx" + + ".v3beta1.ListEnvironmentsRequest\032<.googl" + + "e.cloud.dialogflow.cx.v3beta1.ListEnviro" + + "nmentsResponse\"O\202\323\344\223\002@\022>/v3beta1/{parent" + + "=projects/*/locations/*/agents/*}/enviro" + + "nments\332A\006parent\022\313\001\n\016GetEnvironment\0229.goo" + + "gle.cloud.dialogflow.cx.v3beta1.GetEnvir" + + "onmentRequest\032/.google.cloud.dialogflow." + + "cx.v3beta1.Environment\"M\202\323\344\223\002@\022>/v3beta1" + + "/{name=projects/*/locations/*/agents/*/e" + + "nvironments/*}\332A\004name\022\203\002\n\021CreateEnvironm" + + "ent\022<.google.cloud.dialogflow.cx.v3beta1" + + ".CreateEnvironmentRequest\032\035.google.longr" + + "unning.Operation\"\220\001\202\323\344\223\002M\">/v3beta1/{par" + + "ent=projects/*/locations/*/agents/*}/env" + + "ironments:\013environment\332A\022parent,environm" + + "ent\312A%\n\013Environment\022\026google.protobuf.Str" + + "uct\022\224\002\n\021UpdateEnvironment\022<.google.cloud" + + ".dialogflow.cx.v3beta1.UpdateEnvironment" + + "Request\032\035.google.longrunning.Operation\"\241" + + "\001\202\323\344\223\002Y2J/v3beta1/{environment.name=proj" + + "ects/*/locations/*/agents/*/environments" + + "/*}:\013environment\332A\027environment,update_ma" + + "sk\312A%\n\013Environment\022\026google.protobuf.Stru" + + "ct\022\270\001\n\021DeleteEnvironment\022<.google.cloud." + + "dialogflow.cx.v3beta1.DeleteEnvironmentR" + + "equest\032\026.google.protobuf.Empty\"M\202\323\344\223\002@*>" + + "/v3beta1/{name=projects/*/locations/*/ag" + + "ents/*/environments/*}\332A\004name\022\215\002\n\030Lookup" + + "EnvironmentHistory\022C.google.cloud.dialog" + + "flow.cx.v3beta1.LookupEnvironmentHistory" + + "Request\032D.google.cloud.dialogflow.cx.v3b" + + "eta1.LookupEnvironmentHistoryResponse\"f\202" + + "\323\344\223\002Y\022W/v3beta1/{name=projects/*/locatio" + + "ns/*/agents/*/environments/*}:lookupEnvi" + + "ronmentHistory\332A\004name\022\216\002\n\021RunContinuousT" + + "est\022<.google.cloud.dialogflow.cx.v3beta1" + + ".RunContinuousTestRequest\032\035.google.longr" + + "unning.Operation\"\233\001\202\323\344\223\002\\\"W/v3beta1/{env" + + "ironment=projects/*/locations/*/agents/*" + + "/environments/*}:runContinuousTest:\001*\312A6" + + "\n\031RunContinuousTestResponse\022\031RunContinuo" + + "usTestMetadata\022\221\002\n\031ListContinuousTestRes" + + "ults\022D.google.cloud.dialogflow.cx.v3beta" + + "1.ListContinuousTestResultsRequest\032E.goo" + + "gle.cloud.dialogflow.cx.v3beta1.ListCont" + + "inuousTestResultsResponse\"g\202\323\344\223\002X\022V/v3be" + + "ta1/{parent=projects/*/locations/*/agent" + + "s/*/environments/*}/continuousTestResult" + + "s\332A\006parent\022\353\001\n\nDeployFlow\0225.google.cloud" + + ".dialogflow.cx.v3beta1.DeployFlowRequest" + + "\032\035.google.longrunning.Operation\"\206\001\202\323\344\223\002U" + + "\"P/v3beta1/{environment=projects/*/locat" + + "ions/*/agents/*/environments/*}:deployFl" + + "ow:\001*\312A(\n\022DeployFlowResponse\022\022DeployFlow" + + "Metadata\032x\312A\031dialogflow.googleapis.com\322A" + + "Yhttps://www.googleapis.com/auth/cloud-p" + + "latform,https://www.googleapis.com/auth/" + + "dialogflowB\330\001\n&com.google.cloud.dialogfl" + + "ow.cx.v3beta1B\020EnvironmentProtoP\001ZDgoogl" + + "e.golang.org/genproto/googleapis/cloud/d" + + "ialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google" + + ".Cloud.Dialogflow.Cx.V3Beta1\352\002&Google::C" + + "loud::Dialogflow::CX::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -255,7 +291,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_descriptor, new java.lang.String[] { - "Name", "DisplayName", "Description", "VersionConfigs", "UpdateTime", + "Name", + "DisplayName", + "Description", + "VersionConfigs", + "UpdateTime", + "TestCasesConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_VersionConfig_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_descriptor @@ -267,6 +308,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Version", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Environment_TestCasesConfig_descriptor, + new java.lang.String[] { + "TestCases", "EnableContinuousRun", "EnablePredeploymentRun", + }); internal_static_google_cloud_dialogflow_cx_v3beta1_ListEnvironmentsRequest_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_dialogflow_cx_v3beta1_ListEnvironmentsRequest_fieldAccessorTable = @@ -379,6 +430,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ContinuousTestResults", "NextPageToken", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowRequest_descriptor, + new java.lang.String[] { + "Environment", "FlowVersion", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowResponse_descriptor, + new java.lang.String[] { + "Environment", "Deployment", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_DeployFlowMetadata_descriptor, + new java.lang.String[] { + "TestErrors", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java index fd64d00fc..60cb2bd12 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportTestCasesMetadata.java @@ -24,6 +24,7 @@ *
  * Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases] long running
  * operation.
+ * This message currently has no fields.
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata} @@ -260,6 +261,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases] long running
    * operation.
+   * This message currently has no fields.
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetDeploymentRequest.java similarity index 61% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetDeploymentRequest.java index 6b7c7e0a1..d2e5824e4 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetDeploymentRequest.java @@ -14,37 +14,37 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/location/locations.proto +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto -package com.google.cloud.location; +package com.google.cloud.dialogflow.cx.v3beta1; /** * * *
- * The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
+ * The request message for [Deployments.GetDeployment][google.cloud.dialogflow.cx.v3beta1.Deployments.GetDeployment].
  * 
* - * Protobuf type {@code google.cloud.location.GetLocationRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} */ -public final class GetLocationRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GetDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.location.GetLocationRequest) - GetLocationRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) + GetDeploymentRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use GetLocationRequest.newBuilder() to construct. - private GetLocationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetDeploymentRequest.newBuilder() to construct. + private GetDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetLocationRequest() { + private GetDeploymentRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetLocationRequest(); + return new GetDeploymentRequest(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetLocationRequest( + private GetDeploymentRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -97,18 +97,18 @@ private GetLocationRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_GetLocationRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.location.GetLocationRequest.class, - com.google.cloud.location.GetLocationRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -117,10 +117,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Resource name for the location.
+   * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -140,10 +144,14 @@ public java.lang.String getName() { * * *
-   * Resource name for the location.
+   * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -199,11 +207,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.location.GetLocationRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest)) { return super.equals(obj); } - com.google.cloud.location.GetLocationRequest other = - (com.google.cloud.location.GetLocationRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) obj; if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -224,71 +232,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.location.GetLocationRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.location.GetLocationRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest 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.location.GetLocationRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.location.GetLocationRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest 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.location.GetLocationRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.location.GetLocationRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.location.GetLocationRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.location.GetLocationRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest 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.location.GetLocationRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.location.GetLocationRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest 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.location.GetLocationRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.location.GetLocationRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -305,7 +313,8 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.location.GetLocationRequest prototype) { + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -323,31 +332,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
+   * The request message for [Deployments.GetDeployment][google.cloud.dialogflow.cx.v3beta1.Deployments.GetDeployment].
    * 
* - * Protobuf type {@code google.cloud.location.GetLocationRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.location.GetLocationRequest) - com.google.cloud.location.GetLocationRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_GetLocationRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.location.GetLocationRequest.class, - com.google.cloud.location.GetLocationRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.Builder.class); } - // Construct using com.google.cloud.location.GetLocationRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -371,18 +380,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_GetLocationRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetDeploymentRequest_descriptor; } @java.lang.Override - public com.google.cloud.location.GetLocationRequest getDefaultInstanceForType() { - return com.google.cloud.location.GetLocationRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.location.GetLocationRequest build() { - com.google.cloud.location.GetLocationRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -390,9 +399,9 @@ public com.google.cloud.location.GetLocationRequest build() { } @java.lang.Override - public com.google.cloud.location.GetLocationRequest buildPartial() { - com.google.cloud.location.GetLocationRequest result = - new com.google.cloud.location.GetLocationRequest(this); + public com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest(this); result.name_ = name_; onBuilt(); return result; @@ -433,16 +442,17 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.location.GetLocationRequest) { - return mergeFrom((com.google.cloud.location.GetLocationRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.location.GetLocationRequest other) { - if (other == com.google.cloud.location.GetLocationRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.getDefaultInstance()) + return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); @@ -462,11 +472,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.location.GetLocationRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.location.GetLocationRequest) e.getUnfinishedMessage(); + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -481,10 +492,14 @@ public Builder mergeFrom( * * *
-     * Resource name for the location.
+     * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -503,10 +518,14 @@ public java.lang.String getName() { * * *
-     * Resource name for the location.
+     * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -525,10 +544,14 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Resource name for the location.
+     * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -546,10 +569,14 @@ public Builder setName(java.lang.String value) { * * *
-     * Resource name for the location.
+     * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -563,10 +590,14 @@ public Builder clearName() { * * *
-     * Resource name for the location.
+     * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
      * 
* - * string name = 1; + * + * 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. @@ -593,42 +624,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.location.GetLocationRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.location.GetLocationRequest) - private static final com.google.cloud.location.GetLocationRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.location.GetLocationRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest(); } - public static com.google.cloud.location.GetLocationRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest 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 GetLocationRequest parsePartialFrom( + public GetDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetLocationRequest(input, extensionRegistry); + return new GetDeploymentRequest(input, extensionRegistry); } }; - 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.location.GetLocationRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetDeploymentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetDeploymentRequestOrBuilder.java new file mode 100644 index 000000000..f971c3c6f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetDeploymentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment].
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>/deployments/<Deployment ID>`.
+   * 
+ * + * + * 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/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsRequest.java similarity index 58% rename from proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequest.java rename to proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsRequest.java index e1b3af7f9..1e7464156 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsRequest.java @@ -14,39 +14,38 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/location/locations.proto +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto -package com.google.cloud.location; +package com.google.cloud.dialogflow.cx.v3beta1; /** * * *
- * The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+ * The request message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments].
  * 
* - * Protobuf type {@code google.cloud.location.ListLocationsRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} */ -public final class ListLocationsRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ListDeploymentsRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.location.ListLocationsRequest) - ListLocationsRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) + ListDeploymentsRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use ListLocationsRequest.newBuilder() to construct. - private ListLocationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListDeploymentsRequest.newBuilder() to construct. + private ListDeploymentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListLocationsRequest() { - name_ = ""; - filter_ = ""; + private ListDeploymentsRequest() { + parent_ = ""; pageToken_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListLocationsRequest(); + return new ListDeploymentsRequest(); } @java.lang.Override @@ -54,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListLocationsRequest( + private ListDeploymentsRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -76,22 +75,15 @@ private ListLocationsRequest( { java.lang.String s = input.readStringRequireUtf8(); - name_ = s; + parent_ = s; break; } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 24: + case 16: { pageSize_ = input.readInt32(); break; } - case 34: + case 26: { java.lang.String s = input.readStringRequireUtf8(); @@ -118,91 +110,46 @@ private ListLocationsRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.location.ListLocationsRequest.class, - com.google.cloud.location.ListLocationsRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The resource that owns the locations collection, if applicable.
-   * 
- * - * 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 resource that owns the locations collection, if applicable.
-   * 
- * - * 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; - } + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.Builder.class); } - public static final int FILTER_FIELD_NUMBER = 2; - private volatile java.lang.Object filter_; + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; /** * * *
-   * The standard list filter.
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
    * 
* - * string filter = 2; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The filter. + * @return The parent. */ @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; + 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(); - filter_ = s; + parent_ = s; return s; } } @@ -210,36 +157,41 @@ public java.lang.String getFilter() { * * *
-   * The standard list filter.
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
    * 
* - * string filter = 2; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for filter. + * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; + 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); - filter_ = b; + parent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int PAGE_SIZE_FIELD_NUMBER = 3; + public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_; /** * * *
-   * The standard list page size.
+   * The maximum number of items to return in a single page. By default 20 and
+   * at most 100.
    * 
* - * int32 page_size = 3; + * int32 page_size = 2; * * @return The pageSize. */ @@ -248,16 +200,16 @@ public int getPageSize() { return pageSize_; } - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; private volatile java.lang.Object pageToken_; /** * * *
-   * The standard list page token.
+   * The next_page_token value returned from a previous list request.
    * 
* - * string page_token = 4; + * string page_token = 3; * * @return The pageToken. */ @@ -277,10 +229,10 @@ public java.lang.String getPageToken() { * * *
-   * The standard list page token.
+   * The next_page_token value returned from a previous list request.
    * 
* - * string page_token = 4; + * string page_token = 3; * * @return The bytes for pageToken. */ @@ -311,17 +263,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); + output.writeInt32(2, pageSize_); } if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } unknownFields.writeTo(output); } @@ -332,17 +281,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -354,14 +300,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.location.ListLocationsRequest)) { + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest)) { return super.equals(obj); } - com.google.cloud.location.ListLocationsRequest other = - (com.google.cloud.location.ListLocationsRequest) obj; + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) obj; - if (!getName().equals(other.getName())) return false; - if (!getFilter().equals(other.getFilter())) return false; + if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -375,10 +320,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().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; @@ -388,71 +331,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.location.ListLocationsRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.location.ListLocationsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest 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.location.ListLocationsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.location.ListLocationsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest 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.location.ListLocationsRequest parseFrom(byte[] data) + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.location.ListLocationsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.location.ListLocationsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.location.ListLocationsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest 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.location.ListLocationsRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.location.ListLocationsRequest parseDelimitedFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest 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.location.ListLocationsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.location.ListLocationsRequest parseFrom( + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -469,7 +412,8 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.location.ListLocationsRequest prototype) { + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -487,31 +431,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+   * The request message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments].
    * 
* - * Protobuf type {@code google.cloud.location.ListLocationsRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.location.ListLocationsRequest) - com.google.cloud.location.ListLocationsRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.location.ListLocationsRequest.class, - com.google.cloud.location.ListLocationsRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.Builder.class); } - // Construct using com.google.cloud.location.ListLocationsRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -528,9 +472,7 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - name_ = ""; - - filter_ = ""; + parent_ = ""; pageSize_ = 0; @@ -541,18 +483,19 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsRequest_descriptor; } @java.lang.Override - public com.google.cloud.location.ListLocationsRequest getDefaultInstanceForType() { - return com.google.cloud.location.ListLocationsRequest.getDefaultInstance(); + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.location.ListLocationsRequest build() { - com.google.cloud.location.ListLocationsRequest result = buildPartial(); + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -560,11 +503,10 @@ public com.google.cloud.location.ListLocationsRequest build() { } @java.lang.Override - public com.google.cloud.location.ListLocationsRequest buildPartial() { - com.google.cloud.location.ListLocationsRequest result = - new com.google.cloud.location.ListLocationsRequest(this); - result.name_ = name_; - result.filter_ = filter_; + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest(this); + result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; onBuilt(); @@ -606,22 +548,20 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.location.ListLocationsRequest) { - return mergeFrom((com.google.cloud.location.ListLocationsRequest) other); + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.location.ListLocationsRequest other) { - if (other == com.google.cloud.location.ListLocationsRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; onChanged(); } if (other.getPageSize() != 0) { @@ -646,11 +586,13 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.location.ListLocationsRequest parsedMessage = null; + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.location.ListLocationsRequest) e.getUnfinishedMessage(); + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -660,130 +602,28 @@ public Builder mergeFrom( return this; } - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The resource that owns the locations collection, if applicable.
-     * 
- * - * 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 resource that owns the locations collection, if applicable.
-     * 
- * - * 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 resource that owns the locations collection, if applicable.
-     * 
- * - * 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; - onChanged(); - return this; - } - /** - * - * - *
-     * The resource that owns the locations collection, if applicable.
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource that owns the locations collection, if applicable.
-     * 
- * - * 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; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; + private java.lang.Object parent_ = ""; /** * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* - * string filter = 2; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The filter. + * @return The parent. */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; + 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(); - filter_ = s; + parent_ = s; return s; } else { return (java.lang.String) ref; @@ -793,19 +633,23 @@ public java.lang.String getFilter() { * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* - * string filter = 2; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for filter. + * @return The bytes for parent. */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; + 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); - filter_ = b; + parent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -815,20 +659,24 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* - * string filter = 2; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param value The filter to set. + * @param value The parent to set. * @return This builder for chaining. */ - public Builder setFilter(java.lang.String value) { + public Builder setParent(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - filter_ = value; + parent_ = value; onChanged(); return this; } @@ -836,16 +684,20 @@ public Builder setFilter(java.lang.String value) { * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* - * string filter = 2; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ - public Builder clearFilter() { + public Builder clearParent() { - filter_ = getDefaultInstance().getFilter(); + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } @@ -853,21 +705,25 @@ public Builder clearFilter() { * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/environments/<Environment ID>`.
      * 
* - * string filter = 2; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param value The bytes for filter to set. + * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - filter_ = value; + parent_ = value; onChanged(); return this; } @@ -877,10 +733,11 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * *
-     * The standard list page size.
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
      * 
* - * int32 page_size = 3; + * int32 page_size = 2; * * @return The pageSize. */ @@ -892,10 +749,11 @@ public int getPageSize() { * * *
-     * The standard list page size.
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
      * 
* - * int32 page_size = 3; + * int32 page_size = 2; * * @param value The pageSize to set. * @return This builder for chaining. @@ -910,10 +768,11 @@ public Builder setPageSize(int value) { * * *
-     * The standard list page size.
+     * The maximum number of items to return in a single page. By default 20 and
+     * at most 100.
      * 
* - * int32 page_size = 3; + * int32 page_size = 2; * * @return This builder for chaining. */ @@ -929,10 +788,10 @@ public Builder clearPageSize() { * * *
-     * The standard list page token.
+     * The next_page_token value returned from a previous list request.
      * 
* - * string page_token = 4; + * string page_token = 3; * * @return The pageToken. */ @@ -951,10 +810,10 @@ public java.lang.String getPageToken() { * * *
-     * The standard list page token.
+     * The next_page_token value returned from a previous list request.
      * 
* - * string page_token = 4; + * string page_token = 3; * * @return The bytes for pageToken. */ @@ -973,10 +832,10 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * The standard list page token.
+     * The next_page_token value returned from a previous list request.
      * 
* - * string page_token = 4; + * string page_token = 3; * * @param value The pageToken to set. * @return This builder for chaining. @@ -994,10 +853,10 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * The standard list page token.
+     * The next_page_token value returned from a previous list request.
      * 
* - * string page_token = 4; + * string page_token = 3; * * @return This builder for chaining. */ @@ -1011,10 +870,10 @@ public Builder clearPageToken() { * * *
-     * The standard list page token.
+     * The next_page_token value returned from a previous list request.
      * 
* - * string page_token = 4; + * string page_token = 3; * * @param value The bytes for pageToken to set. * @return This builder for chaining. @@ -1041,42 +900,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.location.ListLocationsRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.location.ListLocationsRequest) - private static final com.google.cloud.location.ListLocationsRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.location.ListLocationsRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest(); } - public static com.google.cloud.location.ListLocationsRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest 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 ListLocationsRequest parsePartialFrom( + public ListDeploymentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListLocationsRequest(input, extensionRegistry); + return new ListDeploymentsRequest(input, extensionRegistry); } }; - 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.location.ListLocationsRequest getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsRequestOrBuilder.java new file mode 100644 index 000000000..ad630e0af --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListDeploymentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/environments/<Environment ID>`.
+   * 
+ * + * + * 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 20 and
+   * at most 100.
+   * 
+ * + * 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/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsResponse.java new file mode 100644 index 000000000..e59469b39 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsResponse.java @@ -0,0 +1,1223 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} + */ +public final class ListDeploymentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) + ListDeploymentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeploymentsResponse.newBuilder() to construct. + private ListDeploymentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeploymentsResponse() { + deployments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDeploymentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDeploymentsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deployments_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deployments_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deployments_ = java.util.Collections.unmodifiableList(deployments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.Builder.class); + } + + public static final int DEPLOYMENTS_FIELD_NUMBER = 1; + private java.util.List deployments_; + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + @java.lang.Override + public java.util.List getDeploymentsList() { + return deployments_; + } + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + @java.lang.Override + public java.util.List + getDeploymentsOrBuilderList() { + return deployments_; + } + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + @java.lang.Override + public int getDeploymentsCount() { + return deployments_.size(); + } + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Deployment getDeployments(int index) { + return deployments_.get(index); + } + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeploymentOrBuilder getDeploymentsOrBuilder( + int index) { + return deployments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + 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 < deployments_.size(); i++) { + output.writeMessage(1, deployments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < deployments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deployments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) obj; + + if (!getDeploymentsList().equals(other.getDeploymentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeploymentsCount() > 0) { + hash = (37 * hash) + DEPLOYMENTS_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse 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 [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeploymentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (deploymentsBuilder_ == null) { + deployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deploymentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse(this); + int from_bitField0_ = bitField0_; + if (deploymentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deployments_ = java.util.Collections.unmodifiableList(deployments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deployments_ = deployments_; + } else { + result.deployments_ = deploymentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.getDefaultInstance()) + return this; + if (deploymentsBuilder_ == null) { + if (!other.deployments_.isEmpty()) { + if (deployments_.isEmpty()) { + deployments_ = other.deployments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeploymentsIsMutable(); + deployments_.addAll(other.deployments_); + } + onChanged(); + } + } else { + if (!other.deployments_.isEmpty()) { + if (deploymentsBuilder_.isEmpty()) { + deploymentsBuilder_.dispose(); + deploymentsBuilder_ = null; + deployments_ = other.deployments_; + bitField0_ = (bitField0_ & ~0x00000001); + deploymentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeploymentsFieldBuilder() + : null; + } else { + deploymentsBuilder_.addAllMessages(other.deployments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List deployments_ = + java.util.Collections.emptyList(); + + private void ensureDeploymentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deployments_ = + new java.util.ArrayList( + deployments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Deployment, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DeploymentOrBuilder> + deploymentsBuilder_; + + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public java.util.List getDeploymentsList() { + if (deploymentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deployments_); + } else { + return deploymentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public int getDeploymentsCount() { + if (deploymentsBuilder_ == null) { + return deployments_.size(); + } else { + return deploymentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Deployment getDeployments(int index) { + if (deploymentsBuilder_ == null) { + return deployments_.get(index); + } else { + return deploymentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder setDeployments( + int index, com.google.cloud.dialogflow.cx.v3beta1.Deployment value) { + if (deploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentsIsMutable(); + deployments_.set(index, value); + onChanged(); + } else { + deploymentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder setDeployments( + int index, com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder builderForValue) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.set(index, builderForValue.build()); + onChanged(); + } else { + deploymentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder addDeployments(com.google.cloud.dialogflow.cx.v3beta1.Deployment value) { + if (deploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentsIsMutable(); + deployments_.add(value); + onChanged(); + } else { + deploymentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder addDeployments( + int index, com.google.cloud.dialogflow.cx.v3beta1.Deployment value) { + if (deploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentsIsMutable(); + deployments_.add(index, value); + onChanged(); + } else { + deploymentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder addDeployments( + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder builderForValue) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.add(builderForValue.build()); + onChanged(); + } else { + deploymentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder addDeployments( + int index, com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder builderForValue) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.add(index, builderForValue.build()); + onChanged(); + } else { + deploymentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder addAllDeployments( + java.lang.Iterable values) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deployments_); + onChanged(); + } else { + deploymentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder clearDeployments() { + if (deploymentsBuilder_ == null) { + deployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deploymentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public Builder removeDeployments(int index) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.remove(index); + onChanged(); + } else { + deploymentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder getDeploymentsBuilder( + int index) { + return getDeploymentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.DeploymentOrBuilder getDeploymentsOrBuilder( + int index) { + if (deploymentsBuilder_ == null) { + return deployments_.get(index); + } else { + return deploymentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public java.util.List + getDeploymentsOrBuilderList() { + if (deploymentsBuilder_ != null) { + return deploymentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deployments_); + } + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder addDeploymentsBuilder() { + return getDeploymentsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Deployment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder addDeploymentsBuilder( + int index) { + return getDeploymentsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.Deployment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of deployments. There will be a maximum number of items
+     * returned based on the page_size field in the request. The list may in some
+     * cases be empty or contain fewer entries than page_size even if this isn't
+     * the last page.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + public java.util.List + getDeploymentsBuilderList() { + return getDeploymentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Deployment, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DeploymentOrBuilder> + getDeploymentsFieldBuilder() { + if (deploymentsBuilder_ == null) { + deploymentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Deployment, + com.google.cloud.dialogflow.cx.v3beta1.Deployment.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DeploymentOrBuilder>( + deployments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deployments_ = null; + } + return deploymentsBuilder_; + } + + 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; + 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(); + 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; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeploymentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDeploymentsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsResponseOrBuilder.java new file mode 100644 index 000000000..671f24359 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListDeploymentsResponseOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListDeploymentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + java.util.List getDeploymentsList(); + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.Deployment getDeployments(int index); + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + int getDeploymentsCount(); + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + java.util.List + getDeploymentsOrBuilderList(); + /** + * + * + *
+   * The list of deployments. There will be a maximum number of items
+   * returned based on the page_size field in the request. The list may in some
+   * cases be empty or contain fewer entries than page_size even if this isn't
+   * the last page.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Deployment deployments = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.DeploymentOrBuilder getDeploymentsOrBuilder(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/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java index c1fc434e5..0b6ef102f 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java @@ -1269,12 +1269,15 @@ public DataRetentionCase getDataRetentionCase() { * * *
-   * Required. Resource name of the settings.
+   * Resource name of the settings.
+   * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+   * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+   * automatically.
    * Format: `projects/<Project ID>/locations/<Location
    * ID>/securitySettings/<Security Settings ID>`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @return The name. */ @@ -1294,12 +1297,15 @@ public java.lang.String getName() { * * *
-   * Required. Resource name of the settings.
+   * Resource name of the settings.
+   * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+   * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+   * automatically.
    * Format: `projects/<Project ID>/locations/<Location
    * ID>/securitySettings/<Security Settings ID>`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @return The bytes for name. */ @@ -2365,12 +2371,15 @@ public Builder clearDataRetention() { * * *
-     * Required. Resource name of the settings.
+     * Resource name of the settings.
+     * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+     * automatically.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/securitySettings/<Security Settings ID>`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @return The name. */ @@ -2389,12 +2398,15 @@ public java.lang.String getName() { * * *
-     * Required. Resource name of the settings.
+     * Resource name of the settings.
+     * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+     * automatically.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/securitySettings/<Security Settings ID>`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @return The bytes for name. */ @@ -2413,12 +2425,15 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Resource name of the settings.
+     * Resource name of the settings.
+     * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+     * automatically.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/securitySettings/<Security Settings ID>`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @param value The name to set. * @return This builder for chaining. @@ -2436,12 +2451,15 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Resource name of the settings.
+     * Resource name of the settings.
+     * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+     * automatically.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/securitySettings/<Security Settings ID>`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @return This builder for chaining. */ @@ -2455,12 +2473,15 @@ public Builder clearName() { * * *
-     * Required. Resource name of the settings.
+     * Resource name of the settings.
+     * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+     * automatically.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/securitySettings/<Security Settings ID>`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java index 2b2bcae58..7c6ca822b 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsOrBuilder.java @@ -27,12 +27,15 @@ public interface SecuritySettingsOrBuilder * * *
-   * Required. Resource name of the settings.
+   * Resource name of the settings.
+   * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+   * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+   * automatically.
    * Format: `projects/<Project ID>/locations/<Location
    * ID>/securitySettings/<Security Settings ID>`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @return The name. */ @@ -41,12 +44,15 @@ public interface SecuritySettingsOrBuilder * * *
-   * Required. Resource name of the settings.
+   * Resource name of the settings.
+   * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
+   * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
+   * automatically.
    * Format: `projects/<Project ID>/locations/<Location
    * ID>/securitySettings/<Security Settings ID>`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1; * * @return The bytes for name. */ diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java index 613fb70e1..74f39fe3a 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java @@ -96,84 +96,84 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oud.dialogflow.cx.v3beta1.SecuritySettin" + "gsB\003\340A\002\"a\n\035DeleteSecuritySettingsRequest" + "\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*dialogflow.googl" - + "eapis.com/SecuritySettings\"\257\010\n\020SecurityS" - + "ettings\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\031\n\014display_na" - + "me\030\002 \001(\tB\003\340A\002\022b\n\022redaction_strategy\030\003 \001(" - + "\0162F.google.cloud.dialogflow.cx.v3beta1.S" - + "ecuritySettings.RedactionStrategy\022\\\n\017red" - + "action_scope\030\004 \001(\0162C.google.cloud.dialog" - + "flow.cx.v3beta1.SecuritySettings.Redacti" - + "onScope\022A\n\020inspect_template\030\t \001(\tB\'\372A$\n\"" - + "dlp.googleapis.com/InspectTemplate\022G\n\023de" - + "identify_template\030\021 \001(\tB*\372A\'\n%dlp.google" - + "apis.com/DeidentifyTemplate\022\037\n\025retention" - + "_window_days\030\006 \001(\005H\000\022\\\n\020purge_data_types" - + "\030\010 \003(\0162B.google.cloud.dialogflow.cx.v3be" - + "ta1.SecuritySettings.PurgeDataType\022m\n\030in" - + "sights_export_settings\030\r \001(\0132K.google.cl" - + "oud.dialogflow.cx.v3beta1.SecuritySettin" - + "gs.InsightsExportSettings\0328\n\026InsightsExp" - + "ortSettings\022\036\n\026enable_insights_export\030\001 " - + "\001(\010\"P\n\021RedactionStrategy\022\"\n\036REDACTION_ST" - + "RATEGY_UNSPECIFIED\020\000\022\027\n\023REDACT_WITH_SERV" - + "ICE\020\001\"J\n\016RedactionScope\022\037\n\033REDACTION_SCO" - + "PE_UNSPECIFIED\020\000\022\027\n\023REDACT_DISK_STORAGE\020" - + "\002\"H\n\rPurgeDataType\022\037\n\033PURGE_DATA_TYPE_UN" - + "SPECIFIED\020\000\022\026\n\022DIALOGFLOW_HISTORY\020\001:}\352Az" - + "\n*dialogflow.googleapis.com/SecuritySett" - + "ings\022Lprojects/{project}/locations/{loca" - + "tion}/securitySettings/{security_setting" - + "s}B\020\n\016data_retention2\265\n\n\027SecuritySetting" - + "sService\022\202\002\n\026CreateSecuritySettings\022A.go" - + "ogle.cloud.dialogflow.cx.v3beta1.CreateS" - + "ecuritySettingsRequest\0324.google.cloud.di" - + "alogflow.cx.v3beta1.SecuritySettings\"o\202\323" - + "\344\223\002N\"9/v3beta1/{parent=projects/*/locati" - + "ons/*}/securitySettings:\021security_settin" - + "gs\332A\030parent,security_settings\022\325\001\n\023GetSec" - + "uritySettings\022>.google.cloud.dialogflow." - + "cx.v3beta1.GetSecuritySettingsRequest\0324." - + "google.cloud.dialogflow.cx.v3beta1.Secur" - + "itySettings\"H\202\323\344\223\002;\0229/v3beta1/{name=proj" - + "ects/*/locations/*/securitySettings/*}\332A" - + "\004name\022\232\002\n\026UpdateSecuritySettings\022A.googl" - + "e.cloud.dialogflow.cx.v3beta1.UpdateSecu" - + "ritySettingsRequest\0324.google.cloud.dialo" - + "gflow.cx.v3beta1.SecuritySettings\"\206\001\202\323\344\223" - + "\002`2K/v3beta1/{security_settings.name=pro" - + "jects/*/locations/*/securitySettings/*}:" - + "\021security_settings\332A\035security_settings,u" - + "pdate_mask\022\345\001\n\024ListSecuritySettings\022?.go" - + "ogle.cloud.dialogflow.cx.v3beta1.ListSec" - + "uritySettingsRequest\032@.google.cloud.dial" - + "ogflow.cx.v3beta1.ListSecuritySettingsRe" - + "sponse\"J\202\323\344\223\002;\0229/v3beta1/{parent=project" - + "s/*/locations/*}/securitySettings\332A\006pare" - + "nt\022\275\001\n\026DeleteSecuritySettings\022A.google.c" - + "loud.dialogflow.cx.v3beta1.DeleteSecurit" - + "ySettingsRequest\032\026.google.protobuf.Empty" - + "\"H\202\323\344\223\002;*9/v3beta1/{name=projects/*/loca" - + "tions/*/securitySettings/*}\332A\004name\032x\312A\031d" - + "ialogflow.googleapis.com\322AYhttps://www.g" - + "oogleapis.com/auth/cloud-platform,https:" - + "//www.googleapis.com/auth/dialogflowB\204\005\n" - + "&com.google.cloud.dialogflow.cx.v3beta1B" - + "\025SecuritySettingsProtoP\001ZDgoogle.golang." - + "org/genproto/googleapis/cloud/dialogflow" - + "/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Google.Cloud.Di" - + "alogflow.Cx.V3Beta1\352\002&Google::Cloud::Dia" - + "logflow::CX::V3beta1\352A\310\001\n\"dlp.googleapis" - + ".com/InspectTemplate\022Uorganizations/{org" - + "anization}/locations/{location}/inspectT" - + "emplates/{inspect_template}\022Kprojects/{p" - + "roject}/locations/{location}/inspectTemp" - + "lates/{inspect_template}\352A\327\001\n%dlp.google" - + "apis.com/DeidentifyTemplate\022[organizatio" - + "ns/{organization}/locations/{location}/d" - + "eidentifyTemplates/{deidentify_template}" - + "\022Qprojects/{project}/locations/{location" - + "}/deidentifyTemplates/{deidentify_templa" - + "te}b\006proto3" + + "eapis.com/SecuritySettings\"\252\010\n\020SecurityS" + + "ettings\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 " + + "\001(\tB\003\340A\002\022b\n\022redaction_strategy\030\003 \001(\0162F.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Securi" + + "tySettings.RedactionStrategy\022\\\n\017redactio" + + "n_scope\030\004 \001(\0162C.google.cloud.dialogflow." + + "cx.v3beta1.SecuritySettings.RedactionSco" + + "pe\022A\n\020inspect_template\030\t \001(\tB\'\372A$\n\"dlp.g" + + "oogleapis.com/InspectTemplate\022G\n\023deident" + + "ify_template\030\021 \001(\tB*\372A\'\n%dlp.googleapis." + + "com/DeidentifyTemplate\022\037\n\025retention_wind" + + "ow_days\030\006 \001(\005H\000\022\\\n\020purge_data_types\030\010 \003(" + + "\0162B.google.cloud.dialogflow.cx.v3beta1.S" + + "ecuritySettings.PurgeDataType\022m\n\030insight" + + "s_export_settings\030\r \001(\0132K.google.cloud.d" + + "ialogflow.cx.v3beta1.SecuritySettings.In" + + "sightsExportSettings\0328\n\026InsightsExportSe" + + "ttings\022\036\n\026enable_insights_export\030\001 \001(\010\"P" + + "\n\021RedactionStrategy\022\"\n\036REDACTION_STRATEG" + + "Y_UNSPECIFIED\020\000\022\027\n\023REDACT_WITH_SERVICE\020\001" + + "\"J\n\016RedactionScope\022\037\n\033REDACTION_SCOPE_UN" + + "SPECIFIED\020\000\022\027\n\023REDACT_DISK_STORAGE\020\002\"H\n\r" + + "PurgeDataType\022\037\n\033PURGE_DATA_TYPE_UNSPECI" + + "FIED\020\000\022\026\n\022DIALOGFLOW_HISTORY\020\001:}\352Az\n*dia" + + "logflow.googleapis.com/SecuritySettings\022" + + "Lprojects/{project}/locations/{location}" + + "/securitySettings/{security_settings}B\020\n" + + "\016data_retention2\265\n\n\027SecuritySettingsServ" + + "ice\022\202\002\n\026CreateSecuritySettings\022A.google." + + "cloud.dialogflow.cx.v3beta1.CreateSecuri" + + "tySettingsRequest\0324.google.cloud.dialogf" + + "low.cx.v3beta1.SecuritySettings\"o\202\323\344\223\002N\"" + + "9/v3beta1/{parent=projects/*/locations/*" + + "}/securitySettings:\021security_settings\332A\030" + + "parent,security_settings\022\325\001\n\023GetSecurity" + + "Settings\022>.google.cloud.dialogflow.cx.v3" + + "beta1.GetSecuritySettingsRequest\0324.googl" + + "e.cloud.dialogflow.cx.v3beta1.SecuritySe" + + "ttings\"H\202\323\344\223\002;\0229/v3beta1/{name=projects/" + + "*/locations/*/securitySettings/*}\332A\004name" + + "\022\232\002\n\026UpdateSecuritySettings\022A.google.clo" + + "ud.dialogflow.cx.v3beta1.UpdateSecurityS" + + "ettingsRequest\0324.google.cloud.dialogflow" + + ".cx.v3beta1.SecuritySettings\"\206\001\202\323\344\223\002`2K/" + + "v3beta1/{security_settings.name=projects" + + "/*/locations/*/securitySettings/*}:\021secu" + + "rity_settings\332A\035security_settings,update" + + "_mask\022\345\001\n\024ListSecuritySettings\022?.google." + + "cloud.dialogflow.cx.v3beta1.ListSecurity" + + "SettingsRequest\032@.google.cloud.dialogflo" + + "w.cx.v3beta1.ListSecuritySettingsRespons" + + "e\"J\202\323\344\223\002;\0229/v3beta1/{parent=projects/*/l" + + "ocations/*}/securitySettings\332A\006parent\022\275\001" + + "\n\026DeleteSecuritySettings\022A.google.cloud." + + "dialogflow.cx.v3beta1.DeleteSecuritySett" + + "ingsRequest\032\026.google.protobuf.Empty\"H\202\323\344" + + "\223\002;*9/v3beta1/{name=projects/*/locations" + + "/*/securitySettings/*}\332A\004name\032x\312A\031dialog" + + "flow.googleapis.com\322AYhttps://www.google" + + "apis.com/auth/cloud-platform,https://www" + + ".googleapis.com/auth/dialogflowB\204\005\n&com." + + "google.cloud.dialogflow.cx.v3beta1B\025Secu" + + "ritySettingsProtoP\001ZDgoogle.golang.org/g" + + "enproto/googleapis/cloud/dialogflow/cx/v" + + "3beta1;cx\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogf" + + "low.Cx.V3Beta1\352\002&Google::Cloud::Dialogfl" + + "ow::CX::V3beta1\352A\310\001\n\"dlp.googleapis.com/" + + "InspectTemplate\022Uorganizations/{organiza" + + "tion}/locations/{location}/inspectTempla" + + "tes/{inspect_template}\022Kprojects/{projec" + + "t}/locations/{location}/inspectTemplates" + + "/{inspect_template}\352A\327\001\n%dlp.googleapis." + + "com/DeidentifyTemplate\022[organizations/{o" + + "rganization}/locations/{location}/deiden" + + "tifyTemplates/{deidentify_template}\022Qpro" + + "jects/{project}/locations/{location}/dei" + + "dentifyTemplates/{deidentify_template}b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java deleted file mode 100644 index a8f3d0f9b..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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/location/locations.proto - -package com.google.cloud.location; - -public interface GetLocationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.location.GetLocationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Resource name for the location.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Resource name for the location.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java deleted file mode 100644 index 3a3f39a7f..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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/location/locations.proto - -package com.google.cloud.location; - -public interface ListLocationsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.location.ListLocationsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource that owns the locations collection, if applicable.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource that owns the locations collection, if applicable.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The standard list filter.
-   * 
- * - * string filter = 2; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * The standard list filter.
-   * 
- * - * string filter = 2; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * The standard list page size.
-   * 
- * - * int32 page_size = 3; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * The standard list page token.
-   * 
- * - * string page_token = 4; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * The standard list page token.
-   * 
- * - * string page_token = 4; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponse.java deleted file mode 100644 index 8e7553c0c..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponse.java +++ /dev/null @@ -1,1126 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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/location/locations.proto - -package com.google.cloud.location; - -/** - * - * - *
- * The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
- * 
- * - * Protobuf type {@code google.cloud.location.ListLocationsResponse} - */ -public final class ListLocationsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.location.ListLocationsResponse) - ListLocationsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListLocationsResponse.newBuilder() to construct. - private ListLocationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListLocationsResponse() { - locations_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListLocationsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListLocationsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - locations_.add( - input.readMessage( - com.google.cloud.location.Location.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.location.ListLocationsResponse.class, - com.google.cloud.location.ListLocationsResponse.Builder.class); - } - - public static final int LOCATIONS_FIELD_NUMBER = 1; - private java.util.List locations_; - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - @java.lang.Override - public java.util.List getLocationsList() { - return locations_; - } - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - @java.lang.Override - public java.util.List - getLocationsOrBuilderList() { - return locations_; - } - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - @java.lang.Override - public int getLocationsCount() { - return locations_.size(); - } - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - @java.lang.Override - public com.google.cloud.location.Location getLocations(int index) { - return locations_.get(index); - } - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - @java.lang.Override - public com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index) { - return locations_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * The standard List next-page token.
-   * 
- * - * 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; - } - } - /** - * - * - *
-   * The standard List next-page token.
-   * 
- * - * 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 < locations_.size(); i++) { - output.writeMessage(1, locations_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < locations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, locations_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.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.location.ListLocationsResponse)) { - return super.equals(obj); - } - com.google.cloud.location.ListLocationsResponse other = - (com.google.cloud.location.ListLocationsResponse) obj; - - if (!getLocationsList().equals(other.getLocationsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getLocationsCount() > 0) { - hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocationsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.location.ListLocationsResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.location.ListLocationsResponse 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.location.ListLocationsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.location.ListLocationsResponse 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.location.ListLocationsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.location.ListLocationsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.location.ListLocationsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.location.ListLocationsResponse 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.location.ListLocationsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.location.ListLocationsResponse 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.location.ListLocationsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.location.ListLocationsResponse 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.location.ListLocationsResponse 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 [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
-   * 
- * - * Protobuf type {@code google.cloud.location.ListLocationsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.location.ListLocationsResponse) - com.google.cloud.location.ListLocationsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.location.ListLocationsResponse.class, - com.google.cloud.location.ListLocationsResponse.Builder.class); - } - - // Construct using com.google.cloud.location.ListLocationsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLocationsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - locationsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_ListLocationsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.location.ListLocationsResponse getDefaultInstanceForType() { - return com.google.cloud.location.ListLocationsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.location.ListLocationsResponse build() { - com.google.cloud.location.ListLocationsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.location.ListLocationsResponse buildPartial() { - com.google.cloud.location.ListLocationsResponse result = - new com.google.cloud.location.ListLocationsResponse(this); - int from_bitField0_ = bitField0_; - if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.locations_ = locations_; - } else { - result.locations_ = locationsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - 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.location.ListLocationsResponse) { - return mergeFrom((com.google.cloud.location.ListLocationsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.location.ListLocationsResponse other) { - if (other == com.google.cloud.location.ListLocationsResponse.getDefaultInstance()) - return this; - if (locationsBuilder_ == null) { - if (!other.locations_.isEmpty()) { - if (locations_.isEmpty()) { - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLocationsIsMutable(); - locations_.addAll(other.locations_); - } - onChanged(); - } - } else { - if (!other.locations_.isEmpty()) { - if (locationsBuilder_.isEmpty()) { - locationsBuilder_.dispose(); - locationsBuilder_ = null; - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - locationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getLocationsFieldBuilder() - : null; - } else { - locationsBuilder_.addAllMessages(other.locations_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - 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 { - com.google.cloud.location.ListLocationsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.location.ListLocationsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List locations_ = - java.util.Collections.emptyList(); - - private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(locations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.location.Location, - com.google.cloud.location.Location.Builder, - com.google.cloud.location.LocationOrBuilder> - locationsBuilder_; - - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public java.util.List getLocationsList() { - if (locationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(locations_); - } else { - return locationsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public int getLocationsCount() { - if (locationsBuilder_ == null) { - return locations_.size(); - } else { - return locationsBuilder_.getCount(); - } - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public com.google.cloud.location.Location getLocations(int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); - } else { - return locationsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder setLocations(int index, com.google.cloud.location.Location value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.set(index, value); - onChanged(); - } else { - locationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder setLocations( - int index, com.google.cloud.location.Location.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.set(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder addLocations(com.google.cloud.location.Location value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - } else { - locationsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder addLocations(int index, com.google.cloud.location.Location value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(index, value); - onChanged(); - } else { - locationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder addLocations(com.google.cloud.location.Location.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder addLocations( - int index, com.google.cloud.location.Location.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder addAllLocations( - java.lang.Iterable values) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); - onChanged(); - } else { - locationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder clearLocations() { - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - locationsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public Builder removeLocations(int index) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.remove(index); - onChanged(); - } else { - locationsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public com.google.cloud.location.Location.Builder getLocationsBuilder(int index) { - return getLocationsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); - } else { - return locationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public java.util.List - getLocationsOrBuilderList() { - if (locationsBuilder_ != null) { - return locationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(locations_); - } - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public com.google.cloud.location.Location.Builder addLocationsBuilder() { - return getLocationsFieldBuilder() - .addBuilder(com.google.cloud.location.Location.getDefaultInstance()); - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public com.google.cloud.location.Location.Builder addLocationsBuilder(int index) { - return getLocationsFieldBuilder() - .addBuilder(index, com.google.cloud.location.Location.getDefaultInstance()); - } - /** - * - * - *
-     * A list of locations that matches the specified filter in the request.
-     * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - public java.util.List getLocationsBuilderList() { - return getLocationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.location.Location, - com.google.cloud.location.Location.Builder, - com.google.cloud.location.LocationOrBuilder> - getLocationsFieldBuilder() { - if (locationsBuilder_ == null) { - locationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.location.Location, - com.google.cloud.location.Location.Builder, - com.google.cloud.location.LocationOrBuilder>( - locations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - locations_ = null; - } - return locationsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * The standard List next-page token.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * The standard List next-page token.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * The standard List next-page token.
-     * 
- * - * 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; - onChanged(); - return this; - } - /** - * - * - *
-     * The standard List next-page token.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * The standard List next-page token.
-     * 
- * - * 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; - 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.location.ListLocationsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.location.ListLocationsResponse) - private static final com.google.cloud.location.ListLocationsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.location.ListLocationsResponse(); - } - - public static com.google.cloud.location.ListLocationsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListLocationsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListLocationsResponse(input, extensionRegistry); - } - }; - - 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.location.ListLocationsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java deleted file mode 100644 index 704771cc4..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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/location/locations.proto - -package com.google.cloud.location; - -public interface ListLocationsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.location.ListLocationsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - java.util.List getLocationsList(); - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - com.google.cloud.location.Location getLocations(int index); - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - int getLocationsCount(); - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - java.util.List getLocationsOrBuilderList(); - /** - * - * - *
-   * A list of locations that matches the specified filter in the request.
-   * 
- * - * repeated .google.cloud.location.Location locations = 1; - */ - com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index); - - /** - * - * - *
-   * The standard List next-page token.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * The standard List next-page token.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/Location.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/Location.java deleted file mode 100644 index 7b7bfc864..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/Location.java +++ /dev/null @@ -1,1615 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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/location/locations.proto - -package com.google.cloud.location; - -/** - * - * - *
- * A resource that represents Google Cloud Platform location.
- * 
- * - * Protobuf type {@code google.cloud.location.Location} - */ -public final class Location extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.location.Location) - LocationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Location() { - name_ = ""; - locationId_ = ""; - displayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Location(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Location( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 26: - { - com.google.protobuf.Any.Builder subBuilder = null; - if (metadata_ != null) { - subBuilder = metadata_.toBuilder(); - } - metadata_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metadata_); - metadata_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_Location_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.location.Location.class, - com.google.cloud.location.Location.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Resource name for the location, which may vary between implementations.
-   * For example: `"projects/example-project/locations/us-east1"`
-   * 
- * - * 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; - } - } - /** - * - * - *
-   * Resource name for the location, which may vary between implementations.
-   * For example: `"projects/example-project/locations/us-east1"`
-   * 
- * - * 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 LOCATION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object locationId_; - /** - * - * - *
-   * The canonical id for this location. For example: `"us-east1"`.
-   * 
- * - * string location_id = 4; - * - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - 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(); - locationId_ = s; - return s; - } - } - /** - * - * - *
-   * The canonical id for this location. For example: `"us-east1"`.
-   * 
- * - * string location_id = 4; - * - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 5; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * The friendly name for this location, typically a nearby city name.
-   * For example, "Tokyo".
-   * 
- * - * string display_name = 5; - * - * @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; - } - } - /** - * - * - *
-   * The friendly name for this location, typically a nearby city name.
-   * For example, "Tokyo".
-   * 
- * - * string display_name = 5; - * - * @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 LABELS_FIELD_NUMBER = 2; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_Location_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - 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(); - } - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - @java.lang.Override - public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int METADATA_FIELD_NUMBER = 3; - private com.google.protobuf.Any metadata_; - /** - * - * - *
-   * Service-specific metadata. For example the available capacity at the given
-   * location.
-   * 
- * - * .google.protobuf.Any metadata = 3; - * - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * - * - *
-   * Service-specific metadata. For example the available capacity at the given
-   * location.
-   * 
- * - * .google.protobuf.Any metadata = 3; - * - * @return The metadata. - */ - @java.lang.Override - public com.google.protobuf.Any getMetadata() { - return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; - } - /** - * - * - *
-   * Service-specific metadata. For example the available capacity at the given
-   * location.
-   * 
- * - * .google.protobuf.Any metadata = 3; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { - return getMetadata(); - } - - 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); - if (metadata_ != null) { - output.writeMessage(3, getMetadata()); - } - if (!getLocationIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - 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(2, labels__); - } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); - } - if (!getLocationIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); - } - size += unknownFields.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.location.Location)) { - return super.equals(obj); - } - com.google.cloud.location.Location other = (com.google.cloud.location.Location) obj; - - if (!getName().equals(other.getName())) return false; - if (!getLocationId().equals(other.getLocationId())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata().equals(other.getMetadata())) return false; - } - if (!unknownFields.equals(other.unknownFields)) 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) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.location.Location parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.location.Location 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.location.Location parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.location.Location 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.location.Location parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.location.Location parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.location.Location parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.location.Location 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.location.Location parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.location.Location 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.location.Location parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.location.Location 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.location.Location 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 resource that represents Google Cloud Platform location.
-   * 
- * - * Protobuf type {@code google.cloud.location.Location} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.location.Location) - com.google.cloud.location.LocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_Location_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.location.Location.class, - com.google.cloud.location.Location.Builder.class); - } - - // Construct using com.google.cloud.location.Location.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - locationId_ = ""; - - displayName_ = ""; - - internalGetMutableLabels().clear(); - if (metadataBuilder_ == null) { - metadata_ = null; - } else { - metadata_ = null; - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.location.LocationsProto - .internal_static_google_cloud_location_Location_descriptor; - } - - @java.lang.Override - public com.google.cloud.location.Location getDefaultInstanceForType() { - return com.google.cloud.location.Location.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.location.Location build() { - com.google.cloud.location.Location result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.location.Location buildPartial() { - com.google.cloud.location.Location result = new com.google.cloud.location.Location(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.locationId_ = locationId_; - result.displayName_ = displayName_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (metadataBuilder_ == null) { - result.metadata_ = metadata_; - } else { - result.metadata_ = metadataBuilder_.build(); - } - 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.location.Location) { - return mergeFrom((com.google.cloud.location.Location) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.location.Location other) { - if (other == com.google.cloud.location.Location.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.unknownFields); - 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 { - com.google.cloud.location.Location parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.location.Location) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Resource name for the location, which may vary between implementations.
-     * For example: `"projects/example-project/locations/us-east1"`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Resource name for the location, which may vary between implementations.
-     * For example: `"projects/example-project/locations/us-east1"`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Resource name for the location, which may vary between implementations.
-     * For example: `"projects/example-project/locations/us-east1"`
-     * 
- * - * 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; - onChanged(); - return this; - } - /** - * - * - *
-     * Resource name for the location, which may vary between implementations.
-     * For example: `"projects/example-project/locations/us-east1"`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Resource name for the location, which may vary between implementations.
-     * For example: `"projects/example-project/locations/us-east1"`
-     * 
- * - * 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; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - * - * - *
-     * The canonical id for this location. For example: `"us-east1"`.
-     * 
- * - * string location_id = 4; - * - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The canonical id for this location. For example: `"us-east1"`.
-     * 
- * - * string location_id = 4; - * - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The canonical id for this location. For example: `"us-east1"`.
-     * 
- * - * string location_id = 4; - * - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The canonical id for this location. For example: `"us-east1"`.
-     * 
- * - * string location_id = 4; - * - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - * - * - *
-     * The canonical id for this location. For example: `"us-east1"`.
-     * 
- * - * string location_id = 4; - * - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * The friendly name for this location, typically a nearby city name.
-     * For example, "Tokyo".
-     * 
- * - * string display_name = 5; - * - * @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; - } - } - /** - * - * - *
-     * The friendly name for this location, typically a nearby city name.
-     * For example, "Tokyo".
-     * 
- * - * string display_name = 5; - * - * @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; - } - } - /** - * - * - *
-     * The friendly name for this location, typically a nearby city name.
-     * For example, "Tokyo".
-     * 
- * - * string display_name = 5; - * - * @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; - onChanged(); - return this; - } - /** - * - * - *
-     * The friendly name for this location, typically a nearby city name.
-     * For example, "Tokyo".
-     * 
- * - * string display_name = 5; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The friendly name for this location, typically a nearby city name.
-     * For example, "Tokyo".
-     * 
- * - * string display_name = 5; - * - * @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; - 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() { - onChanged(); - ; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * Cross-service attributes for the location. For example
-     *     {"cloud.googleapis.com/region": "us-east1"}
-     * 
- * - * map<string, string> labels = 2; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * Cross-service attributes for the location. For example
-     *     {"cloud.googleapis.com/region": "us-east1"}
-     * 
- * - * map<string, string> labels = 2; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Cross-service attributes for the location. For example
-     *     {"cloud.googleapis.com/region": "us-east1"}
-     * 
- * - * map<string, string> labels = 2; - */ - @java.lang.Override - public java.lang.String getLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Cross-service attributes for the location. For example
-     *     {"cloud.googleapis.com/region": "us-east1"}
-     * 
- * - * map<string, string> labels = 2; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Cross-service attributes for the location. For example
-     *     {"cloud.googleapis.com/region": "us-east1"}
-     * 
- * - * map<string, string> labels = 2; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * Cross-service attributes for the location. For example
-     *     {"cloud.googleapis.com/region": "us-east1"}
-     * 
- * - * map<string, string> labels = 2; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableLabels().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Cross-service attributes for the location. For example
-     *     {"cloud.googleapis.com/region": "us-east1"}
-     * 
- * - * map<string, string> labels = 2; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.Any metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, - com.google.protobuf.Any.Builder, - com.google.protobuf.AnyOrBuilder> - metadataBuilder_; - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - * - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return metadataBuilder_ != null || metadata_ != null; - } - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - * - * @return The metadata. - */ - public com.google.protobuf.Any getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - */ - public Builder setMetadata(com.google.protobuf.Any value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - onChanged(); - } else { - metadataBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - */ - public Builder setMetadata(com.google.protobuf.Any.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - onChanged(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - */ - public Builder mergeMetadata(com.google.protobuf.Any value) { - if (metadataBuilder_ == null) { - if (metadata_ != null) { - metadata_ = com.google.protobuf.Any.newBuilder(metadata_).mergeFrom(value).buildPartial(); - } else { - metadata_ = value; - } - onChanged(); - } else { - metadataBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - */ - public Builder clearMetadata() { - if (metadataBuilder_ == null) { - metadata_ = null; - onChanged(); - } else { - metadata_ = null; - metadataBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - */ - public com.google.protobuf.Any.Builder getMetadataBuilder() { - - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - */ - public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; - } - } - /** - * - * - *
-     * Service-specific metadata. For example the available capacity at the given
-     * location.
-     * 
- * - * .google.protobuf.Any metadata = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, - com.google.protobuf.Any.Builder, - com.google.protobuf.AnyOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, - com.google.protobuf.Any.Builder, - com.google.protobuf.AnyOrBuilder>(getMetadata(), getParentForChildren(), isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - @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.location.Location) - } - - // @@protoc_insertion_point(class_scope:google.cloud.location.Location) - private static final com.google.cloud.location.Location DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.location.Location(); - } - - public static com.google.cloud.location.Location getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Location parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Location(input, extensionRegistry); - } - }; - - 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.location.Location getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationOrBuilder.java deleted file mode 100644 index 98ab25deb..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationOrBuilder.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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/location/locations.proto - -package com.google.cloud.location; - -public interface LocationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.location.Location) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Resource name for the location, which may vary between implementations.
-   * For example: `"projects/example-project/locations/us-east1"`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Resource name for the location, which may vary between implementations.
-   * For example: `"projects/example-project/locations/us-east1"`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The canonical id for this location. For example: `"us-east1"`.
-   * 
- * - * string location_id = 4; - * - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - * - * - *
-   * The canonical id for this location. For example: `"us-east1"`.
-   * 
- * - * string location_id = 4; - * - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString getLocationIdBytes(); - - /** - * - * - *
-   * The friendly name for this location, typically a nearby city name.
-   * For example, "Tokyo".
-   * 
- * - * string display_name = 5; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * The friendly name for this location, typically a nearby city name.
-   * For example, "Tokyo".
-   * 
- * - * string display_name = 5; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - int getLabelsCount(); - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Cross-service attributes for the location. For example
-   *     {"cloud.googleapis.com/region": "us-east1"}
-   * 
- * - * map<string, string> labels = 2; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Service-specific metadata. For example the available capacity at the given
-   * location.
-   * 
- * - * .google.protobuf.Any metadata = 3; - * - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * - * - *
-   * Service-specific metadata. For example the available capacity at the given
-   * location.
-   * 
- * - * .google.protobuf.Any metadata = 3; - * - * @return The metadata. - */ - com.google.protobuf.Any getMetadata(); - /** - * - * - *
-   * Service-specific metadata. For example the available capacity at the given
-   * location.
-   * 
- * - * .google.protobuf.Any metadata = 3; - */ - com.google.protobuf.AnyOrBuilder getMetadataOrBuilder(); -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationsProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationsProto.java deleted file mode 100644 index d2b6da306..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/location/LocationsProto.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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/location/locations.proto - -package com.google.cloud.location; - -public final class LocationsProto { - private LocationsProto() {} - - 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_location_ListLocationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_location_ListLocationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_location_GetLocationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_location_Location_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_location_Location_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_location_Location_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_location_Location_LabelsEntry_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/location/locations.proto\022" - + "\025google.cloud.location\032\034google/api/annot" - + "ations.proto\032\031google/protobuf/any.proto\032" - + "\027google/api/client.proto\"[\n\024ListLocation" - + "sRequest\022\014\n\004name\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021" - + "\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"d\n" - + "\025ListLocationsResponse\0222\n\tlocations\030\001 \003(" - + "\0132\037.google.cloud.location.Location\022\027\n\017ne" - + "xt_page_token\030\002 \001(\t\"\"\n\022GetLocationReques" - + "t\022\014\n\004name\030\001 \001(\t\"\327\001\n\010Location\022\014\n\004name\030\001 \001" - + "(\t\022\023\n\013location_id\030\004 \001(\t\022\024\n\014display_name\030" - + "\005 \001(\t\022;\n\006labels\030\002 \003(\0132+.google.cloud.loc" - + "ation.Location.LabelsEntry\022&\n\010metadata\030\003" - + " \001(\0132\024.google.protobuf.Any\032-\n\013LabelsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\0012\244\003\n\tLo" - + "cations\022\253\001\n\rListLocations\022+.google.cloud" - + ".location.ListLocationsRequest\032,.google." - + "cloud.location.ListLocationsResponse\"?\202\323" - + "\344\223\0029\022\024/v1/{name=locations}Z!\022\037/v1/{name=" - + "projects/*}/locations\022\236\001\n\013GetLocation\022)." - + "google.cloud.location.GetLocationRequest" - + "\032\037.google.cloud.location.Location\"C\202\323\344\223\002" - + "=\022\026/v1/{name=locations/*}Z#\022!/v1/{name=p" - + "rojects/*/locations/*}\032H\312A\024cloud.googlea" - + "pis.com\322A.https://www.googleapis.com/aut" - + "h/cloud-platformBo\n\031com.google.cloud.loc" - + "ationB\016LocationsProtoP\001Z=google.golang.o" - + "rg/genproto/googleapis/cloud/location;lo" - + "cation\370\001\001b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - }); - internal_static_google_cloud_location_ListLocationsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_location_ListLocationsRequest_descriptor, - new java.lang.String[] { - "Name", "Filter", "PageSize", "PageToken", - }); - internal_static_google_cloud_location_ListLocationsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_location_ListLocationsResponse_descriptor, - new java.lang.String[] { - "Locations", "NextPageToken", - }); - internal_static_google_cloud_location_GetLocationRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_location_GetLocationRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_location_Location_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_location_Location_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_location_Location_descriptor, - new java.lang.String[] { - "Name", "LocationId", "DisplayName", "Labels", "Metadata", - }); - internal_static_google_cloud_location_Location_LabelsEntry_descriptor = - internal_static_google_cloud_location_Location_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_location_Location_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_location_Location_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.oauthScopes); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto index d3e30db02..0322519c6 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -94,6 +94,7 @@ service Agents { } // Exports the specified agent to a binary file. + // // This method is a [long-running // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned `Operation` type has the following method-specific fields: @@ -117,6 +118,15 @@ service Agents { // Replaces the current agent with a new one. Note that all existing resources // in agent (e.g. intents, entity types, flows) will be removed. // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + // // Note: You should always train a flow prior to sending it queries. See the // [training // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index 3814693ab..8c8759c08 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -31,31 +31,6 @@ option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // Time offset relative to the beginning of the audio that corresponds to the - // start of the spoken word. This is an experimental feature and the accuracy - // of the time offset can vary. - google.protobuf.Duration start_offset = 1; - - // Time offset relative to the beginning of the audio that corresponds to the - // end of the spoken word. This is an experimental feature and the accuracy of - // the time offset can vary. - google.protobuf.Duration end_offset = 2; - - // The Speech confidence between 0.0 and 1.0 for this word. A higher number - // indicates an estimated greater likelihood that the recognized word is - // correct. The default of 0.0 is a sentinel value indicating that confidence - // was not set. - // - // This field is not guaranteed to be fully stable over time for the same - // audio input. Users should also not rely on it to always be provided. - float confidence = 4; -} - // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -105,6 +80,31 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + google.protobuf.Duration start_offset = 1; + + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + google.protobuf.Duration end_offset = 2; + + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + float confidence = 4; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/deployment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/deployment.proto new file mode 100644 index 000000000..6a4cb162a --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/deployment.proto @@ -0,0 +1,171 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx"; +option java_multiple_files = true; +option java_outer_classname = "DeploymentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; + +// Service for managing [Deployments][google.cloud.dialogflow.cx.v3beta1.Deployment]. +service Deployments { + 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"; + + // Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + rpc ListDeployments(ListDeploymentsRequest) returns (ListDeploymentsResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/deployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + rpc GetDeployment(GetDeploymentRequest) returns (Deployment) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Represents an deployment in an environment. A deployment happens when a flow +// version configured to be active in the environment. You can configure running +// pre-deployment steps, e.g. running validation test cases, experiment +// auto-rollout, etc. +message Deployment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Deployment" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}" + }; + + // Result of the deployment. + message Result { + // Results of test cases running before the deployment. + // Format: `projects//locations//agents//testCases//results/`. + repeated string deployment_test_results = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCaseResult" + }]; + + // The name of the experiment triggered by this deployment. + // Format: projects//locations//agents//environments//experiments/. + string experiment = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + }]; + } + + // The state of the deployment. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The deployment is running. + RUNNING = 1; + + // The deployment succeeded. + SUCCEEDED = 2; + + // The deployment failed. + FAILED = 3; + } + + // The name of the deployment. + // Format: projects//locations//agents//environments//deployments/. + string name = 1; + + // The name of the flow version for this deployment. + // Format: projects//locations//agents//flows//versions/. + string flow_version = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + }]; + + // The current state of the deployment. + State state = 3; + + // Result of the deployment. + Result result = 4; + + // Start time of this deployment. + google.protobuf.Timestamp start_time = 5; + + // End time of this deployment. + google.protobuf.Timestamp end_time = 6; +} + +// The request message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments]. +message ListDeploymentsRequest { + // Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Deployment" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments]. +message ListDeploymentsResponse { + // The list of deployments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + repeated Deployment deployments = 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 [Deployments.GetDeployment][google.cloud.dialogflow.cx.v3beta1.Deployments.GetDeployment]. +message GetDeploymentRequest { + // Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + // Format: `projects//locations//agents//environments//deployments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Deployment" + } + ]; +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto index 73c22ca70..61bf0648e 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto @@ -59,6 +59,14 @@ service Environments { } // Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments" @@ -72,6 +80,14 @@ service Environments { } // Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v3beta1/{environment.name=projects/*/locations/*/agents/*/environments/*}" @@ -101,6 +117,13 @@ service Environments { } // Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata] + // - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse] rpc RunContinuousTest(RunContinuousTestRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3beta1/{environment=projects/*/locations/*/agents/*/environments/*}:runContinuousTest" @@ -119,6 +142,25 @@ service Environments { }; option (google.api.method_signature) = "parent"; } + + // Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata] + // - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse] + rpc DeployFlow(DeployFlowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{environment=projects/*/locations/*/agents/*/environments/*}:deployFlow" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "DeployFlowResponse" + metadata_type: "DeployFlowMetadata" + }; + } } // Represents an environment for an agent. You can create multiple versions @@ -147,6 +189,24 @@ message Environment { ]; } + // The configuration for continuous tests. + message TestCasesConfig { + // A list of test case names to run. They should be under the same agent. + // Format of each test case name: `projects//locations/ + // /agents//testCases/` + repeated string test_cases = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + }]; + + // Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] periodically. + // Default false. If set to true, run once a day. + bool enable_continuous_run = 2; + + // Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] before + // deploying a flow version to the environment. Default false. + bool enable_predeployment_run = 3; + } + // The name of the environment. // Format: `projects//locations//agents//environments/`. @@ -168,6 +228,9 @@ message Environment { // Output only. Update time of this environment. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The test cases config for continuous tests of this environment. + TestCasesConfig test_cases_config = 7; } // The request message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironments]. @@ -375,3 +438,44 @@ message ListContinuousTestResultsResponse { // results in the list. string next_page_token = 2; } + +// The request message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow]. +message DeployFlowRequest { + // Required. The environment to deploy the flow to. + // Format: `projects//locations//agents// + // environments/`. + string environment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Required. The flow version to deploy. + // Format: `projects//locations//agents// + // flows//versions/`. + string flow_version = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + } + ]; +} + +// The response message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow]. +message DeployFlowResponse { + // The updated environment where the flow is deployed. + Environment environment = 1; + + // The name of the flow version deployment. + // Format: `projects//locations//agents// + // environments//deployments/`. + string deployment = 2; +} + +// Metadata returned for the [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow] long running +// operation. +message DeployFlowMetadata { + // Errors of running deployment tests. + repeated TestError test_errors = 1; +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto index b6a66ca62..1d8e6c88c 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -97,6 +97,15 @@ service Flows { // Trains the specified flow. Note that only the flow in 'draft' environment // is trained. // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + // // Note: You should always train a flow prior to sending it queries. See the // [training // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -133,6 +142,14 @@ service Flows { // Imports the specified flow to the specified agent from a binary file. // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] + // // Note: You should always train a flow prior to sending it queries. See the // [training // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -149,6 +166,14 @@ service Flows { // Exports the specified flow to a binary file. // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] + // // Note that resources (e.g. intents, entities, webhooks) that the flow // references will also be exported. rpc ExportFlow(ExportFlowRequest) returns (google.longrunning.Operation) { diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto index 95d1d60b2..2ff3e804d 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto @@ -222,10 +222,13 @@ message SecuritySettings { DIALOGFLOW_HISTORY = 1; } - // Required. Resource name of the settings. + // Resource name of the settings. + // Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method. + // [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name + // automatically. // Format: `projects//locations//securitySettings/`. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + string name = 1; // Required. The human-readable name of the security settings, unique within the // location. diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto index 729ea554b..d71656a2d 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -94,6 +94,7 @@ service TestCases { } // Kicks off a test case run. + // // This method is a [long-running // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned `Operation` type has the following method-specific fields: @@ -112,6 +113,13 @@ service TestCases { } // Kicks off a batch run of test cases. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata] + // - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse] rpc BatchRunTestCases(BatchRunTestCasesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases:batchRun" @@ -133,6 +141,13 @@ service TestCases { // Imports the test cases from a Cloud Storage bucket or a local file. It // always creates new test cases and won't overwite any existing ones. The // provided ID in the imported test case is neglected. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata] + // - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse] rpc ImportTestCases(ImportTestCasesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases:import" @@ -146,6 +161,13 @@ service TestCases { // Exports the test cases under the agent to a Cloud Storage bucket or a local // file. Filter can be applied to export a subset of test cases. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata] + // - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse] rpc ExportTestCases(ExportTestCasesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases:export" @@ -820,6 +842,7 @@ message ExportTestCasesResponse { // Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases] long running // operation. +// This message currently has no fields. message ExportTestCasesMetadata { } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto index d5b442310..1c1e168cb 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/version.proto @@ -64,6 +64,13 @@ service Versions { } // Creates a [Version][google.cloud.dialogflow.cx.v3beta1.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata] + // - `response`: [Version][google.cloud.dialogflow.cx.v3beta1.Version] rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3beta1/{parent=projects/*/locations/*/agents/*/flows/*}/versions" @@ -94,6 +101,15 @@ service Versions { } // Loads resources in the specified version to the draft flow. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) rpc LoadVersion(LoadVersionRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*/versions/*}:load" diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/location/locations.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/location/locations.proto deleted file mode 100644 index a91766c9d..000000000 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/location/locations.proto +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.location; - -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "google/api/client.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/location;location"; -option java_multiple_files = true; -option java_outer_classname = "LocationsProto"; -option java_package = "com.google.cloud.location"; - -// An abstract interface that provides location-related information for -// a service. Service-specific metadata is provided through the -// [Location.metadata][google.cloud.location.Location.metadata] field. -service Locations { - option (google.api.default_host) = "cloud.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Lists information about the supported locations for this service. - rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) { - option (google.api.http) = { - get: "/v1/{name=locations}" - additional_bindings { - get: "/v1/{name=projects/*}/locations" - } - }; - } - - // Gets information about a location. - rpc GetLocation(GetLocationRequest) returns (Location) { - option (google.api.http) = { - get: "/v1/{name=locations/*}" - additional_bindings { - get: "/v1/{name=projects/*/locations/*}" - } - }; - } -} - -// The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations]. -message ListLocationsRequest { - // The resource that owns the locations collection, if applicable. - string name = 1; - - // The standard list filter. - string filter = 2; - - // The standard list page size. - int32 page_size = 3; - - // The standard list page token. - string page_token = 4; -} - -// The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations]. -message ListLocationsResponse { - // A list of locations that matches the specified filter in the request. - repeated Location locations = 1; - - // The standard List next-page token. - string next_page_token = 2; -} - -// The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation]. -message GetLocationRequest { - // Resource name for the location. - string name = 1; -} - -// A resource that represents Google Cloud Platform location. -message Location { - // Resource name for the location, which may vary between implementations. - // For example: `"projects/example-project/locations/us-east1"` - string name = 1; - - // The canonical id for this location. For example: `"us-east1"`. - string location_id = 4; - - // The friendly name for this location, typically a nearby city name. - // For example, "Tokyo". - string display_name = 5; - - // Cross-service attributes for the location. For example - // - // {"cloud.googleapis.com/region": "us-east1"} - map labels = 2; - - // Service-specific metadata. For example the available capacity at the given - // location. - google.protobuf.Any metadata = 3; -}