diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java index 878f1383d..4a33757e6 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java @@ -671,7 +671,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: * @@ -705,7 +707,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: * @@ -739,7 +743,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: * @@ -776,6 +782,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 flows prior to sending them queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -805,6 +820,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 flows prior to sending them queries. See the [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). * @@ -835,6 +859,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 flows prior to sending them 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/v3/DeploymentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentsClient.java new file mode 100644 index 000000000..9b98e6f70 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentsClient.java @@ -0,0 +1,517 @@ +/* + * 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.v3; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.stub.DeploymentsStub; +import com.google.cloud.dialogflow.cx.v3.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.v3.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. + */ +@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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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/v3/DeploymentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentsSettings.java new file mode 100644 index 000000000..914d0ef2f --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentsSettings.java @@ -0,0 +1,196 @@ +/* + * 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.v3; + +import static com.google.cloud.dialogflow.cx.v3.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.v3.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();
+ * }
+ */ +@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/v3/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java index 6336cdf75..45ec2fcf7 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java @@ -425,6 +425,14 @@ public final UnaryCallable getEnvironmentCal * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified * [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -456,6 +464,14 @@ public final OperationFuture createEnvironmentAsync(
    * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified
    * [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -485,6 +501,14 @@ public final OperationFuture createEnvironmentAsync(
    * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified
    * [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -513,6 +537,14 @@ public final OperationFuture createEnvironmentAsync(
    * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified
    * [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -541,6 +573,14 @@ public final OperationFuture createEnvironmentAsync(
    * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified
    * [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -567,6 +607,14 @@ public final UnaryCallable createEnvironmen
   /**
    * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -596,6 +644,14 @@ public final OperationFuture updateEnvironmentAsync(
   /**
    * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -621,6 +677,14 @@ public final OperationFuture updateEnvironmentAsync(
   /**
    * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -646,6 +710,14 @@ public final OperationFuture updateEnvironmentAsync(
   /**
    * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment] + * *

Sample code: * *

{@code
@@ -926,6 +998,15 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory(
    * Kicks off a continuous test under the specified
    * [Environment][google.cloud.dialogflow.cx.v3.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.v3.RunContinuousTestMetadata] - + * `response`: + * [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse] + * *

Sample code: * *

{@code
@@ -953,6 +1034,15 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory(
    * Kicks off a continuous test under the specified
    * [Environment][google.cloud.dialogflow.cx.v3.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.v3.RunContinuousTestMetadata] - + * `response`: + * [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse] + * *

Sample code: * *

{@code
@@ -981,6 +1071,15 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory(
    * Kicks off a continuous test under the specified
    * [Environment][google.cloud.dialogflow.cx.v3.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.v3.RunContinuousTestMetadata] - + * `response`: + * [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse] + * *

Sample code: * *

{@code
@@ -1177,6 +1276,112 @@ public final ListContinuousTestResultsPagedResponse listContinuousTestResults(
     return stub.listContinuousTestResultsCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD.
+  /**
+   * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata] - + * `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.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.v3.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.v3.DeployFlowMetadata] - + * `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.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.v3.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.v3.DeployFlowMetadata] - + * `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.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/v3/EnvironmentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java index 53c80202f..7ab0aaf86 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java @@ -143,6 +143,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(); @@ -312,6 +323,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/v3/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java index 79d1543f6..ffe87bc4c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java @@ -685,6 +685,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). * @@ -711,6 +720,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). * @@ -736,6 +754,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). * @@ -762,6 +789,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). * @@ -788,6 +824,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). * @@ -973,6 +1018,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.v3.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). * @@ -1000,6 +1053,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.v3.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). * @@ -1027,6 +1088,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.v3.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). * @@ -1052,6 +1121,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.v3.ExportFlowResponse] + * *

Note that resources (e.g. intents, entities, webhooks) that the flow references will also be * exported. * @@ -1081,6 +1158,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.v3.ExportFlowResponse] + * *

Note that resources (e.g. intents, entities, webhooks) that the flow references will also be * exported. * @@ -1110,6 +1195,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.v3.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/v3/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java index 5a4c0a7c3..2171d3269 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java @@ -675,7 +675,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: * @@ -708,7 +710,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: * @@ -741,7 +745,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: * @@ -774,6 +780,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.v3.BatchRunTestCasesMetadata] - + * `response`: + * [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse] + * *

Sample code: * *

{@code
@@ -803,6 +818,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.v3.BatchRunTestCasesMetadata] - + * `response`: + * [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse] + * *

Sample code: * *

{@code
@@ -833,6 +857,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.v3.BatchRunTestCasesMetadata] - + * `response`: + * [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse] + * *

Sample code: * *

{@code
@@ -909,6 +942,14 @@ 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.v3.ImportTestCasesMetadata] - `response`: + * [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -936,6 +977,14 @@ 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.v3.ImportTestCasesMetadata] - `response`: + * [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -964,6 +1013,14 @@ 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.v3.ImportTestCasesMetadata] - `response`: + * [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -988,6 +1045,14 @@ 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.v3.ExportTestCasesMetadata] - `response`: + * [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -1015,6 +1080,14 @@ 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.v3.ExportTestCasesMetadata] - `response`: + * [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse] + * *

Sample code: * *

{@code
@@ -1043,6 +1116,14 @@ 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.v3.ExportTestCasesMetadata] - `response`: + * [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse] + * *

Sample code: * *

{@code
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java
index ca85d0192..ded3c9154 100644
--- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java
@@ -413,6 +413,14 @@ public final UnaryCallable getVersionCallable() {
    * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version] + * *

Sample code: * *

{@code
@@ -444,6 +452,14 @@ public final OperationFuture createVers
    * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version] + * *

Sample code: * *

{@code
@@ -473,6 +489,14 @@ public final OperationFuture createVers
    * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version] + * *

Sample code: * *

{@code
@@ -501,6 +525,14 @@ public final OperationFuture createVers
    * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version] + * *

Sample code: * *

{@code
@@ -529,6 +561,14 @@ public final OperationFuture createVers
    * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
    * [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata] + * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version] + * *

Sample code: * *

{@code
@@ -724,6 +764,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
@@ -749,6 +798,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
@@ -773,6 +831,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
@@ -799,6 +866,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
@@ -825,6 +901,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/v3/gapic_metadata.json b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json
index 683008f78..bc1f63b2a 100644
--- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/package-info.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java
index 3acd198fe..09086c160 100644
--- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java
@@ -32,6 +32,21 @@
  * }
  * }
* + *

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

Service Description: Service for managing + * [Deployments][google.cloud.dialogflow.cx.v3.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/v3/stub/DeploymentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/DeploymentsStub.java new file mode 100644 index 000000000..935fec5fd --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/DeploymentsStub.java @@ -0,0 +1,53 @@ +/* + * 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.DeploymentsClient.ListDeploymentsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3.Deployment; +import com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest; +import com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; +import com.google.cloud.dialogflow.cx.v3.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. + */ +@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/v3/stub/DeploymentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/DeploymentsStubSettings.java new file mode 100644 index 000000000..a26bb0be3 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/DeploymentsStubSettings.java @@ -0,0 +1,374 @@ +/* + * 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.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.v3.Deployment; +import com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest; +import com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; +import com.google.cloud.dialogflow.cx.v3.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();
+ * }
+ */ +@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/v3/stub/EnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStub.java index 6766b4a6d..d3e5c5647 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStub.java @@ -25,6 +25,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata; +import com.google.cloud.dialogflow.cx.v3.DeployFlowRequest; +import com.google.cloud.dialogflow.cx.v3.DeployFlowResponse; import com.google.cloud.dialogflow.cx.v3.Environment; import com.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest; @@ -127,6 +130,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/v3/stub/EnvironmentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java index a965caba2..289216744 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java @@ -49,6 +49,9 @@ import com.google.cloud.dialogflow.cx.v3.ContinuousTestResult; import com.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata; +import com.google.cloud.dialogflow.cx.v3.DeployFlowRequest; +import com.google.cloud.dialogflow.cx.v3.DeployFlowResponse; import com.google.cloud.dialogflow.cx.v3.Environment; import com.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest; @@ -139,6 +142,9 @@ public class EnvironmentsStubSettings extends StubSettings listContinuousTestResultsSettings; + private final UnaryCallSettings deployFlowSettings; + private final OperationCallSettings + deployFlowOperationSettings; private static final PagedListDescriptor< ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> @@ -415,6 +421,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() @@ -505,6 +522,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. */ @@ -540,6 +559,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; @@ -591,6 +614,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( @@ -601,7 +626,8 @@ protected Builder(ClientContext clientContext) { deleteEnvironmentSettings, lookupEnvironmentHistorySettings, runContinuousTestSettings, - listContinuousTestResultsSettings); + listContinuousTestResultsSettings, + deployFlowSettings); initDefaults(this); } @@ -619,6 +645,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( @@ -629,7 +657,8 @@ protected Builder(EnvironmentsStubSettings settings) { deleteEnvironmentSettings, lookupEnvironmentHistorySettings, runContinuousTestSettings, - listContinuousTestResultsSettings); + listContinuousTestResultsSettings, + deployFlowSettings); } private static Builder createDefault() { @@ -686,6 +715,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( @@ -760,6 +794,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; } @@ -856,6 +913,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/v3/stub/GrpcDeploymentsCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcDeploymentsCallableFactory.java new file mode 100644 index 000000000..6b9ebcfa4 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcDeploymentsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * 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.v3.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Deployments service API. + * + *

This class is for advanced usage. + */ +@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/v3/stub/GrpcDeploymentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcDeploymentsStub.java new file mode 100644 index 000000000..d2f1a85aa --- /dev/null +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcDeploymentsStub.java @@ -0,0 +1,207 @@ +/* + * 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.v3.stub; + +import static com.google.cloud.dialogflow.cx.v3.DeploymentsClient.ListDeploymentsPagedResponse; + +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.v3.Deployment; +import com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest; +import com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; +import com.google.cloud.dialogflow.cx.v3.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. + */ +@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.v3.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.v3.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/v3/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java index 259ebedb2..7e2b480df 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java @@ -29,6 +29,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata; +import com.google.cloud.dialogflow.cx.v3.DeployFlowRequest; +import com.google.cloud.dialogflow.cx.v3.DeployFlowResponse; import com.google.cloud.dialogflow.cx.v3.Environment; import com.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest; @@ -149,6 +152,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.v3.Environments/DeployFlow") + .setRequestMarshaller(ProtoUtils.marshaller(DeployFlowRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private final UnaryCallable listEnvironmentsCallable; private final UnaryCallable @@ -175,6 +186,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; @@ -304,6 +318,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( @@ -372,6 +396,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()); @@ -461,6 +494,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/v3/DeploymentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/DeploymentsClientTest.java new file mode 100644 index 000000000..b382ccad4 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/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.v3; + +import static com.google.cloud.dialogflow.cx.v3.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/v3/EnvironmentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClientTest.java index c91cfe18c..685a10aaa 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/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/v3/MockDeployments.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockDeployments.java new file mode 100644 index 000000000..9bd707638 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/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.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class 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/v3/MockDeploymentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockDeploymentsImpl.java new file mode 100644 index 000000000..9885852c9 --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/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.v3; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3.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/v3/MockEnvironmentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironmentsImpl.java index c557bbf91..42ea86dec 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEnvironmentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/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-v3/clirr-ignored-differences.xml b/grpc-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml new file mode 100644 index 000000000..d102e9337 --- /dev/null +++ b/grpc-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml @@ -0,0 +1,8 @@ + + + + + 8001 + com/google/cloud/location/*Location* + + \ No newline at end of file diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java index 0f06eb78e..f0100d4f1 100644 --- a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsGrpc.java @@ -588,6 +588,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 flows prior to sending them queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -826,6 +833,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 flows prior to sending them queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -993,6 +1007,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 flows prior to sending them queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). @@ -1153,6 +1174,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 flows prior to sending them queries. See the * [training * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentsGrpc.java new file mode 100644 index 000000000..cf9fdcf11 --- /dev/null +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentsGrpc.java @@ -0,0 +1,480 @@ +/* + * 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.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing [Deployments][google.cloud.dialogflow.cx.v3.Deployment].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3/deployment.proto") +public final class DeploymentsGrpc { + + private DeploymentsGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.Deployments"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse> + getListDeploymentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDeployments", + requestType = com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse> + getListDeploymentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, + com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeploymentsMethodDescriptorSupplier("ListDeployments")) + .build(); + } + } + } + return getListDeploymentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest, + com.google.cloud.dialogflow.cx.v3.Deployment> + getGetDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDeployment", + requestType = com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.Deployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest, + com.google.cloud.dialogflow.cx.v3.Deployment> + getGetDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest, + com.google.cloud.dialogflow.cx.v3.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.v3.GetDeploymentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.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.v3.Deployment].
+   * 
+ */ + public abstract static class DeploymentsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
+     * 
+ */ + public void listDeployments( + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDeploymentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
+     * 
+ */ + public void getDeployment( + com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsRequest, + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse>( + this, METHODID_LIST_DEPLOYMENTS))) + .addMethod( + getGetDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest, + com.google.cloud.dialogflow.cx.v3.Deployment>(this, METHODID_GET_DEPLOYMENT))) + .build(); + } + } + + /** + * + * + *
+   * Service for managing [Deployments][google.cloud.dialogflow.cx.v3.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.v3.Environment].
+     * 
+ */ + public void listDeployments( + com.google.cloud.dialogflow.cx.v3.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.v3.Deployment].
+     * 
+ */ + public void getDeployment( + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.Environment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse listDeployments( + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDeploymentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3.Deployment getDeployment( + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDeploymentMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for managing [Deployments][google.cloud.dialogflow.cx.v3.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.v3.Environment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse> + listDeployments(com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDeploymentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3.Deployment> + getDeployment(com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse>) + responseObserver); + break; + case METHODID_GET_DEPLOYMENT: + serviceImpl.getDeployment( + (com.google.cloud.dialogflow.cx.v3.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.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsGrpc.java index ea9640717..79bf62c32 100644 --- a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsGrpc.java @@ -409,6 +409,48 @@ private EnvironmentsGrpc() {} return getListContinuousTestResultsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest, com.google.longrunning.Operation> + getDeployFlowMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeployFlow", + requestType = com.google.cloud.dialogflow.cx.v3.DeployFlowRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest, com.google.longrunning.Operation> + getDeployFlowMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.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.v3.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 = @@ -494,6 +536,12 @@ public void getEnvironment( * *
      * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment]
      * 
*/ public void createEnvironment( @@ -508,6 +556,12 @@ public void createEnvironment( * *
      * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment]
      * 
*/ public void updateEnvironment( @@ -552,6 +606,11 @@ public void lookupEnvironmentHistory( * *
      * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.RunContinuousTestMetadata]
+     * - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse]
      * 
*/ public void runContinuousTest( @@ -577,6 +636,24 @@ public void listContinuousTestResults( getListContinuousTestResultsMethod(), responseObserver); } + /** + * + * + *
+     * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata]
+     * - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse]
+     * 
+ */ + public void deployFlow( + com.google.cloud.dialogflow.cx.v3.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()) @@ -632,6 +709,12 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest, com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse>( this, METHODID_LIST_CONTINUOUS_TEST_RESULTS))) + .addMethod( + getDeployFlowMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest, + com.google.longrunning.Operation>(this, METHODID_DEPLOY_FLOW))) .build(); } } @@ -693,6 +776,12 @@ public void getEnvironment( * *
      * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment]
      * 
*/ public void createEnvironment( @@ -709,6 +798,12 @@ public void createEnvironment( * *
      * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment]
      * 
*/ public void updateEnvironment( @@ -759,6 +854,11 @@ public void lookupEnvironmentHistory( * *
      * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.RunContinuousTestMetadata]
+     * - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse]
      * 
*/ public void runContinuousTest( @@ -787,6 +887,25 @@ public void listContinuousTestResults( request, responseObserver); } + + /** + * + * + *
+     * Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata]
+     * - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse]
+     * 
+ */ + public void deployFlow( + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeployFlowMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -839,6 +958,12 @@ public com.google.cloud.dialogflow.cx.v3.Environment getEnvironment( * *
      * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment]
      * 
*/ public com.google.longrunning.Operation createEnvironment( @@ -852,6 +977,12 @@ public com.google.longrunning.Operation createEnvironment( * *
      * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment]
      * 
*/ public com.google.longrunning.Operation updateEnvironment( @@ -892,6 +1023,11 @@ public com.google.protobuf.Empty deleteEnvironment( * *
      * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.RunContinuousTestMetadata]
+     * - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse]
      * 
*/ public com.google.longrunning.Operation runContinuousTest( @@ -913,6 +1049,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.v3.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.v3.DeployFlowMetadata]
+     * - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse]
+     * 
+ */ + public com.google.longrunning.Operation deployFlow( + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeployFlowMethod(), getCallOptions(), request); + } } /** @@ -967,6 +1121,12 @@ protected EnvironmentsFutureStub build( * *
      * Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -980,6 +1140,12 @@ protected EnvironmentsFutureStub build( * *
      * Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1021,6 +1187,11 @@ protected EnvironmentsFutureStub build( * *
      * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.RunContinuousTestMetadata]
+     * - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1043,6 +1214,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.v3.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.v3.DeployFlowMetadata]
+     * - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse]
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deployFlow(com.google.cloud.dialogflow.cx.v3.DeployFlowRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeployFlowMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_ENVIRONMENTS = 0; @@ -1053,6 +1242,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, @@ -1118,6 +1308,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse>) responseObserver); break; + case METHODID_DEPLOY_FLOW: + serviceImpl.deployFlow( + (com.google.cloud.dialogflow.cx.v3.DeployFlowRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1190,6 +1385,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getLookupEnvironmentHistoryMethod()) .addMethod(getRunContinuousTestMethod()) .addMethod(getListContinuousTestResultsMethod()) + .addMethod(getDeployFlowMethod()) .build(); } } diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java index 4cf4592c6..91e378c8c 100644 --- a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsGrpc.java @@ -602,6 +602,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).
@@ -651,6 +658,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.v3.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).
@@ -667,6 +680,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.v3.ExportFlowResponse]
      * Note that resources (e.g. intents, entities, webhooks) that the flow
      * references will also be exported.
      * 
@@ -847,6 +866,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).
@@ -901,6 +927,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.v3.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).
@@ -918,6 +950,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.v3.ExportFlowResponse]
      * Note that resources (e.g. intents, entities, webhooks) that the flow
      * references will also be exported.
      * 
@@ -1025,6 +1063,13 @@ public com.google.cloud.dialogflow.cx.v3.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).
@@ -1070,6 +1115,12 @@ public com.google.cloud.dialogflow.cx.v3.FlowValidationResult getFlowValidationR
      *
      * 
      * 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.v3.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).
@@ -1086,6 +1137,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.v3.ExportFlowResponse]
      * Note that resources (e.g. intents, entities, webhooks) that the flow
      * references will also be exported.
      * 
@@ -1196,6 +1253,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). @@ -1244,6 +1308,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.v3.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). @@ -1260,6 +1330,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.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java index bacac2595..354620811 100644 --- a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesGrpc.java @@ -726,6 +726,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.v3.BatchRunTestCasesMetadata]
+     * - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse]
      * 
*/ public void batchRunTestCases( @@ -757,6 +762,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.v3.ImportTestCasesMetadata] + * - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] *
*/ public void importTestCases( @@ -772,6 +782,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.v3.ExportTestCasesMetadata]
+     * - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse]
      * 
*/ public void exportTestCases( @@ -1019,6 +1034,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.v3.BatchRunTestCasesMetadata]
+     * - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse]
      * 
*/ public void batchRunTestCases( @@ -1054,6 +1074,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.v3.ImportTestCasesMetadata] + * - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] *
*/ public void importTestCases( @@ -1071,6 +1096,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.v3.ExportTestCasesMetadata]
+     * - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse]
      * 
*/ public void exportTestCases( @@ -1225,6 +1255,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.v3.BatchRunTestCasesMetadata]
+     * - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse]
      * 
*/ public com.google.longrunning.Operation batchRunTestCases( @@ -1253,6 +1288,11 @@ public com.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse calculateCove * 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.v3.ImportTestCasesMetadata] + * - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] *
*/ public com.google.longrunning.Operation importTestCases( @@ -1267,6 +1307,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.v3.ExportTestCasesMetadata]
+     * - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse]
      * 
*/ public com.google.longrunning.Operation exportTestCases( @@ -1414,6 +1459,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.v3.BatchRunTestCasesMetadata]
+     * - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1443,6 +1493,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.v3.ImportTestCasesMetadata] + * - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] *
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1457,6 +1512,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.v3.ExportTestCasesMetadata]
+     * - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture diff --git a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsGrpc.java index f032bff54..26f113494 100644 --- a/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsGrpc.java @@ -379,6 +379,11 @@ public void getVersion( * *
      * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata]
+     * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
      * 
*/ public void createVersion( @@ -421,6 +426,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( @@ -527,6 +539,11 @@ public void getVersion( * *
      * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata]
+     * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
      * 
*/ public void createVersion( @@ -575,6 +592,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( @@ -636,6 +660,11 @@ public com.google.cloud.dialogflow.cx.v3.Version getVersion( * *
      * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata]
+     * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
      * 
*/ public com.google.longrunning.Operation createVersion( @@ -675,6 +704,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( @@ -735,6 +771,11 @@ protected VersionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * *
      * Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata]
+     * - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -775,6 +816,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-v3/src/main/java/com/google/cloud/location/LocationsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/LocationsGrpc.java deleted file mode 100644 index 16f28b5c2..000000000 --- a/grpc-google-cloud-dialogflow-cx-v3/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-v3/clirr-ignored-differences.xml b/proto-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml index 06330a597..a09674428 100644 --- a/proto-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml +++ b/proto-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml @@ -30,4 +30,9 @@ com/google/cloud/location/*OrBuilder boolean has*(*) + + + 8001 + com/google/cloud/location/*Location* + diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowMetadata.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowMetadata.java new file mode 100644 index 000000000..da017b33f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowMetadata.java @@ -0,0 +1,954 @@ +/* + * 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/v3/environment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Metadata returned for the [Environments.DeployFlow][google.cloud.dialogflow.cx.v3.Environments.DeployFlow] long running
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeployFlowMetadata} + */ +public final class DeployFlowMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.v3.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.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata.class, + com.google.cloud.dialogflow.cx.v3.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.v3.TestError test_errors = 1; + */ + @java.lang.Override + public java.util.List getTestErrorsList() { + return testErrors_; + } + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + @java.lang.Override + public java.util.List + getTestErrorsOrBuilderList() { + return testErrors_; + } + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + @java.lang.Override + public int getTestErrorsCount() { + return testErrors_.size(); + } + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.TestError getTestErrors(int index) { + return testErrors_.get(index); + } + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata other = + (com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Environments.DeployFlow] long running
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeployFlowMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeployFlowMetadata) + com.google.cloud.dialogflow.cx.v3.DeployFlowMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata.class, + com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata build() { + com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata result = + new com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.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.v3.TestError, + com.google.cloud.dialogflow.cx.v3.TestError.Builder, + com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder> + testErrorsBuilder_; + + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.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.v3.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.v3.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.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.v3.TestError test_errors = 1; + */ + public Builder setTestErrors(int index, com.google.cloud.dialogflow.cx.v3.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.v3.TestError test_errors = 1; + */ + public Builder setTestErrors( + int index, com.google.cloud.dialogflow.cx.v3.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.v3.TestError test_errors = 1; + */ + public Builder addTestErrors(com.google.cloud.dialogflow.cx.v3.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.v3.TestError test_errors = 1; + */ + public Builder addTestErrors(int index, com.google.cloud.dialogflow.cx.v3.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.v3.TestError test_errors = 1; + */ + public Builder addTestErrors( + com.google.cloud.dialogflow.cx.v3.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.v3.TestError test_errors = 1; + */ + public Builder addTestErrors( + int index, com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestError.Builder getTestErrorsBuilder(int index) { + return getTestErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestError.Builder addTestErrorsBuilder() { + return getTestErrorsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.TestError.getDefaultInstance()); + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + public com.google.cloud.dialogflow.cx.v3.TestError.Builder addTestErrorsBuilder(int index) { + return getTestErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.TestError.getDefaultInstance()); + } + /** + * + * + *
+     * Errors of running deployment tests.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + public java.util.List + getTestErrorsBuilderList() { + return getTestErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestError, + com.google.cloud.dialogflow.cx.v3.TestError.Builder, + com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder> + getTestErrorsFieldBuilder() { + if (testErrorsBuilder_ == null) { + testErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.TestError, + com.google.cloud.dialogflow.cx.v3.TestError.Builder, + com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeployFlowMetadata) + private static final com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeployFlowMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowMetadataOrBuilder.java new file mode 100644 index 000000000..6c67c1a70 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/environment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface DeployFlowMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeployFlowMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + java.util.List getTestErrorsList(); + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestError getTestErrors(int index); + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + int getTestErrorsCount(); + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + java.util.List + getTestErrorsOrBuilderList(); + /** + * + * + *
+   * Errors of running deployment tests.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.TestError test_errors = 1; + */ + com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder getTestErrorsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowRequest.java new file mode 100644 index 000000000..f930c719c --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowRequest.java @@ -0,0 +1,871 @@ +/* + * 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/v3/environment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3.Environments.DeployFlow].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeployFlowRequest} + */ +public final class DeployFlowRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest.class, + com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest other = + (com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Environments.DeployFlow].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeployFlowRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeployFlowRequest) + com.google.cloud.dialogflow.cx.v3.DeployFlowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest.class, + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeployFlowRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowRequest build() { + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeployFlowRequest result = + new com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeployFlowRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeployFlowRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeployFlowRequest) + private static final com.google.cloud.dialogflow.cx.v3.DeployFlowRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeployFlowRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowRequestOrBuilder.java new file mode 100644 index 000000000..b83b938be --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/environment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface DeployFlowRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowResponse.java new file mode 100644 index 000000000..70cc6aa43 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowResponse.java @@ -0,0 +1,928 @@ +/* + * 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/v3/environment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3.Environments.DeployFlow].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeployFlowResponse} + */ +public final class DeployFlowResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.v3.Environment.Builder subBuilder = null; + if (environment_ != null) { + subBuilder = environment_.toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.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.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeployFlowResponse.class, + com.google.cloud.dialogflow.cx.v3.DeployFlowResponse.Builder.class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3.Environment environment_; + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.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.v3.Environment environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Environment getEnvironment() { + return environment_ == null + ? com.google.cloud.dialogflow.cx.v3.Environment.getDefaultInstance() + : environment_; + } + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment environment = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.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][google.cloud.dialogflow.cx.v3.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][google.cloud.dialogflow.cx.v3.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.v3.DeployFlowResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.DeployFlowResponse other = + (com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Environments.DeployFlow].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.DeployFlowResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.DeployFlowResponse) + com.google.cloud.dialogflow.cx.v3.DeployFlowResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.DeployFlowResponse.class, + com.google.cloud.dialogflow.cx.v3.DeployFlowResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.DeployFlowResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowResponse build() { + com.google.cloud.dialogflow.cx.v3.DeployFlowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DeployFlowResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.DeployFlowResponse result = + new com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.DeployFlowResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.DeployFlowResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.DeployFlowResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Environment environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Environment, + com.google.cloud.dialogflow.cx.v3.Environment.Builder, + com.google.cloud.dialogflow.cx.v3.EnvironmentOrBuilder> + environmentBuilder_; + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.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.v3.Environment environment = 1; + * + * @return The environment. + */ + public com.google.cloud.dialogflow.cx.v3.Environment getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null + ? com.google.cloud.dialogflow.cx.v3.Environment.getDefaultInstance() + : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment environment = 1; + */ + public Builder setEnvironment(com.google.cloud.dialogflow.cx.v3.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.v3.Environment environment = 1; + */ + public Builder setEnvironment( + com.google.cloud.dialogflow.cx.v3.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.v3.Environment environment = 1; + */ + public Builder mergeEnvironment(com.google.cloud.dialogflow.cx.v3.Environment value) { + if (environmentBuilder_ == null) { + if (environment_ != null) { + environment_ = + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.Environment environment = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Environment.Builder getEnvironmentBuilder() { + + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment environment = 1; + */ + public com.google.cloud.dialogflow.cx.v3.EnvironmentOrBuilder getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null + ? com.google.cloud.dialogflow.cx.v3.Environment.getDefaultInstance() + : environment_; + } + } + /** + * + * + *
+     * The updated environment where the flow is deployed.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment environment = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Environment, + com.google.cloud.dialogflow.cx.v3.Environment.Builder, + com.google.cloud.dialogflow.cx.v3.EnvironmentOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Environment, + com.google.cloud.dialogflow.cx.v3.Environment.Builder, + com.google.cloud.dialogflow.cx.v3.EnvironmentOrBuilder>( + getEnvironment(), getParentForChildren(), isClean()); + environment_ = null; + } + return environmentBuilder_; + } + + private java.lang.Object deployment_ = ""; + /** + * + * + *
+     * The name of the flow version [Deployment][google.cloud.dialogflow.cx.v3.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][google.cloud.dialogflow.cx.v3.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][google.cloud.dialogflow.cx.v3.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][google.cloud.dialogflow.cx.v3.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][google.cloud.dialogflow.cx.v3.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.v3.DeployFlowResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.DeployFlowResponse) + private static final com.google.cloud.dialogflow.cx.v3.DeployFlowResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.DeployFlowResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.DeployFlowResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeployFlowResponseOrBuilder.java new file mode 100644 index 000000000..cc0df10e0 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/environment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface DeployFlowResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.DeployFlowResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment environment = 1; + * + * @return The environment. + */ + com.google.cloud.dialogflow.cx.v3.Environment getEnvironment(); + /** + * + * + *
+   * The updated environment where the flow is deployed.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment environment = 1; + */ + com.google.cloud.dialogflow.cx.v3.EnvironmentOrBuilder getEnvironmentOrBuilder(); + + /** + * + * + *
+   * The name of the flow version [Deployment][google.cloud.dialogflow.cx.v3.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][google.cloud.dialogflow.cx.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Deployment.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Deployment.java new file mode 100644 index 000000000..3011c1bbb --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Deployment.java @@ -0,0 +1,3062 @@ +/* + * 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/v3/deployment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * 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.v3.Deployment} + */ +public final class Deployment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Deployment.class, + com.google.cloud.dialogflow.cx.v3.Deployment.Builder.class); + } + + /** + * + * + *
+   * The state of the deployment.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.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.v3.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.v3.Deployment.State) + } + + public interface ResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result} + */ + public static final class Result extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Deployment.Result.class, + com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Deployment.Result other = + (com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Deployment.Result} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Deployment.Result) + com.google.cloud.dialogflow.cx.v3.Deployment.ResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Deployment.Result.class, + com.google.cloud.dialogflow.cx.v3.Deployment.Result.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment.Result getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Deployment.Result.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment.Result build() { + com.google.cloud.dialogflow.cx.v3.Deployment.Result result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment.Result buildPartial() { + com.google.cloud.dialogflow.cx.v3.Deployment.Result result = + new com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Deployment.Result) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Deployment.Result other) { + if (other == com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Deployment.Result) + private static final com.google.cloud.dialogflow.cx.v3.Deployment.Result DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Deployment.Result(); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.Deployment.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.Deployment.State result = + com.google.cloud.dialogflow.cx.v3.Deployment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Deployment.State.UNRECOGNIZED + : result; + } + + public static final int RESULT_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3.Deployment.Result result_; + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result result = 4; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment.Result getResult() { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.Deployment.Result.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.Deployment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Deployment other = + (com.google.cloud.dialogflow.cx.v3.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.v3.Deployment parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.Deployment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.Deployment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Deployment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Deployment) + com.google.cloud.dialogflow.cx.v3.DeploymentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Deployment.class, + com.google.cloud.dialogflow.cx.v3.Deployment.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_Deployment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Deployment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment build() { + com.google.cloud.dialogflow.cx.v3.Deployment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment buildPartial() { + com.google.cloud.dialogflow.cx.v3.Deployment result = + new com.google.cloud.dialogflow.cx.v3.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.v3.Deployment) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Deployment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Deployment other) { + if (other == com.google.cloud.dialogflow.cx.v3.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.v3.Deployment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.Deployment.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Deployment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3.Deployment.State result = + com.google.cloud.dialogflow.cx.v3.Deployment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.Deployment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The current state of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Deployment.State state = 3; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.State state = 3; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.Deployment.Result result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Deployment.Result, + com.google.cloud.dialogflow.cx.v3.Deployment.Result.Builder, + com.google.cloud.dialogflow.cx.v3.Deployment.ResultOrBuilder> + resultBuilder_; + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result result = 4; + * + * @return The result. + */ + public com.google.cloud.dialogflow.cx.v3.Deployment.Result getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.Deployment.Result.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + */ + public Builder setResult(com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result result = 4; + */ + public Builder setResult( + com.google.cloud.dialogflow.cx.v3.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.v3.Deployment.Result result = 4; + */ + public Builder mergeResult(com.google.cloud.dialogflow.cx.v3.Deployment.Result value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.Deployment.Result result = 4; + */ + public com.google.cloud.dialogflow.cx.v3.Deployment.Result.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + */ + public com.google.cloud.dialogflow.cx.v3.Deployment.ResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.dialogflow.cx.v3.Deployment.Result.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * Result of the deployment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Deployment.Result, + com.google.cloud.dialogflow.cx.v3.Deployment.Result.Builder, + com.google.cloud.dialogflow.cx.v3.Deployment.ResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Deployment.Result, + com.google.cloud.dialogflow.cx.v3.Deployment.Result.Builder, + com.google.cloud.dialogflow.cx.v3.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.v3.Deployment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Deployment) + private static final com.google.cloud.dialogflow.cx.v3.Deployment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Deployment(); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.Deployment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentName.java new file mode 100644 index 000000000..8c10d5213 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class 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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentOrBuilder.java new file mode 100644 index 000000000..3ac53d66f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/deployment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface DeploymentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.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.v3.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.v3.Deployment.State state = 3; + * + * @return The state. + */ + com.google.cloud.dialogflow.cx.v3.Deployment.State getState(); + + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + * + * @return The result. + */ + com.google.cloud.dialogflow.cx.v3.Deployment.Result getResult(); + /** + * + * + *
+   * Result of the deployment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Deployment.Result result = 4; + */ + com.google.cloud.dialogflow.cx.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentProto.java new file mode 100644 index 000000000..06584e1d1 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/DeploymentProto.java @@ -0,0 +1,185 @@ +/* + * 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/v3/deployment.proto + +package com.google.cloud.dialogflow.cx.v3; + +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_v3_Deployment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Deployment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_GetDeploymentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_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 = { + "\n.google/cloud/dialogflow/cx/v3/deployme" + + "nt.proto\022\035google.cloud.dialogflow.cx.v3\032" + + "\034google/api/annotations.proto\032\027google/ap" + + "i/client.proto\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\032\033goog" + + "le/protobuf/empty.proto\032 google/protobuf" + + "/field_mask.proto\032\037google/protobuf/times" + + "tamp.proto\"\263\005\n\nDeployment\022\014\n\004name\030\001 \001(\t\022" + + "<\n\014flow_version\030\002 \001(\tB&\372A#\n!dialogflow.g" + + "oogleapis.com/Version\022>\n\005state\030\003 \001(\0162/.g" + + "oogle.cloud.dialogflow.cx.v3.Deployment." + + "State\022@\n\006result\030\004 \001(\01320.google.cloud.dia" + + "logflow.cx.v3.Deployment.Result\022.\n\nstart" + + "_time\030\005 \001(\0132\032.google.protobuf.Timestamp\022" + + ",\n\010end_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stamp\032\227\001\n\006Result\022N\n\027deployment_test_resu" + + "lts\030\001 \003(\tB-\372A*\n(dialogflow.googleapis.co" + + "m/TestCaseResult\022=\n\nexperiment\030\002 \001(\tB)\372A" + + "&\n$dialogflow.googleapis.com/Experiment\"" + + "F\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNI" + + "NG\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003:\226\001\352A\222\001\n$" + + "dialogflow.googleapis.com/Deployment\022jpr" + + "ojects/{project}/locations/{location}/ag" + + "ents/{agent}/environments/{environment}/" + + "deployments/{deployment}\"}\n\026ListDeployme" + + "ntsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$dial" + + "ogflow.googleapis.com/Deployment\022\021\n\tpage" + + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"r\n\027ListD" + + "eploymentsResponse\022>\n\013deployments\030\001 \003(\0132" + + ").google.cloud.dialogflow.cx.v3.Deployme" + + "nt\022\027\n\017next_page_token\030\002 \001(\t\"R\n\024GetDeploy" + + "mentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialo" + + "gflow.googleapis.com/Deployment2\256\004\n\013Depl" + + "oyments\022\332\001\n\017ListDeployments\0225.google.clo" + + "ud.dialogflow.cx.v3.ListDeploymentsReque" + + "st\0326.google.cloud.dialogflow.cx.v3.ListD" + + "eploymentsResponse\"X\202\323\344\223\002I\022G/v3/{parent=" + + "projects/*/locations/*/agents/*/environm" + + "ents/*}/deployments\332A\006parent\022\307\001\n\rGetDepl" + + "oyment\0223.google.cloud.dialogflow.cx.v3.G" + + "etDeploymentRequest\032).google.cloud.dialo" + + "gflow.cx.v3.Deployment\"V\202\323\344\223\002I\022G/v3/{nam" + + "e=projects/*/locations/*/agents/*/enviro" + + "nments/*/deployments/*}\332A\004name\032x\312A\031dialo" + + "gflow.googleapis.com\322AYhttps://www.googl" + + "eapis.com/auth/cloud-platform,https://ww" + + "w.googleapis.com/auth/dialogflowB\303\001\n!com" + + ".google.cloud.dialogflow.cx.v3B\017Deployme" + + "ntProtoP\001Z?google.golang.org/genproto/go" + + "ogleapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002" + + "DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!Goo" + + "gle::Cloud::Dialogflow::CX::V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.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_v3_Deployment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_Deployment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Deployment_descriptor, + new java.lang.String[] { + "Name", "FlowVersion", "State", "Result", "StartTime", "EndTime", + }); + internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Deployment_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Deployment_Result_descriptor, + new java.lang.String[] { + "DeploymentTestResults", "Experiment", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_descriptor, + new java.lang.String[] { + "Deployments", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3_GetDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_GetDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Environment.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Environment.java index 361fce7fc..bc6d67768 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Environment.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Environment.java @@ -131,6 +131,24 @@ private Environment( extensionRegistry)); break; } + case 58: + { + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.Builder subBuilder = + null; + if (testCasesConfig_ != null) { + subBuilder = testCasesConfig_.toBuilder(); + } + testCasesConfig_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(testCasesConfig_); + testCasesConfig_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -678,98 +696,1140 @@ 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.v3.Environment.VersionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Environment.VersionConfig) + private static final com.google.cloud.dialogflow.cx.v3.Environment.VersionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Environment.VersionConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.Environment.VersionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TestCasesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig.test_cases] periodically.
+     * Default false. If set to ture, 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.v3.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.v3.Environment.TestCasesConfig} + */ + public static final class TestCasesConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.class, + com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig.test_cases] periodically.
+     * Default false. If set to ture, 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.v3.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.v3.Environment.TestCasesConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig other = + (com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Environment.TestCasesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig) + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.class, + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig build() { + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig result = + new com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig.test_cases] periodically.
+       * Default false. If set to ture, 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.v3.Environment.TestCasesConfig.test_cases] periodically.
+       * Default false. If set to ture, 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.v3.Environment.TestCasesConfig.test_cases] periodically.
+       * Default false. If set to ture, 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.v3.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.v3.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; } @@ -777,24 +1837,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.v3.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; } @@ -811,43 +1864,45 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Environment.VersionConfig) + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Environment.VersionConfig) - private static final com.google.cloud.dialogflow.cx.v3.Environment.VersionConfig + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig) + private static final com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Environment.VersionConfig(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig(); } - public static com.google.cloud.dialogflow.cx.v3.Environment.VersionConfig getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.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.v3.Environment.VersionConfig getDefaultInstanceForType() { + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -1154,6 +2209,55 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } + public static final int TEST_CASES_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig testCasesConfig_; + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig test_cases_config = 7; + * + * @return The testCasesConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig getTestCasesConfig() { + return testCasesConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.getDefaultInstance() + : testCasesConfig_; + } + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfigOrBuilder + getTestCasesConfigOrBuilder() { + return getTestCasesConfig(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1183,6 +2287,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); } @@ -1207,6 +2314,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; @@ -1231,6 +2341,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; } @@ -1256,6 +2370,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; @@ -1428,6 +2546,12 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } + if (testCasesConfigBuilder_ == null) { + testCasesConfig_ = null; + } else { + testCasesConfig_ = null; + testCasesConfigBuilder_ = null; + } return this; } @@ -1473,6 +2597,11 @@ public com.google.cloud.dialogflow.cx.v3.Environment buildPartial() { } else { result.updateTime_ = updateTimeBuilder_.build(); } + if (testCasesConfigBuilder_ == null) { + result.testCasesConfig_ = testCasesConfig_; + } else { + result.testCasesConfig_ = testCasesConfigBuilder_.build(); + } onBuilt(); return result; } @@ -1564,6 +2693,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Environment other) { if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } + if (other.hasTestCasesConfig()) { + mergeTestCasesConfig(other.getTestCasesConfig()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2595,6 +3727,206 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTimeBuilder_; } + private com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig testCasesConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig, + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfigOrBuilder> + testCasesConfigBuilder_; + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig test_cases_config = 7; + * + * + * @return The testCasesConfig. + */ + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig getTestCasesConfig() { + if (testCasesConfigBuilder_ == null) { + return testCasesConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.getDefaultInstance() + : testCasesConfig_; + } else { + return testCasesConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public Builder setTestCasesConfig( + com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public Builder setTestCasesConfig( + com.google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public Builder mergeTestCasesConfig( + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig value) { + if (testCasesConfigBuilder_ == null) { + if (testCasesConfig_ != null) { + testCasesConfig_ = + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.Builder + getTestCasesConfigBuilder() { + + onChanged(); + return getTestCasesConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; + * + */ + public com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfigOrBuilder + getTestCasesConfigOrBuilder() { + if (testCasesConfigBuilder_ != null) { + return testCasesConfigBuilder_.getMessageOrBuilder(); + } else { + return testCasesConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.getDefaultInstance() + : testCasesConfig_; + } + } + /** + * + * + *
+     * The test cases config for continuous tests of this environment.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig, + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.Builder, + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfigOrBuilder> + getTestCasesConfigFieldBuilder() { + if (testCasesConfigBuilder_ == null) { + testCasesConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig, + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.Builder, + com.google.cloud.dialogflow.cx.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentOrBuilder.java index 7230d2f0c..eedd5299a 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentOrBuilder.java @@ -222,4 +222,40 @@ com.google.cloud.dialogflow.cx.v3.Environment.VersionConfigOrBuilder getVersionC * */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.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.v3.Environment.TestCasesConfig test_cases_config = 7; + * + * @return The testCasesConfig. + */ + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig getTestCasesConfig(); + /** + * + * + *
+   * The test cases config for continuous tests of this environment.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig test_cases_config = 7; + */ + com.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfigOrBuilder + getTestCasesConfigOrBuilder(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentProto.java index 63a951db5..49e9bdecc 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentProto.java @@ -35,6 +35,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_Environment_VersionConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_Environment_VersionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_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_v3_ListContinuousTestResultsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_ListContinuousTestResultsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -109,126 +125,146 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\032#google/longrunning/operations.proto\032" + "\033google/protobuf/empty.proto\032 google/pro" + "tobuf/field_mask.proto\032\037google/protobuf/" - + "timestamp.proto\"\245\003\n\013Environment\022\014\n\004name\030" + + "timestamp.proto\"\216\005\n\013Environment\022\014\n\004name\030" + "\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013desc" + "ription\030\003 \001(\t\022V\n\017version_configs\030\006 \003(\01328" + ".google.cloud.dialogflow.cx.v3.Environme" + "nt.VersionConfigB\003\340A\002\0224\n\013update_time\030\005 \001" - + "(\0132\032.google.protobuf.TimestampB\003\340A\003\032K\n\rV" - + "ersionConfig\022:\n\007version\030\001 \001(\tB)\340A\002\372A#\n!d" - + "ialogflow.googleapis.com/Version:}\352Az\n%d" - + "ialogflow.googleapis.com/Environment\022Qpr" - + "ojects/{project}/locations/{location}/ag" - + "ents/{agent}/environments/{environment}\"" - + "\177\n\027ListEnvironmentsRequest\022=\n\006parent\030\001 \001" - + "(\tB-\340A\002\372A\'\022%dialogflow.googleapis.com/En" - + "vironment\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_tok" - + "en\030\003 \001(\t\"u\n\030ListEnvironmentsResponse\022@\n\014" - + "environments\030\001 \003(\0132*.google.cloud.dialog" - + "flow.cx.v3.Environment\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\"T\n\025GetEnvironmentRequest\022;\n\004name" - + "\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.co" - + "m/Environment\"\237\001\n\030CreateEnvironmentReque" - + "st\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%dialogflow.g" - + "oogleapis.com/Environment\022D\n\013environment" - + "\030\002 \001(\0132*.google.cloud.dialogflow.cx.v3.E" - + "nvironmentB\003\340A\002\"\226\001\n\030UpdateEnvironmentReq" - + "uest\022D\n\013environment\030\001 \001(\0132*.google.cloud" - + ".dialogflow.cx.v3.EnvironmentB\003\340A\002\0224\n\013up" - + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" - + "askB\003\340A\002\"W\n\030DeleteEnvironmentRequest\022;\n\004" - + "name\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapi" - + "s.com/Environment\"\205\001\n\037LookupEnvironmentH" - + "istoryRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dia" - + "logflow.googleapis.com/Environment\022\021\n\tpa" - + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"}\n Loo" - + "kupEnvironmentHistoryResponse\022@\n\014environ" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022U\n\021t" + + "est_cases_config\030\007 \001(\0132:.google.cloud.di" + + "alogflow.cx.v3.Environment.TestCasesConf" + + "ig\032K\n\rVersionConfig\022:\n\007version\030\001 \001(\tB)\340A" + + "\002\372A#\n!dialogflow.googleapis.com/Version\032" + + "\217\001\n\017TestCasesConfig\022;\n\ntest_cases\030\001 \003(\tB" + + "\'\372A$\n\"dialogflow.googleapis.com/TestCase" + + "\022\035\n\025enable_continuous_run\030\002 \001(\010\022 \n\030enabl" + + "e_predeployment_run\030\003 \001(\010:}\352Az\n%dialogfl" + + "ow.googleapis.com/Environment\022Qprojects/" + + "{project}/locations/{location}/agents/{a" + + "gent}/environments/{environment}\"\177\n\027List" + + "EnvironmentsRequest\022=\n\006parent\030\001 \001(\tB-\340A\002" + + "\372A\'\022%dialogflow.googleapis.com/Environme" + + "nt\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"u\n\030ListEnvironmentsResponse\022@\n\014environ" + "ments\030\001 \003(\0132*.google.cloud.dialogflow.cx" + ".v3.Environment\022\027\n\017next_page_token\030\002 \001(\t" - + "\"\210\004\n\024ContinuousTestResult\022\014\n\004name\030\001 \001(\t\022" - + "X\n\006result\030\002 \001(\0162H.google.cloud.dialogflo" - + "w.cx.v3.ContinuousTestResult.AggregatedT" - + "estResult\022H\n\021test_case_results\030\003 \003(\tB-\372A" - + "*\n(dialogflow.googleapis.com/TestCaseRes" - + "ult\022,\n\010run_time\030\004 \001(\0132\032.google.protobuf." - + "Timestamp\"V\n\024AggregatedTestResult\022&\n\"AGG" - + "REGATED_TEST_RESULT_UNSPECIFIED\020\000\022\n\n\006PAS" - + "SED\020\001\022\n\n\006FAILED\020\002:\267\001\352A\263\001\n.dialogflow.goo" - + "gleapis.com/ContinuousTestResult\022\200\001proje" - + "cts/{project}/locations/{location}/agent" - + "s/{agent}/environments/{environment}/con" - + "tinuousTestResults/{continuous_test_resu" - + "lt}\"^\n\030RunContinuousTestRequest\022B\n\013envir" - + "onment\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googlea" - + "pis.com/Environment\"p\n\031RunContinuousTest" - + "Response\022S\n\026continuous_test_result\030\001 \001(\013" - + "23.google.cloud.dialogflow.cx.v3.Continu" - + "ousTestResult\"U\n\031RunContinuousTestMetada" - + "ta\0228\n\006errors\030\001 \003(\0132(.google.cloud.dialog" - + "flow.cx.v3.TestError\"\221\001\n ListContinuousT" - + "estResultsRequest\022F\n\006parent\030\001 \001(\tB6\340A\002\372A" - + "0\022.dialogflow.googleapis.com/ContinuousT" - + "estResult\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_tok" - + "en\030\003 \001(\t\"\222\001\n!ListContinuousTestResultsRe" - + "sponse\022T\n\027continuous_test_results\030\001 \003(\0132" - + "3.google.cloud.dialogflow.cx.v3.Continuo" - + "usTestResult\022\027\n\017next_page_token\030\002 \001(\t2\340\017" - + "\n\014Environments\022\317\001\n\020ListEnvironments\0226.go" - + "ogle.cloud.dialogflow.cx.v3.ListEnvironm" - + "entsRequest\0327.google.cloud.dialogflow.cx" - + ".v3.ListEnvironmentsResponse\"J\202\323\344\223\002;\0229/v" - + "3/{parent=projects/*/locations/*/agents/" - + "*}/environments\332A\006parent\022\274\001\n\016GetEnvironm" - + "ent\0224.google.cloud.dialogflow.cx.v3.GetE" - + "nvironmentRequest\032*.google.cloud.dialogf" - + "low.cx.v3.Environment\"H\202\323\344\223\002;\0229/v3/{name" - + "=projects/*/locations/*/agents/*/environ" - + "ments/*}\332A\004name\022\371\001\n\021CreateEnvironment\0227." - + "google.cloud.dialogflow.cx.v3.CreateEnvi" - + "ronmentRequest\032\035.google.longrunning.Oper" - + "ation\"\213\001\202\323\344\223\002H\"9/v3/{parent=projects/*/l" - + "ocations/*/agents/*}/environments:\013envir" - + "onment\332A\022parent,environment\312A%\n\013Environm" - + "ent\022\026google.protobuf.Struct\022\212\002\n\021UpdateEn" - + "vironment\0227.google.cloud.dialogflow.cx.v" - + "3.UpdateEnvironmentRequest\032\035.google.long" - + "running.Operation\"\234\001\202\323\344\223\002T2E/v3/{environ" - + "ment.name=projects/*/locations/*/agents/" - + "*/environments/*}:\013environment\332A\027environ" - + "ment,update_mask\312A%\n\013Environment\022\026google" - + ".protobuf.Struct\022\256\001\n\021DeleteEnvironment\0227" - + ".google.cloud.dialogflow.cx.v3.DeleteEnv" - + "ironmentRequest\032\026.google.protobuf.Empty\"" - + "H\202\323\344\223\002;*9/v3/{name=projects/*/locations/" - + "*/agents/*/environments/*}\332A\004name\022\376\001\n\030Lo" - + "okupEnvironmentHistory\022>.google.cloud.di" - + "alogflow.cx.v3.LookupEnvironmentHistoryR" - + "equest\032?.google.cloud.dialogflow.cx.v3.L" - + "ookupEnvironmentHistoryResponse\"a\202\323\344\223\002T\022" - + "R/v3/{name=projects/*/locations/*/agents" - + "/*/environments/*}:lookupEnvironmentHist" - + "ory\332A\004name\022\204\002\n\021RunContinuousTest\0227.googl" - + "e.cloud.dialogflow.cx.v3.RunContinuousTe" - + "stRequest\032\035.google.longrunning.Operation" - + "\"\226\001\202\323\344\223\002W\"R/v3/{environment=projects/*/l" - + "ocations/*/agents/*/environments/*}:runC" - + "ontinuousTest:\001*\312A6\n\031RunContinuousTestRe" - + "sponse\022\031RunContinuousTestMetadata\022\202\002\n\031Li" - + "stContinuousTestResults\022?.google.cloud.d" - + "ialogflow.cx.v3.ListContinuousTestResult" - + "sRequest\032@.google.cloud.dialogflow.cx.v3" - + ".ListContinuousTestResultsResponse\"b\202\323\344\223" - + "\002S\022Q/v3/{parent=projects/*/locations/*/a" - + "gents/*/environments/*}/continuousTestRe" - + "sults\332A\006parent\032x\312A\031dialogflow.googleapis" - + ".com\322AYhttps://www.googleapis.com/auth/c" - + "loud-platform,https://www.googleapis.com" - + "/auth/dialogflowB\304\001\n!com.google.cloud.di" - + "alogflow.cx.v3B\020EnvironmentProtoP\001Z?goog" - + "le.golang.org/genproto/googleapis/cloud/" - + "dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Clo" - + "ud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dia" - + "logflow::CX::V3b\006proto3" + + "\"T\n\025GetEnvironmentRequest\022;\n\004name\030\001 \001(\tB" + + "-\340A\002\372A\'\n%dialogflow.googleapis.com/Envir" + + "onment\"\237\001\n\030CreateEnvironmentRequest\022=\n\006p" + + "arent\030\001 \001(\tB-\340A\002\372A\'\022%dialogflow.googleap" + + "is.com/Environment\022D\n\013environment\030\002 \001(\0132" + + "*.google.cloud.dialogflow.cx.v3.Environm" + + "entB\003\340A\002\"\226\001\n\030UpdateEnvironmentRequest\022D\n" + + "\013environment\030\001 \001(\0132*.google.cloud.dialog" + + "flow.cx.v3.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\"}\n LookupEnvi" + + "ronmentHistoryResponse\022@\n\014environments\030\001" + + " \003(\0132*.google.cloud.dialogflow.cx.v3.Env" + + "ironment\022\027\n\017next_page_token\030\002 \001(\t\"\210\004\n\024Co" + + "ntinuousTestResult\022\014\n\004name\030\001 \001(\t\022X\n\006resu" + + "lt\030\002 \001(\0162H.google.cloud.dialogflow.cx.v3" + + ".ContinuousTestResult.AggregatedTestResu" + + "lt\022H\n\021test_case_results\030\003 \003(\tB-\372A*\n(dial" + + "ogflow.googleapis.com/TestCaseResult\022,\n\010" + + "run_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mp\"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\001projects/{pr" + + "oject}/locations/{location}/agents/{agen" + + "t}/environments/{environment}/continuous" + + "TestResults/{continuous_test_result}\"^\n\030" + + "RunContinuousTestRequest\022B\n\013environment\030" + + "\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.com" + + "/Environment\"p\n\031RunContinuousTestRespons" + + "e\022S\n\026continuous_test_result\030\001 \001(\01323.goog" + + "le.cloud.dialogflow.cx.v3.ContinuousTest" + + "Result\"U\n\031RunContinuousTestMetadata\0228\n\006e" + + "rrors\030\001 \003(\0132(.google.cloud.dialogflow.cx" + + ".v3.TestError\"\221\001\n ListContinuousTestResu" + + "ltsRequest\022F\n\006parent\030\001 \001(\tB6\340A\002\372A0\022.dial" + + "ogflow.googleapis.com/ContinuousTestResu" + + "lt\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"\222\001\n!ListContinuousTestResultsResponse\022" + + "T\n\027continuous_test_results\030\001 \003(\01323.googl" + + "e.cloud.dialogflow.cx.v3.ContinuousTestR" + + "esult\022\027\n\017next_page_token\030\002 \001(\t\"\230\001\n\021Deplo" + + "yFlowRequest\022B\n\013environment\030\001 \001(\tB-\340A\002\372A" + + "\'\n%dialogflow.googleapis.com/Environment" + + "\022?\n\014flow_version\030\002 \001(\tB)\340A\002\372A#\n!dialogfl" + + "ow.googleapis.com/Version\"i\n\022DeployFlowR" + + "esponse\022?\n\013environment\030\001 \001(\0132*.google.cl" + + "oud.dialogflow.cx.v3.Environment\022\022\n\ndepl" + + "oyment\030\002 \001(\t\"S\n\022DeployFlowMetadata\022=\n\013te" + + "st_errors\030\001 \003(\0132(.google.cloud.dialogflo" + + "w.cx.v3.TestError2\304\021\n\014Environments\022\317\001\n\020L" + + "istEnvironments\0226.google.cloud.dialogflo" + + "w.cx.v3.ListEnvironmentsRequest\0327.google" + + ".cloud.dialogflow.cx.v3.ListEnvironments" + + "Response\"J\202\323\344\223\002;\0229/v3/{parent=projects/*" + + "/locations/*/agents/*}/environments\332A\006pa" + + "rent\022\274\001\n\016GetEnvironment\0224.google.cloud.d" + + "ialogflow.cx.v3.GetEnvironmentRequest\032*." + + "google.cloud.dialogflow.cx.v3.Environmen" + + "t\"H\202\323\344\223\002;\0229/v3/{name=projects/*/location" + + "s/*/agents/*/environments/*}\332A\004name\022\371\001\n\021" + + "CreateEnvironment\0227.google.cloud.dialogf" + + "low.cx.v3.CreateEnvironmentRequest\032\035.goo" + + "gle.longrunning.Operation\"\213\001\202\323\344\223\002H\"9/v3/" + + "{parent=projects/*/locations/*/agents/*}" + + "/environments:\013environment\332A\022parent,envi" + + "ronment\312A%\n\013Environment\022\026google.protobuf" + + ".Struct\022\212\002\n\021UpdateEnvironment\0227.google.c" + + "loud.dialogflow.cx.v3.UpdateEnvironmentR" + + "equest\032\035.google.longrunning.Operation\"\234\001" + + "\202\323\344\223\002T2E/v3/{environment.name=projects/*" + + "/locations/*/agents/*/environments/*}:\013e" + + "nvironment\332A\027environment,update_mask\312A%\n" + + "\013Environment\022\026google.protobuf.Struct\022\256\001\n" + + "\021DeleteEnvironment\0227.google.cloud.dialog" + + "flow.cx.v3.DeleteEnvironmentRequest\032\026.go" + + "ogle.protobuf.Empty\"H\202\323\344\223\002;*9/v3/{name=p" + + "rojects/*/locations/*/agents/*/environme" + + "nts/*}\332A\004name\022\376\001\n\030LookupEnvironmentHisto" + + "ry\022>.google.cloud.dialogflow.cx.v3.Looku" + + "pEnvironmentHistoryRequest\032?.google.clou" + + "d.dialogflow.cx.v3.LookupEnvironmentHist" + + "oryResponse\"a\202\323\344\223\002T\022R/v3/{name=projects/" + + "*/locations/*/agents/*/environments/*}:l" + + "ookupEnvironmentHistory\332A\004name\022\204\002\n\021RunCo" + + "ntinuousTest\0227.google.cloud.dialogflow.c" + + "x.v3.RunContinuousTestRequest\032\035.google.l" + + "ongrunning.Operation\"\226\001\202\323\344\223\002W\"R/v3/{envi" + + "ronment=projects/*/locations/*/agents/*/" + + "environments/*}:runContinuousTest:\001*\312A6\n" + + "\031RunContinuousTestResponse\022\031RunContinuou" + + "sTestMetadata\022\202\002\n\031ListContinuousTestResu" + + "lts\022?.google.cloud.dialogflow.cx.v3.List" + + "ContinuousTestResultsRequest\032@.google.cl" + + "oud.dialogflow.cx.v3.ListContinuousTestR" + + "esultsResponse\"b\202\323\344\223\002S\022Q/v3/{parent=proj" + + "ects/*/locations/*/agents/*/environments" + + "/*}/continuousTestResults\332A\006parent\022\341\001\n\nD" + + "eployFlow\0220.google.cloud.dialogflow.cx.v" + + "3.DeployFlowRequest\032\035.google.longrunning" + + ".Operation\"\201\001\202\323\344\223\002P\"K/v3/{environment=pr" + + "ojects/*/locations/*/agents/*/environmen" + + "ts/*}:deployFlow:\001*\312A(\n\022DeployFlowRespon" + + "se\022\022DeployFlowMetadata\032x\312A\031dialogflow.go" + + "ogleapis.com\322AYhttps://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/dialogflowB\304\001\n!com.google." + + "cloud.dialogflow.cx.v3B\020EnvironmentProto" + + "P\001Z?google.golang.org/genproto/googleapi" + + "s/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Go" + + "ogle.Cloud.Dialogflow.Cx.V3\352\002!Google::Cl" + + "oud::Dialogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -250,7 +286,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_Environment_descriptor, new java.lang.String[] { - "Name", "DisplayName", "Description", "VersionConfigs", "UpdateTime", + "Name", + "DisplayName", + "Description", + "VersionConfigs", + "UpdateTime", + "TestCasesConfig", }); internal_static_google_cloud_dialogflow_cx_v3_Environment_VersionConfig_descriptor = internal_static_google_cloud_dialogflow_cx_v3_Environment_descriptor @@ -262,6 +303,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Version", }); + internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_Environment_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_Environment_TestCasesConfig_descriptor, + new java.lang.String[] { + "TestCases", "EnableContinuousRun", "EnablePredeploymentRun", + }); internal_static_google_cloud_dialogflow_cx_v3_ListEnvironmentsRequest_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_dialogflow_cx_v3_ListEnvironmentsRequest_fieldAccessorTable = @@ -374,6 +425,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ContinuousTestResults", "NextPageToken", }); + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowRequest_descriptor, + new java.lang.String[] { + "Environment", "FlowVersion", + }); + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowResponse_descriptor, + new java.lang.String[] { + "Environment", "Deployment", + }); + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_dialogflow_cx_v3_DeployFlowMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java index c56a7c72b..ec570b250 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportTestCasesMetadata.java @@ -24,6 +24,7 @@ *
  * Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases] long running
  * operation.
+ * This message currently has no fields.
  * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} @@ -260,6 +261,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases] long running
    * operation.
+   * This message currently has no fields.
    * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/GetLocationRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetDeploymentRequest.java similarity index 62% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/GetLocationRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetDeploymentRequest.java index 6b7c7e0a1..33de61e13 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/GetLocationRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/deployment.proto -package com.google.cloud.location; +package com.google.cloud.dialogflow.cx.v3; /** * * *
- * The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
+ * The request message for [Deployments.GetDeployment][google.cloud.dialogflow.cx.v3.Deployments.GetDeployment].
  * 
* - * Protobuf type {@code google.cloud.location.GetLocationRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.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.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetDeploymentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.location.GetLocationRequest.class, - com.google.cloud.location.GetLocationRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest.class, + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.GetDeploymentRequest)) { return super.equals(obj); } - com.google.cloud.location.GetLocationRequest other = - (com.google.cloud.location.GetLocationRequest) obj; + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest other = + (com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Deployments.GetDeployment].
    * 
* - * Protobuf type {@code google.cloud.location.GetLocationRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.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.v3.GetDeploymentRequest) + com.google.cloud.dialogflow.cx.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_GetDeploymentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.location.GetLocationRequest.class, - com.google.cloud.location.GetLocationRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest.class, + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest.Builder.class); } - // Construct using com.google.cloud.location.GetLocationRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_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.v3.GetDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.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.v3.GetDeploymentRequest build() { + com.google.cloud.dialogflow.cx.v3.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.v3.GetDeploymentRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest result = + new com.google.cloud.dialogflow.cx.v3.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.v3.GetDeploymentRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.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.v3.GetDeploymentRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.GetDeploymentRequest) + private static final com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.location.GetLocationRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.GetDeploymentRequest(); } - public static com.google.cloud.location.GetLocationRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.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.v3.GetDeploymentRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetDeploymentRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GetDeploymentRequestOrBuilder.java new file mode 100644 index 000000000..ad803532d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/deployment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface GetDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GetDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.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.v3.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-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsRequest.java similarity index 58% rename from proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java rename to proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsRequest.java index e1b3af7f9..37b112dd0 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/deployment.proto -package com.google.cloud.location; +package com.google.cloud.dialogflow.cx.v3; /** * * *
- * The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+ * The request message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3.Deployments.ListDeployments].
  * 
* - * Protobuf type {@code google.cloud.location.ListLocationsRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.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.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_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.v3.ListDeploymentsRequest.class, + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.ListDeploymentsRequest)) { return super.equals(obj); } - com.google.cloud.location.ListLocationsRequest other = - (com.google.cloud.location.ListLocationsRequest) obj; + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest other = + (com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Deployments.ListDeployments].
    * 
* - * Protobuf type {@code google.cloud.location.ListLocationsRequest} + * Protobuf type {@code google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsRequest) + com.google.cloud.dialogflow.cx.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.location.ListLocationsRequest.class, - com.google.cloud.location.ListLocationsRequest.Builder.class); + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.class, + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.Builder.class); } - // Construct using com.google.cloud.location.ListLocationsRequest.newBuilder() + // Construct using com.google.cloud.dialogflow.cx.v3.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,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_ListLocationsRequest_descriptor; + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_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.v3.ListDeploymentsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsRequest build() { + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -560,11 +502,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.v3.ListDeploymentsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest result = + new com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(this); + result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; onBuilt(); @@ -606,22 +547,19 @@ 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.v3.ListDeploymentsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; onChanged(); } if (other.getPageSize() != 0) { @@ -646,11 +584,12 @@ 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.v3.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.v3.ListDeploymentsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -660,130 +599,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.v3.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 +630,23 @@ public java.lang.String getFilter() { * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.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 +656,24 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.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 +681,20 @@ public Builder setFilter(java.lang.String value) { * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.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 +702,25 @@ public Builder clearFilter() { * * *
-     * The standard list filter.
+     * Required. The [Environment][google.cloud.dialogflow.cx.v3.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 +730,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 +746,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 +765,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 +785,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 +807,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 +829,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 +850,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 +867,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 +897,42 @@ 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.v3.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.v3.ListDeploymentsRequest) + private static final com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.location.ListLocationsRequest(); + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(); } - public static com.google.cloud.location.ListLocationsRequest getDefaultInstance() { + public static com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsRequestOrBuilder.java new file mode 100644 index 000000000..7a416f1e5 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/deployment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ListDeploymentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ListDeploymentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [Environment][google.cloud.dialogflow.cx.v3.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.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsResponse.java new file mode 100644 index 000000000..b8379b24d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsResponse.java @@ -0,0 +1,1209 @@ +/* + * 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/v3/deployment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3.Deployments.ListDeployments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} + */ +public final class ListDeploymentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.class, + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.Deployment deployments = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse other = + (com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.Deployments.ListDeployments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.class, + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.DeploymentProto + .internal_static_google_cloud_dialogflow_cx_v3_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse build() { + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse result = + new com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.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.v3.Deployment, + com.google.cloud.dialogflow.cx.v3.Deployment.Builder, + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public Builder setDeployments(int index, com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public Builder setDeployments( + int index, com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public Builder addDeployments(com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public Builder addDeployments(int index, com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public Builder addDeployments( + com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public Builder addDeployments( + int index, com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Deployment.Builder addDeploymentsBuilder() { + return getDeploymentsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public com.google.cloud.dialogflow.cx.v3.Deployment.Builder addDeploymentsBuilder(int index) { + return getDeploymentsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3.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.v3.Deployment deployments = 1; + */ + public java.util.List + getDeploymentsBuilderList() { + return getDeploymentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Deployment, + com.google.cloud.dialogflow.cx.v3.Deployment.Builder, + com.google.cloud.dialogflow.cx.v3.DeploymentOrBuilder> + getDeploymentsFieldBuilder() { + if (deploymentsBuilder_ == null) { + deploymentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Deployment, + com.google.cloud.dialogflow.cx.v3.Deployment.Builder, + com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) + private static final com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.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.v3.ListDeploymentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ListDeploymentsResponseOrBuilder.java new file mode 100644 index 000000000..ba313c264 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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/v3/deployment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface ListDeploymentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.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.v3.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.v3.Deployment deployments = 1; + */ + com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.Deployment deployments = 1; + */ + com.google.cloud.dialogflow.cx.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java index 674551c91..90b6e1467 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java @@ -240,6 +240,22 @@ private QueryResult( sentimentAnalysisResult_ = subBuilder.buildPartial(); } + break; + } + case 186: + { + com.google.cloud.dialogflow.cx.v3.DtmfInput.Builder subBuilder = null; + if (queryCase_ == 23) { + subBuilder = ((com.google.cloud.dialogflow.cx.v3.DtmfInput) query_).toBuilder(); + } + query_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.DtmfInput.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); + query_ = subBuilder.buildPartial(); + } + queryCase_ = 23; break; } default: @@ -296,6 +312,7 @@ public enum QueryCase TRIGGER_INTENT(11), TRANSCRIPT(12), TRIGGER_EVENT(14), + DTMF(23), QUERY_NOT_SET(0); private final int value; @@ -322,6 +339,8 @@ public static QueryCase forNumber(int value) { return TRANSCRIPT; case 14: return TRIGGER_EVENT; + case 23: + return DTMF; case 0: return QUERY_NOT_SET; default: @@ -636,6 +655,60 @@ public com.google.protobuf.ByteString getTriggerEventBytes() { } } + public static final int DTMF_FIELD_NUMBER = 23; + /** + * + * + *
+   * If a [DTMF][DTMFInput] was provided as input, this field will contain
+   * a copy of the [DTMFInput][].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + * + * @return Whether the dtmf field is set. + */ + @java.lang.Override + public boolean hasDtmf() { + return queryCase_ == 23; + } + /** + * + * + *
+   * If a [DTMF][DTMFInput] was provided as input, this field will contain
+   * a copy of the [DTMFInput][].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + * + * @return The dtmf. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DtmfInput getDtmf() { + if (queryCase_ == 23) { + return (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_; + } + return com.google.cloud.dialogflow.cx.v3.DtmfInput.getDefaultInstance(); + } + /** + * + * + *
+   * If a [DTMF][DTMFInput] was provided as input, this field will contain
+   * a copy of the [DTMFInput][].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder getDtmfOrBuilder() { + if (queryCase_ == 23) { + return (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_; + } + return com.google.cloud.dialogflow.cx.v3.DtmfInput.getDefaultInstance(); + } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; private volatile java.lang.Object languageCode_; /** @@ -1358,6 +1431,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sentimentAnalysisResult_ != null) { output.writeMessage(17, getSentimentAnalysisResult()); } + if (queryCase_ == 23) { + output.writeMessage(23, (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); + } unknownFields.writeTo(output); } @@ -1414,6 +1490,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 17, getSentimentAnalysisResult()); } + if (queryCase_ == 23) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1474,6 +1555,9 @@ public boolean equals(final java.lang.Object obj) { case 14: if (!getTriggerEvent().equals(other.getTriggerEvent())) return false; break; + case 23: + if (!getDtmf().equals(other.getDtmf())) return false; + break; case 0: default: } @@ -1545,6 +1629,10 @@ public int hashCode() { hash = (37 * hash) + TRIGGER_EVENT_FIELD_NUMBER; hash = (53 * hash) + getTriggerEvent().hashCode(); break; + case 23: + hash = (37 * hash) + DTMF_FIELD_NUMBER; + hash = (53 * hash) + getDtmf().hashCode(); + break; case 0: default: } @@ -1797,6 +1885,13 @@ public com.google.cloud.dialogflow.cx.v3.QueryResult buildPartial() { if (queryCase_ == 14) { result.query_ = query_; } + if (queryCase_ == 23) { + if (dtmfBuilder_ == null) { + result.query_ = query_; + } else { + result.query_ = dtmfBuilder_.build(); + } + } result.languageCode_ = languageCode_; if (parametersBuilder_ == null) { result.parameters_ = parameters_; @@ -2041,6 +2136,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { onChanged(); break; } + case DTMF: + { + mergeDtmf(other.getDtmf()); + break; + } case QUERY_NOT_SET: { break; @@ -2663,6 +2763,223 @@ public Builder setTriggerEventBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DtmfInput, + com.google.cloud.dialogflow.cx.v3.DtmfInput.Builder, + com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder> + dtmfBuilder_; + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + * + * @return Whether the dtmf field is set. + */ + @java.lang.Override + public boolean hasDtmf() { + return queryCase_ == 23; + } + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + * + * @return The dtmf. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DtmfInput getDtmf() { + if (dtmfBuilder_ == null) { + if (queryCase_ == 23) { + return (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_; + } + return com.google.cloud.dialogflow.cx.v3.DtmfInput.getDefaultInstance(); + } else { + if (queryCase_ == 23) { + return dtmfBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.DtmfInput.getDefaultInstance(); + } + } + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + public Builder setDtmf(com.google.cloud.dialogflow.cx.v3.DtmfInput value) { + if (dtmfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + onChanged(); + } else { + dtmfBuilder_.setMessage(value); + } + queryCase_ = 23; + return this; + } + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + public Builder setDtmf(com.google.cloud.dialogflow.cx.v3.DtmfInput.Builder builderForValue) { + if (dtmfBuilder_ == null) { + query_ = builderForValue.build(); + onChanged(); + } else { + dtmfBuilder_.setMessage(builderForValue.build()); + } + queryCase_ = 23; + return this; + } + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + public Builder mergeDtmf(com.google.cloud.dialogflow.cx.v3.DtmfInput value) { + if (dtmfBuilder_ == null) { + if (queryCase_ == 23 + && query_ != com.google.cloud.dialogflow.cx.v3.DtmfInput.getDefaultInstance()) { + query_ = + com.google.cloud.dialogflow.cx.v3.DtmfInput.newBuilder( + (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_) + .mergeFrom(value) + .buildPartial(); + } else { + query_ = value; + } + onChanged(); + } else { + if (queryCase_ == 23) { + dtmfBuilder_.mergeFrom(value); + } + dtmfBuilder_.setMessage(value); + } + queryCase_ = 23; + return this; + } + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + public Builder clearDtmf() { + if (dtmfBuilder_ == null) { + if (queryCase_ == 23) { + queryCase_ = 0; + query_ = null; + onChanged(); + } + } else { + if (queryCase_ == 23) { + queryCase_ = 0; + query_ = null; + } + dtmfBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + public com.google.cloud.dialogflow.cx.v3.DtmfInput.Builder getDtmfBuilder() { + return getDtmfFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder getDtmfOrBuilder() { + if ((queryCase_ == 23) && (dtmfBuilder_ != null)) { + return dtmfBuilder_.getMessageOrBuilder(); + } else { + if (queryCase_ == 23) { + return (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_; + } + return com.google.cloud.dialogflow.cx.v3.DtmfInput.getDefaultInstance(); + } + } + /** + * + * + *
+     * If a [DTMF][DTMFInput] was provided as input, this field will contain
+     * a copy of the [DTMFInput][].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DtmfInput, + com.google.cloud.dialogflow.cx.v3.DtmfInput.Builder, + com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder> + getDtmfFieldBuilder() { + if (dtmfBuilder_ == null) { + if (!(queryCase_ == 23)) { + query_ = com.google.cloud.dialogflow.cx.v3.DtmfInput.getDefaultInstance(); + } + dtmfBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.DtmfInput, + com.google.cloud.dialogflow.cx.v3.DtmfInput.Builder, + com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_, + getParentForChildren(), + isClean()); + query_ = null; + } + queryCase_ = 23; + onChanged(); + ; + return dtmfBuilder_; + } + private java.lang.Object languageCode_ = ""; /** * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java index 9035761f8..2fd44af98 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java @@ -189,6 +189,44 @@ public interface QueryResultOrBuilder */ com.google.protobuf.ByteString getTriggerEventBytes(); + /** + * + * + *
+   * If a [DTMF][DTMFInput] was provided as input, this field will contain
+   * a copy of the [DTMFInput][].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + * + * @return Whether the dtmf field is set. + */ + boolean hasDtmf(); + /** + * + * + *
+   * If a [DTMF][DTMFInput] was provided as input, this field will contain
+   * a copy of the [DTMFInput][].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + * + * @return The dtmf. + */ + com.google.cloud.dialogflow.cx.v3.DtmfInput getDtmf(); + /** + * + * + *
+   * If a [DTMF][DTMFInput] was provided as input, this field will contain
+   * a copy of the [DTMFInput][].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.DtmfInput dtmf = 23; + */ + com.google.cloud.dialogflow.cx.v3.DtmfInputOrBuilder getDtmfOrBuilder(); + /** * * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java index cdde90765..e0407f2a8 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java @@ -1260,12 +1260,15 @@ public DataRetentionCase getDataRetentionCase() { * * *
-   * Required. Resource name of the settings.
+   * Resource name of the settings.
+   * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+   * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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. */ @@ -1285,12 +1288,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.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+   * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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. */ @@ -2349,12 +2355,15 @@ public Builder clearDataRetention() { * * *
-     * Required. Resource name of the settings.
+     * Resource name of the settings.
+     * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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. */ @@ -2373,12 +2382,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.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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. */ @@ -2397,12 +2409,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.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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. @@ -2420,12 +2435,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.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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. */ @@ -2439,12 +2457,15 @@ public Builder clearName() { * * *
-     * Required. Resource name of the settings.
+     * Resource name of the settings.
+     * Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+     * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java index 855a8fa68..74da26615 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/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.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+   * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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.v3.SecuritySettingsService.UpdateSecuritySettings] method.
+   * [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java index bb037d7c6..cd43f29f9 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java @@ -96,80 +96,80 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".SecuritySettingsB\003\340A\002\"a\n\035DeleteSecurity" + "SettingsRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*d" + "ialogflow.googleapis.com/SecuritySetting" - + "s\"\233\010\n\020SecuritySettings\022\021\n\004name\030\001 \001(\tB\003\340A" - + "\002\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022]\n\022redactio" - + "n_strategy\030\003 \001(\0162A.google.cloud.dialogfl" - + "ow.cx.v3.SecuritySettings.RedactionStrat" - + "egy\022W\n\017redaction_scope\030\004 \001(\0162>.google.cl" - + "oud.dialogflow.cx.v3.SecuritySettings.Re" - + "dactionScope\022A\n\020inspect_template\030\t \001(\tB\'" - + "\372A$\n\"dlp.googleapis.com/InspectTemplate\022" - + "G\n\023deidentify_template\030\021 \001(\tB*\372A\'\n%dlp.g" - + "oogleapis.com/DeidentifyTemplate\022\037\n\025rete" - + "ntion_window_days\030\006 \001(\005H\000\022W\n\020purge_data_" - + "types\030\010 \003(\0162=.google.cloud.dialogflow.cx" - + ".v3.SecuritySettings.PurgeDataType\022h\n\030in" - + "sights_export_settings\030\r \001(\0132F.google.cl" - + "oud.dialogflow.cx.v3.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\357\t\n\027SecuritySettingsServ" - + "ice\022\363\001\n\026CreateSecuritySettings\022<.google." - + "cloud.dialogflow.cx.v3.CreateSecuritySet" - + "tingsRequest\032/.google.cloud.dialogflow.c" - + "x.v3.SecuritySettings\"j\202\323\344\223\002I\"4/v3/{pare" + + "s\"\226\010\n\020SecuritySettings\022\014\n\004name\030\001 \001(\t\022\031\n\014" + + "display_name\030\002 \001(\tB\003\340A\002\022]\n\022redaction_str" + + "ategy\030\003 \001(\0162A.google.cloud.dialogflow.cx" + + ".v3.SecuritySettings.RedactionStrategy\022W" + + "\n\017redaction_scope\030\004 \001(\0162>.google.cloud.d" + + "ialogflow.cx.v3.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\022W\n\020purge_data_types" + + "\030\010 \003(\0162=.google.cloud.dialogflow.cx.v3.S" + + "ecuritySettings.PurgeDataType\022h\n\030insight" + + "s_export_settings\030\r \001(\0132F.google.cloud.d" + + "ialogflow.cx.v3.SecuritySettings.Insight" + + "sExportSettings\0328\n\026InsightsExportSetting" + + "s\022\036\n\026enable_insights_export\030\001 \001(\010\"P\n\021Red" + + "actionStrategy\022\"\n\036REDACTION_STRATEGY_UNS" + + "PECIFIED\020\000\022\027\n\023REDACT_WITH_SERVICE\020\001\"J\n\016R" + + "edactionScope\022\037\n\033REDACTION_SCOPE_UNSPECI" + + "FIED\020\000\022\027\n\023REDACT_DISK_STORAGE\020\002\"H\n\rPurge" + + "DataType\022\037\n\033PURGE_DATA_TYPE_UNSPECIFIED\020" + + "\000\022\026\n\022DIALOGFLOW_HISTORY\020\001:}\352Az\n*dialogfl" + + "ow.googleapis.com/SecuritySettings\022Lproj" + + "ects/{project}/locations/{location}/secu" + + "ritySettings/{security_settings}B\020\n\016data" + + "_retention2\357\t\n\027SecuritySettingsService\022\363" + + "\001\n\026CreateSecuritySettings\022<.google.cloud" + + ".dialogflow.cx.v3.CreateSecuritySettings" + + "Request\032/.google.cloud.dialogflow.cx.v3." + + "SecuritySettings\"j\202\323\344\223\002I\"4/v3/{parent=pr" + + "ojects/*/locations/*}/securitySettings:\021" + + "security_settings\332A\030parent,security_sett" + + "ings\022\306\001\n\023GetSecuritySettings\0229.google.cl" + + "oud.dialogflow.cx.v3.GetSecuritySettings" + + "Request\032/.google.cloud.dialogflow.cx.v3." + + "SecuritySettings\"C\202\323\344\223\0026\0224/v3/{name=proj" + + "ects/*/locations/*/securitySettings/*}\332A" + + "\004name\022\213\002\n\026UpdateSecuritySettings\022<.googl" + + "e.cloud.dialogflow.cx.v3.UpdateSecurityS" + + "ettingsRequest\032/.google.cloud.dialogflow" + + ".cx.v3.SecuritySettings\"\201\001\202\323\344\223\002[2F/v3/{s" + + "ecurity_settings.name=projects/*/locatio" + + "ns/*/securitySettings/*}:\021security_setti" + + "ngs\332A\035security_settings,update_mask\022\326\001\n\024" + + "ListSecuritySettings\022:.google.cloud.dial" + + "ogflow.cx.v3.ListSecuritySettingsRequest" + + "\032;.google.cloud.dialogflow.cx.v3.ListSec" + + "uritySettingsResponse\"E\202\323\344\223\0026\0224/v3/{pare" + "nt=projects/*/locations/*}/securitySetti" - + "ngs:\021security_settings\332A\030parent,security" - + "_settings\022\306\001\n\023GetSecuritySettings\0229.goog" - + "le.cloud.dialogflow.cx.v3.GetSecuritySet" - + "tingsRequest\032/.google.cloud.dialogflow.c" - + "x.v3.SecuritySettings\"C\202\323\344\223\0026\0224/v3/{name" - + "=projects/*/locations/*/securitySettings" - + "/*}\332A\004name\022\213\002\n\026UpdateSecuritySettings\022<." - + "google.cloud.dialogflow.cx.v3.UpdateSecu" - + "ritySettingsRequest\032/.google.cloud.dialo" - + "gflow.cx.v3.SecuritySettings\"\201\001\202\323\344\223\002[2F/" - + "v3/{security_settings.name=projects/*/lo" - + "cations/*/securitySettings/*}:\021security_" - + "settings\332A\035security_settings,update_mask" - + "\022\326\001\n\024ListSecuritySettings\022:.google.cloud" - + ".dialogflow.cx.v3.ListSecuritySettingsRe" - + "quest\032;.google.cloud.dialogflow.cx.v3.Li" - + "stSecuritySettingsResponse\"E\202\323\344\223\0026\0224/v3/" - + "{parent=projects/*/locations/*}/security" - + "Settings\332A\006parent\022\263\001\n\026DeleteSecuritySett" - + "ings\022<.google.cloud.dialogflow.cx.v3.Del" - + "eteSecuritySettingsRequest\032\026.google.prot" - + "obuf.Empty\"C\202\323\344\223\0026*4/v3/{name=projects/*" - + "/locations/*/securitySettings/*}\332A\004name\032" - + "x\312A\031dialogflow.googleapis.com\322AYhttps://" - + "www.googleapis.com/auth/cloud-platform,h" - + "ttps://www.googleapis.com/auth/dialogflo" - + "wB\360\004\n!com.google.cloud.dialogflow.cx.v3B" - + "\025SecuritySettingsProtoP\001Z?google.golang." - + "org/genproto/googleapis/cloud/dialogflow" - + "/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogf" - + "low.Cx.V3\352\002!Google::Cloud::Dialogflow::C" - + "X::V3\352A\310\001\n\"dlp.googleapis.com/InspectTem" - + "plate\022Uorganizations/{organization}/loca" - + "tions/{location}/inspectTemplates/{inspe" - + "ct_template}\022Kprojects/{project}/locatio" - + "ns/{location}/inspectTemplates/{inspect_" - + "template}\352A\327\001\n%dlp.googleapis.com/Deiden" - + "tifyTemplate\022[organizations/{organizatio" - + "n}/locations/{location}/deidentifyTempla" - + "tes/{deidentify_template}\022Qprojects/{pro" - + "ject}/locations/{location}/deidentifyTem" - + "plates/{deidentify_template}b\006proto3" + + "ngs\332A\006parent\022\263\001\n\026DeleteSecuritySettings\022" + + "<.google.cloud.dialogflow.cx.v3.DeleteSe" + + "curitySettingsRequest\032\026.google.protobuf." + + "Empty\"C\202\323\344\223\0026*4/v3/{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\360\004\n" + + "!com.google.cloud.dialogflow.cx.v3B\025Secu" + + "ritySettingsProtoP\001Z?google.golang.org/g" + + "enproto/googleapis/cloud/dialogflow/cx/v" + + "3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.C" + + "x.V3\352\002!Google::Cloud::Dialogflow::CX::V3" + + "\352A\310\001\n\"dlp.googleapis.com/InspectTemplate" + + "\022Uorganizations/{organization}/locations" + + "/{location}/inspectTemplates/{inspect_te" + + "mplate}\022Kprojects/{project}/locations/{l" + + "ocation}/inspectTemplates/{inspect_templ" + + "ate}\352A\327\001\n%dlp.googleapis.com/DeidentifyT" + + "emplate\022[organizations/{organization}/lo" + + "cations/{location}/deidentifyTemplates/{" + + "deidentify_template}\022Qprojects/{project}" + + "/locations/{location}/deidentifyTemplate" + + "s/{deidentify_template}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java index dfdfcbe2c..1fdf2fa8e 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java @@ -198,108 +198,109 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ud.dialogflow.cx.v3.EventInputH\000\0228\n\004dtmf" + "\030\007 \001(\0132(.google.cloud.dialogflow.cx.v3.D" + "tmfInputH\000\022\032\n\rlanguage_code\030\004 \001(\tB\003\340A\002B\007" - + "\n\005input\"\347\005\n\013QueryResult\022\016\n\004text\030\001 \001(\tH\000\022" + + "\n\005input\"\241\006\n\013QueryResult\022\016\n\004text\030\001 \001(\tH\000\022" + "?\n\016trigger_intent\030\013 \001(\tB%\372A\"\n dialogflow" + ".googleapis.com/IntentH\000\022\024\n\ntranscript\030\014" - + " \001(\tH\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\022\025\n\rlangu" - + "age_code\030\002 \001(\t\022+\n\nparameters\030\003 \001(\0132\027.goo" - + "gle.protobuf.Struct\022I\n\021response_messages" - + "\030\004 \003(\0132..google.cloud.dialogflow.cx.v3.R" - + "esponseMessage\022,\n\020webhook_statuses\030\r \003(\013" - + "2\022.google.rpc.Status\0221\n\020webhook_payloads" - + "\030\006 \003(\0132\027.google.protobuf.Struct\0229\n\014curre" - + "nt_page\030\007 \001(\0132#.google.cloud.dialogflow." - + "cx.v3.Page\0229\n\006intent\030\010 \001(\0132%.google.clou" - + "d.dialogflow.cx.v3.IntentB\002\030\001\022\'\n\033intent_" - + "detection_confidence\030\t \001(\002B\002\030\001\0223\n\005match\030" - + "\017 \001(\0132$.google.cloud.dialogflow.cx.v3.Ma" - + "tch\0220\n\017diagnostic_info\030\n \001(\0132\027.google.pr" - + "otobuf.Struct\022Y\n\031sentiment_analysis_resu" - + "lt\030\021 \001(\01326.google.cloud.dialogflow.cx.v3" - + ".SentimentAnalysisResultB\007\n\005query\"\036\n\tTex" - + "tInput\022\021\n\004text\030\001 \001(\tB\003\340A\002\"G\n\013IntentInput" - + "\0228\n\006intent\030\001 \001(\tB(\340A\002\372A\"\n dialogflow.goo" - + "gleapis.com/Intent\"a\n\nAudioInput\022D\n\006conf" - + "ig\030\001 \001(\0132/.google.cloud.dialogflow.cx.v3" - + ".InputAudioConfigB\003\340A\002\022\r\n\005audio\030\002 \001(\014\"\033\n" - + "\nEventInput\022\r\n\005event\030\001 \001(\t\"1\n\tDtmfInput\022" - + "\016\n\006digits\030\001 \001(\t\022\024\n\014finish_digit\030\002 \001(\t\"\361\002" - + "\n\005Match\0225\n\006intent\030\001 \001(\0132%.google.cloud.d" - + "ialogflow.cx.v3.Intent\022\r\n\005event\030\006 \001(\t\022+\n" - + "\nparameters\030\002 \001(\0132\027.google.protobuf.Stru" - + "ct\022\026\n\016resolved_input\030\003 \001(\t\022B\n\nmatch_type" - + "\030\004 \001(\0162..google.cloud.dialogflow.cx.v3.M" - + "atch.MatchType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tM" - + "atchType\022\032\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006" - + "INTENT\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER" - + "_FILLING\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t" - + "\n\005EVENT\020\006\"\333\001\n\022MatchIntentRequest\022:\n\007sess" - + "ion\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis" - + ".com/Session\022D\n\014query_params\030\002 \001(\0132..goo" - + "gle.cloud.dialogflow.cx.v3.QueryParamete" - + "rs\022C\n\013query_input\030\003 \001(\0132).google.cloud.d" - + "ialogflow.cx.v3.QueryInputB\003\340A\002\"\220\002\n\023Matc" - + "hIntentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigg" - + "er_intent\030\002 \001(\tB%\372A\"\n dialogflow.googlea" - + "pis.com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027" - + "\n\rtrigger_event\030\006 \001(\tH\000\0225\n\007matches\030\004 \003(\013" - + "2$.google.cloud.dialogflow.cx.v3.Match\0229" - + "\n\014current_page\030\005 \001(\0132#.google.cloud.dial" - + "ogflow.cx.v3.PageB\007\n\005query\"\353\001\n\024FulfillIn" - + "tentRequest\022O\n\024match_intent_request\030\001 \001(" - + "\01321.google.cloud.dialogflow.cx.v3.MatchI" - + "ntentRequest\0223\n\005match\030\002 \001(\0132$.google.clo" - + "ud.dialogflow.cx.v3.Match\022M\n\023output_audi" - + "o_config\030\003 \001(\01320.google.cloud.dialogflow" - + ".cx.v3.OutputAudioConfig\"\323\001\n\025FulfillInte" - + "ntResponse\022\023\n\013response_id\030\001 \001(\t\022@\n\014query" - + "_result\030\002 \001(\0132*.google.cloud.dialogflow." - + "cx.v3.QueryResult\022\024\n\014output_audio\030\003 \001(\014\022" - + "M\n\023output_audio_config\030\004 \001(\01320.google.cl" - + "oud.dialogflow.cx.v3.OutputAudioConfig\";" - + "\n\027SentimentAnalysisResult\022\r\n\005score\030\001 \001(\002" - + "\022\021\n\tmagnitude\030\002 \001(\0022\304\t\n\010Sessions\022\246\002\n\014Det" - + "ectIntent\0222.google.cloud.dialogflow.cx.v" - + "3.DetectIntentRequest\0323.google.cloud.dia" - + "logflow.cx.v3.DetectIntentResponse\"\254\001\202\323\344" - + "\223\002\245\001\"E/v3/{session=projects/*/locations/" - + "*/agents/*/sessions/*}:detectIntent:\001*ZY" - + "\"T/v3/{session=projects/*/locations/*/ag" - + "ents/*/environments/*/sessions/*}:detect" - + "Intent:\001*\022\230\001\n\025StreamingDetectIntent\022;.go" - + "ogle.cloud.dialogflow.cx.v3.StreamingDet" - + "ectIntentRequest\032<.google.cloud.dialogfl" - + "ow.cx.v3.StreamingDetectIntentResponse\"\000" - + "(\0010\001\022\241\002\n\013MatchIntent\0221.google.cloud.dial" - + "ogflow.cx.v3.MatchIntentRequest\0322.google" - + ".cloud.dialogflow.cx.v3.MatchIntentRespo" - + "nse\"\252\001\202\323\344\223\002\243\001\"D/v3/{session=projects/*/l" - + "ocations/*/agents/*/sessions/*}:matchInt" - + "ent:\001*ZX\"S/v3/{session=projects/*/locati" + + " \001(\tH\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\0228\n\004dtmf\030" + + "\027 \001(\0132(.google.cloud.dialogflow.cx.v3.Dt" + + "mfInputH\000\022\025\n\rlanguage_code\030\002 \001(\t\022+\n\npara" + + "meters\030\003 \001(\0132\027.google.protobuf.Struct\022I\n" + + "\021response_messages\030\004 \003(\0132..google.cloud." + + "dialogflow.cx.v3.ResponseMessage\022,\n\020webh" + + "ook_statuses\030\r \003(\0132\022.google.rpc.Status\0221" + + "\n\020webhook_payloads\030\006 \003(\0132\027.google.protob" + + "uf.Struct\0229\n\014current_page\030\007 \001(\0132#.google" + + ".cloud.dialogflow.cx.v3.Page\0229\n\006intent\030\010" + + " \001(\0132%.google.cloud.dialogflow.cx.v3.Int" + + "entB\002\030\001\022\'\n\033intent_detection_confidence\030\t" + + " \001(\002B\002\030\001\0223\n\005match\030\017 \001(\0132$.google.cloud.d" + + "ialogflow.cx.v3.Match\0220\n\017diagnostic_info" + + "\030\n \001(\0132\027.google.protobuf.Struct\022Y\n\031senti" + + "ment_analysis_result\030\021 \001(\01326.google.clou" + + "d.dialogflow.cx.v3.SentimentAnalysisResu" + + "ltB\007\n\005query\"\036\n\tTextInput\022\021\n\004text\030\001 \001(\tB\003" + + "\340A\002\"G\n\013IntentInput\0228\n\006intent\030\001 \001(\tB(\340A\002\372" + + "A\"\n dialogflow.googleapis.com/Intent\"a\n\n" + + "AudioInput\022D\n\006config\030\001 \001(\0132/.google.clou" + + "d.dialogflow.cx.v3.InputAudioConfigB\003\340A\002" + + "\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005event\030\001" + + " \001(\t\"1\n\tDtmfInput\022\016\n\006digits\030\001 \001(\t\022\024\n\014fin" + + "ish_digit\030\002 \001(\t\"\361\002\n\005Match\0225\n\006intent\030\001 \001(" + + "\0132%.google.cloud.dialogflow.cx.v3.Intent" + + "\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030\002 \001(\0132\027.go" + + "ogle.protobuf.Struct\022\026\n\016resolved_input\030\003" + + " \001(\t\022B\n\nmatch_type\030\004 \001(\0162..google.cloud." + + "dialogflow.cx.v3.Match.MatchType\022\022\n\nconf" + + "idence\030\005 \001(\002\"\204\001\n\tMatchType\022\032\n\026MATCH_TYPE" + + "_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIRECT_INT" + + "ENT\020\002\022\025\n\021PARAMETER_FILLING\020\003\022\014\n\010NO_MATCH" + + "\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\"\333\001\n\022MatchInt" + + "entRequest\022:\n\007session\030\001 \001(\tB)\340A\002\372A#\n!dia" + + "logflow.googleapis.com/Session\022D\n\014query_" + + "params\030\002 \001(\0132..google.cloud.dialogflow.c" + + "x.v3.QueryParameters\022C\n\013query_input\030\003 \001(" + + "\0132).google.cloud.dialogflow.cx.v3.QueryI" + + "nputB\003\340A\002\"\220\002\n\023MatchIntentResponse\022\016\n\004tex" + + "t\030\001 \001(\tH\000\022?\n\016trigger_intent\030\002 \001(\tB%\372A\"\n " + + "dialogflow.googleapis.com/IntentH\000\022\024\n\ntr" + + "anscript\030\003 \001(\tH\000\022\027\n\rtrigger_event\030\006 \001(\tH" + + "\000\0225\n\007matches\030\004 \003(\0132$.google.cloud.dialog" + + "flow.cx.v3.Match\0229\n\014current_page\030\005 \001(\0132#" + + ".google.cloud.dialogflow.cx.v3.PageB\007\n\005q" + + "uery\"\353\001\n\024FulfillIntentRequest\022O\n\024match_i" + + "ntent_request\030\001 \001(\01321.google.cloud.dialo" + + "gflow.cx.v3.MatchIntentRequest\0223\n\005match\030" + + "\002 \001(\0132$.google.cloud.dialogflow.cx.v3.Ma" + + "tch\022M\n\023output_audio_config\030\003 \001(\01320.googl" + + "e.cloud.dialogflow.cx.v3.OutputAudioConf" + + "ig\"\323\001\n\025FulfillIntentResponse\022\023\n\013response" + + "_id\030\001 \001(\t\022@\n\014query_result\030\002 \001(\0132*.google" + + ".cloud.dialogflow.cx.v3.QueryResult\022\024\n\014o" + + "utput_audio\030\003 \001(\014\022M\n\023output_audio_config" + + "\030\004 \001(\01320.google.cloud.dialogflow.cx.v3.O" + + "utputAudioConfig\";\n\027SentimentAnalysisRes" + + "ult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\0022\304\t" + + "\n\010Sessions\022\246\002\n\014DetectIntent\0222.google.clo" + + "ud.dialogflow.cx.v3.DetectIntentRequest\032" + + "3.google.cloud.dialogflow.cx.v3.DetectIn" + + "tentResponse\"\254\001\202\323\344\223\002\245\001\"E/v3/{session=pro" + + "jects/*/locations/*/agents/*/sessions/*}" + + ":detectIntent:\001*ZY\"T/v3/{session=project" + + "s/*/locations/*/agents/*/environments/*/" + + "sessions/*}:detectIntent:\001*\022\230\001\n\025Streamin" + + "gDetectIntent\022;.google.cloud.dialogflow." + + "cx.v3.StreamingDetectIntentRequest\032<.goo" + + "gle.cloud.dialogflow.cx.v3.StreamingDete" + + "ctIntentResponse\"\000(\0010\001\022\241\002\n\013MatchIntent\0221" + + ".google.cloud.dialogflow.cx.v3.MatchInte" + + "ntRequest\0322.google.cloud.dialogflow.cx.v" + + "3.MatchIntentResponse\"\252\001\202\323\344\223\002\243\001\"D/v3/{se" + + "ssion=projects/*/locations/*/agents/*/se" + + "ssions/*}:matchIntent:\001*ZX\"S/v3/{session" + + "=projects/*/locations/*/agents/*/environ" + + "ments/*/sessions/*}:matchIntent:\001*\022\325\002\n\rF" + + "ulfillIntent\0223.google.cloud.dialogflow.c" + + "x.v3.FulfillIntentRequest\0324.google.cloud" + + ".dialogflow.cx.v3.FulfillIntentResponse\"" + + "\330\001\202\323\344\223\002\321\001\"[/v3/{match_intent_request.ses" + + "sion=projects/*/locations/*/agents/*/ses" + + "sions/*}:fulfillIntent:\001*Zo\"j/v3/{match_" + + "intent_request.session=projects/*/locati" + "ons/*/agents/*/environments/*/sessions/*" - + "}:matchIntent:\001*\022\325\002\n\rFulfillIntent\0223.goo" - + "gle.cloud.dialogflow.cx.v3.FulfillIntent" - + "Request\0324.google.cloud.dialogflow.cx.v3." - + "FulfillIntentResponse\"\330\001\202\323\344\223\002\321\001\"[/v3/{ma" - + "tch_intent_request.session=projects/*/lo" - + "cations/*/agents/*/sessions/*}:fulfillIn" - + "tent:\001*Zo\"j/v3/{match_intent_request.ses" - + "sion=projects/*/locations/*/agents/*/env" - + "ironments/*/sessions/*}:fulfillIntent:\001*" - + "\032x\312A\031dialogflow.googleapis.com\322AYhttps:/" - + "/www.googleapis.com/auth/cloud-platform," - + "https://www.googleapis.com/auth/dialogfl" - + "owB\230\003\n!com.google.cloud.dialogflow.cx.v3" - + "B\014SessionProtoP\001Z?google.golang.org/genp" - + "roto/googleapis/cloud/dialogflow/cx/v3;c" - + "x\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V" - + "3\352\002!Google::Cloud::Dialogflow::CX::V3\352A\324" - + "\001\n!dialogflow.googleapis.com/Session\022Ipr" - + "ojects/{project}/locations/{location}/ag" - + "ents/{agent}/sessions/{session}\022dproject" - + "s/{project}/locations/{location}/agents/" - + "{agent}/environments/{environment}/sessi" - + "ons/{session}b\006proto3" + + "}:fulfillIntent:\001*\032x\312A\031dialogflow.google" + + "apis.com\322AYhttps://www.googleapis.com/au" + + "th/cloud-platform,https://www.googleapis" + + ".com/auth/dialogflowB\230\003\n!com.google.clou" + + "d.dialogflow.cx.v3B\014SessionProtoP\001Z?goog" + + "le.golang.org/genproto/googleapis/cloud/" + + "dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Clo" + + "ud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dia" + + "logflow::CX::V3\352A\324\001\n!dialogflow.googleap" + + "is.com/Session\022Iprojects/{project}/locat" + + "ions/{location}/agents/{agent}/sessions/" + + "{session}\022dprojects/{project}/locations/" + + "{location}/agents/{agent}/environments/{" + + "environment}/sessions/{session}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -418,6 +419,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TriggerIntent", "Transcript", "TriggerEvent", + "Dtmf", "LanguageCode", "Parameters", "ResponseMessages", diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java deleted file mode 100644 index a8f3d0f9b..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/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-v3/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java deleted file mode 100644 index 3a3f39a7f..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/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-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java deleted file mode 100644 index 8e7553c0c..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/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-v3/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java deleted file mode 100644 index 704771cc4..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/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-v3/src/main/java/com/google/cloud/location/Location.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/Location.java deleted file mode 100644 index 7b7bfc864..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/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-v3/src/main/java/com/google/cloud/location/LocationOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/LocationOrBuilder.java deleted file mode 100644 index 98ab25deb..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/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-v3/src/main/java/com/google/cloud/location/LocationsProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/location/LocationsProto.java deleted file mode 100644 index d2b6da306..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/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-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto index 18cadb357..8c41dcd22 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/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,14 @@ 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 flows prior to sending them queries. See the // [training diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index 49e21d92f..ea5327863 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -31,6 +31,31 @@ option java_package = "com.google.cloud.dialogflow.cx.v3"; option objc_class_prefix = "DF"; option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; +// 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 @@ -80,31 +105,6 @@ 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-v3/src/main/proto/google/cloud/dialogflow/cx/v3/deployment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/deployment.proto new file mode 100644 index 000000000..ba81a7bb7 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/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.v3; + +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.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "DeploymentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Deployments][google.cloud.dialogflow.cx.v3.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.v3.Environment]. + rpc ListDeployments(ListDeploymentsRequest) returns (ListDeploymentsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/deployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. + rpc GetDeployment(GetDeploymentRequest) returns (Deployment) { + option (google.api.http) = { + get: "/v3/{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.v3.Deployments.ListDeployments]. +message ListDeploymentsRequest { + // Required. The [Environment][google.cloud.dialogflow.cx.v3.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.v3.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.v3.Deployments.GetDeployment]. +message GetDeploymentRequest { + // Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.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-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto index 4ff1523c0..054ca8e12 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/environment.proto @@ -59,6 +59,14 @@ service Environments { } // Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3.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.v3.Environment] rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{parent=projects/*/locations/*/agents/*}/environments" @@ -72,6 +80,14 @@ service Environments { } // Updates the specified [Environment][google.cloud.dialogflow.cx.v3.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.v3.Environment] rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v3/{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.v3.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.v3.RunContinuousTestMetadata] + // - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse] rpc RunContinuousTest(RunContinuousTestRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{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.v3.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.v3.DeployFlowMetadata] + // - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse] + rpc DeployFlow(DeployFlowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{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.v3.Environment.TestCasesConfig.test_cases] periodically. + // Default false. If set to ture, run once a day. + bool enable_continuous_run = 2; + + // Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.Environments.DeployFlow]. +message DeployFlowResponse { + // The updated environment where the flow is deployed. + Environment environment = 1; + + // The name of the flow version [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. + // Format: `projects//locations//agents// + // environments//deployments/`. + string deployment = 2; +} + +// Metadata returned for the [Environments.DeployFlow][google.cloud.dialogflow.cx.v3.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-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto index ad439d36d..98be51c4f 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/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.v3.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.v3.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-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto index b8ab53b4c..b3409fd88 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/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.v3.SecuritySettingsService.UpdateSecuritySettings] method. + // [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.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-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto index 2065c03f3..826c8b79b 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto @@ -545,6 +545,10 @@ message QueryResult { // If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as input, this field will contain // the name of the event. string trigger_event = 14; + + // If a [DTMF][DTMFInput] was provided as input, this field will contain + // a copy of the [DTMFInput][]. + DtmfInput dtmf = 23; } // The language that was triggered during intent detection. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto index 654dd7aa0..3f698e19b 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/test_case.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/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.v3.BatchRunTestCasesMetadata] + // - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse] rpc BatchRunTestCases(BatchRunTestCasesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{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.v3.ImportTestCasesMetadata] + // - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse] rpc ImportTestCases(ImportTestCasesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{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.v3.ExportTestCasesMetadata] + // - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse] rpc ExportTestCases(ExportTestCasesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{parent=projects/*/locations/*/agents/*}/testCases:export" @@ -820,6 +842,7 @@ message ExportTestCasesResponse { // Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases] long running // operation. +// This message currently has no fields. message ExportTestCasesMetadata { } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto index d0d1a8a9e..a1aecc65c 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/version.proto @@ -64,6 +64,13 @@ service Versions { } // Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3.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.v3.CreateVersionOperationMetadata] + // - `response`: [Version][google.cloud.dialogflow.cx.v3.Version] rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{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: "/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}:load" diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/location/locations.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/location/locations.proto deleted file mode 100644 index a91766c9d..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/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; -}