From e4352fcfd7b03e66df9a6a5b593b187d81e1f21e Mon Sep 17 00:00:00 2001 From: yoshi-automation <yoshi-automation@google.com> Date: Fri, 21 May 2021 02:23:52 -0700 Subject: [PATCH] feat: added API for continuous test PiperOrigin-RevId: 374994233 Source-Author: Google APIs <noreply@google.com> Source-Date: Thu May 20 18:50:54 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 31313cb7f81b4323d25fb0a320e688a7c6c22502 Source-Link: https://github.com/googleapis/googleapis/commit/31313cb7f81b4323d25fb0a320e688a7c6c22502 --- .../cx/v3beta1/EnvironmentsClient.java | 358 ++++ .../cx/v3beta1/EnvironmentsSettings.java | 44 + .../dialogflow/cx/v3beta1/gapic_metadata.json | 6 + .../cx/v3beta1/stub/EnvironmentsStub.java | 28 + .../stub/EnvironmentsStubSettings.java | 201 ++- .../cx/v3beta1/stub/GrpcEnvironmentsStub.java | 113 ++ .../cx/v3beta1/EnvironmentsClientTest.java | 151 ++ .../cx/v3beta1/MockEnvironmentsImpl.java | 43 + .../cx/v3beta1/EnvironmentsGrpc.java | 245 +++ .../cx/v3beta1/ContinuousTestResult.java | 1564 +++++++++++++++++ .../cx/v3beta1/ContinuousTestResultName.java | 306 ++++ .../ContinuousTestResultOrBuilder.java | 171 ++ .../cx/v3beta1/EnvironmentProto.java | 203 ++- .../ListContinuousTestResultsRequest.java | 954 ++++++++++ ...ContinuousTestResultsRequestOrBuilder.java | 97 + .../ListContinuousTestResultsResponse.java | 1231 +++++++++++++ ...ontinuousTestResultsResponseOrBuilder.java | 116 ++ .../cx/v3beta1/RunContinuousTestMetadata.java | 963 ++++++++++ .../RunContinuousTestMetadataOrBuilder.java | 77 + .../cx/v3beta1/RunContinuousTestRequest.java | 665 +++++++ .../RunContinuousTestRequestOrBuilder.java | 56 + .../cx/v3beta1/RunContinuousTestResponse.java | 762 ++++++++ .../RunContinuousTestResponseOrBuilder.java | 64 + .../dialogflow/cx/v3beta1/environment.proto | 113 ++ synth.metadata | 23 +- 25 files changed, 8503 insertions(+), 51 deletions(-) create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResult.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultName.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponseOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadata.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadataOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequest.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequestOrBuilder.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponse.java create mode 100644 proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponseOrBuilder.java diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java index f0fa080fb..a3f4195dd 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java @@ -932,6 +932,262 @@ public final LookupEnvironmentHistoryPagedResponse lookupEnvironmentHistory( return stub.lookupEnvironmentHistoryCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a continuous test under the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * <p>Sample code: + * + * <pre>{@code + * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + * RunContinuousTestRequest request = + * RunContinuousTestRequest.newBuilder() + * .setEnvironment( + * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + * .toString()) + * .build(); + * RunContinuousTestResponse response = environmentsClient.runContinuousTestAsync(request).get(); + * } + * }</pre> + * + * @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<RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestAsync(RunContinuousTestRequest request) { + return runContinuousTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a continuous test under the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * <p>Sample code: + * + * <pre>{@code + * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + * RunContinuousTestRequest request = + * RunContinuousTestRequest.newBuilder() + * .setEnvironment( + * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + * .toString()) + * .build(); + * OperationFuture<RunContinuousTestResponse, RunContinuousTestMetadata> future = + * environmentsClient.runContinuousTestOperationCallable().futureCall(request); + * // Do something. + * RunContinuousTestResponse response = future.get(); + * } + * }</pre> + */ + public final OperationCallable< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationCallable() { + return stub.runContinuousTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Kicks off a continuous test under the specified + * [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * + * <p>Sample code: + * + * <pre>{@code + * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + * RunContinuousTestRequest request = + * RunContinuousTestRequest.newBuilder() + * .setEnvironment( + * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + * .toString()) + * .build(); + * ApiFuture<Operation> future = + * environmentsClient.runContinuousTestCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }</pre> + */ + public final UnaryCallable<RunContinuousTestRequest, Operation> runContinuousTestCallable() { + return stub.runContinuousTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of continuous test results for a given environment. + * + * <p>Sample code: + * + * <pre>{@code + * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + * EnvironmentName parent = + * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + * for (ContinuousTestResult element : + * environmentsClient.listContinuousTestResults(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }</pre> + * + * @param parent Required. The environment to list results 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 ListContinuousTestResultsPagedResponse listContinuousTestResults( + EnvironmentName parent) { + ListContinuousTestResultsRequest request = + ListContinuousTestResultsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listContinuousTestResults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of continuous test results for a given environment. + * + * <p>Sample code: + * + * <pre>{@code + * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + * String parent = + * ContinuousTestResultName.of( + * "[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[CONTINUOUS_TEST_RESULT]") + * .toString(); + * for (ContinuousTestResult element : + * environmentsClient.listContinuousTestResults(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }</pre> + * + * @param parent Required. The environment to list results 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 ListContinuousTestResultsPagedResponse listContinuousTestResults(String parent) { + ListContinuousTestResultsRequest request = + ListContinuousTestResultsRequest.newBuilder().setParent(parent).build(); + return listContinuousTestResults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of continuous test results for a given environment. + * + * <p>Sample code: + * + * <pre>{@code + * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + * ListContinuousTestResultsRequest request = + * ListContinuousTestResultsRequest.newBuilder() + * .setParent( + * ContinuousTestResultName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[AGENT]", + * "[ENVIRONMENT]", + * "[CONTINUOUS_TEST_RESULT]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (ContinuousTestResult element : + * environmentsClient.listContinuousTestResults(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }</pre> + * + * @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 ListContinuousTestResultsPagedResponse listContinuousTestResults( + ListContinuousTestResultsRequest request) { + return listContinuousTestResultsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of continuous test results for a given environment. + * + * <p>Sample code: + * + * <pre>{@code + * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + * ListContinuousTestResultsRequest request = + * ListContinuousTestResultsRequest.newBuilder() + * .setParent( + * ContinuousTestResultName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[AGENT]", + * "[ENVIRONMENT]", + * "[CONTINUOUS_TEST_RESULT]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture<ContinuousTestResult> future = + * environmentsClient.listContinuousTestResultsPagedCallable().futureCall(request); + * // Do something. + * for (ContinuousTestResult element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }</pre> + */ + public final UnaryCallable< + ListContinuousTestResultsRequest, ListContinuousTestResultsPagedResponse> + listContinuousTestResultsPagedCallable() { + return stub.listContinuousTestResultsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches a list of continuous test results for a given environment. + * + * <p>Sample code: + * + * <pre>{@code + * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + * ListContinuousTestResultsRequest request = + * ListContinuousTestResultsRequest.newBuilder() + * .setParent( + * ContinuousTestResultName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[AGENT]", + * "[ENVIRONMENT]", + * "[CONTINUOUS_TEST_RESULT]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListContinuousTestResultsResponse response = + * environmentsClient.listContinuousTestResultsCallable().call(request); + * for (ContinuousTestResult element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }</pre> + */ + public final UnaryCallable<ListContinuousTestResultsRequest, ListContinuousTestResultsResponse> + listContinuousTestResultsCallable() { + return stub.listContinuousTestResultsCallable(); + } + @Override public final void close() { stub.close(); @@ -1132,4 +1388,106 @@ protected LookupEnvironmentHistoryFixedSizeCollection createCollection( return new LookupEnvironmentHistoryFixedSizeCollection(pages, collectionSize); } } + + public static class ListContinuousTestResultsPagedResponse + extends AbstractPagedListResponse< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult, + ListContinuousTestResultsPage, + ListContinuousTestResultsFixedSizeCollection> { + + public static ApiFuture<ListContinuousTestResultsPagedResponse> createAsync( + PageContext< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult> + context, + ApiFuture<ListContinuousTestResultsResponse> futureResponse) { + ApiFuture<ListContinuousTestResultsPage> futurePage = + ListContinuousTestResultsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction<ListContinuousTestResultsPage, ListContinuousTestResultsPagedResponse>() { + @Override + public ListContinuousTestResultsPagedResponse apply( + ListContinuousTestResultsPage input) { + return new ListContinuousTestResultsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListContinuousTestResultsPagedResponse(ListContinuousTestResultsPage page) { + super(page, ListContinuousTestResultsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListContinuousTestResultsPage + extends AbstractPage< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult, + ListContinuousTestResultsPage> { + + private ListContinuousTestResultsPage( + PageContext< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult> + context, + ListContinuousTestResultsResponse response) { + super(context, response); + } + + private static ListContinuousTestResultsPage createEmptyPage() { + return new ListContinuousTestResultsPage(null, null); + } + + @Override + protected ListContinuousTestResultsPage createPage( + PageContext< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult> + context, + ListContinuousTestResultsResponse response) { + return new ListContinuousTestResultsPage(context, response); + } + + @Override + public ApiFuture<ListContinuousTestResultsPage> createPageAsync( + PageContext< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult> + context, + ApiFuture<ListContinuousTestResultsResponse> futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListContinuousTestResultsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult, + ListContinuousTestResultsPage, + ListContinuousTestResultsFixedSizeCollection> { + + private ListContinuousTestResultsFixedSizeCollection( + List<ListContinuousTestResultsPage> pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListContinuousTestResultsFixedSizeCollection createEmptyCollection() { + return new ListContinuousTestResultsFixedSizeCollection(null, 0); + } + + @Override + protected ListContinuousTestResultsFixedSizeCollection createCollection( + List<ListContinuousTestResultsPage> pages, int collectionSize) { + return new ListContinuousTestResultsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java index 67ea4b24b..6bf7f8afb 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.dialogflow.cx.v3beta1; +import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListContinuousTestResultsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.LookupEnvironmentHistoryPagedResponse; @@ -122,6 +123,27 @@ public UnaryCallSettings<DeleteEnvironmentRequest, Empty> deleteEnvironmentSetti return ((EnvironmentsStubSettings) getStubSettings()).lookupEnvironmentHistorySettings(); } + /** Returns the object with the settings used for calls to runContinuousTest. */ + public UnaryCallSettings<RunContinuousTestRequest, Operation> runContinuousTestSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).runContinuousTestSettings(); + } + + /** Returns the object with the settings used for calls to runContinuousTest. */ + public OperationCallSettings< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).runContinuousTestOperationSettings(); + } + + /** Returns the object with the settings used for calls to listContinuousTestResults. */ + public PagedCallSettings< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ListContinuousTestResultsPagedResponse> + listContinuousTestResultsSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).listContinuousTestResultsSettings(); + } + public static final EnvironmentsSettings create(EnvironmentsStubSettings stub) throws IOException { return new EnvironmentsSettings.Builder(stub.toBuilder()).build(); @@ -270,6 +292,28 @@ public UnaryCallSettings.Builder<DeleteEnvironmentRequest, Empty> deleteEnvironm return getStubSettingsBuilder().lookupEnvironmentHistorySettings(); } + /** Returns the builder for the settings used for calls to runContinuousTest. */ + public UnaryCallSettings.Builder<RunContinuousTestRequest, Operation> + runContinuousTestSettings() { + return getStubSettingsBuilder().runContinuousTestSettings(); + } + + /** Returns the builder for the settings used for calls to runContinuousTest. */ + public OperationCallSettings.Builder< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationSettings() { + return getStubSettingsBuilder().runContinuousTestOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listContinuousTestResults. */ + public PagedCallSettings.Builder< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ListContinuousTestResultsPagedResponse> + listContinuousTestResultsSettings() { + return getStubSettingsBuilder().listContinuousTestResultsSettings(); + } + @Override public EnvironmentsSettings build() throws IOException { return new EnvironmentsSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json index e402154c2..ced8bd626 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json @@ -79,12 +79,18 @@ "GetEnvironment": { "methods": ["getEnvironment", "getEnvironment", "getEnvironment", "getEnvironmentCallable"] }, + "ListContinuousTestResults": { + "methods": ["listContinuousTestResults", "listContinuousTestResults", "listContinuousTestResults", "listContinuousTestResultsPagedCallable", "listContinuousTestResultsCallable"] + }, "ListEnvironments": { "methods": ["listEnvironments", "listEnvironments", "listEnvironments", "listEnvironmentsPagedCallable", "listEnvironmentsCallable"] }, "LookupEnvironmentHistory": { "methods": ["lookupEnvironmentHistory", "lookupEnvironmentHistory", "lookupEnvironmentHistory", "lookupEnvironmentHistoryPagedCallable", "lookupEnvironmentHistoryCallable"] }, + "RunContinuousTest": { + "methods": ["runContinuousTestAsync", "runContinuousTestOperationCallable", "runContinuousTestCallable"] + }, "UpdateEnvironment": { "methods": ["updateEnvironmentAsync", "updateEnvironmentAsync", "updateEnvironmentOperationCallable", "updateEnvironmentCallable"] } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java index 3e9b47a44..84fa58c37 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStub.java @@ -16,6 +16,7 @@ package com.google.cloud.dialogflow.cx.v3beta1.stub; +import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListContinuousTestResultsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.LookupEnvironmentHistoryPagedResponse; @@ -27,10 +28,15 @@ import com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.Environment; import com.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse; import com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; import com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse; import com.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; @@ -101,6 +107,28 @@ public UnaryCallable<DeleteEnvironmentRequest, Empty> deleteEnvironmentCallable( throw new UnsupportedOperationException("Not implemented: lookupEnvironmentHistoryCallable()"); } + public OperationCallable< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: runContinuousTestOperationCallable()"); + } + + public UnaryCallable<RunContinuousTestRequest, Operation> runContinuousTestCallable() { + throw new UnsupportedOperationException("Not implemented: runContinuousTestCallable()"); + } + + public UnaryCallable<ListContinuousTestResultsRequest, ListContinuousTestResultsPagedResponse> + listContinuousTestResultsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listContinuousTestResultsPagedCallable()"); + } + + public UnaryCallable<ListContinuousTestResultsRequest, ListContinuousTestResultsResponse> + listContinuousTestResultsCallable() { + throw new UnsupportedOperationException("Not implemented: listContinuousTestResultsCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java index 7371ac07f..97fa70c9f 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.dialogflow.cx.v3beta1.stub; +import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListContinuousTestResultsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.LookupEnvironmentHistoryPagedResponse; @@ -45,14 +46,20 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult; import com.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.Environment; import com.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse; import com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; import com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse; import com.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -124,6 +131,15 @@ public class EnvironmentsStubSettings extends StubSettings<EnvironmentsStubSetti LookupEnvironmentHistoryResponse, LookupEnvironmentHistoryPagedResponse> lookupEnvironmentHistorySettings; + private final UnaryCallSettings<RunContinuousTestRequest, Operation> runContinuousTestSettings; + private final OperationCallSettings< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationSettings; + private final PagedCallSettings< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ListContinuousTestResultsPagedResponse> + listContinuousTestResultsSettings; private static final PagedListDescriptor< ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> @@ -210,6 +226,53 @@ public Iterable<Environment> extractResources( } }; + private static final PagedListDescriptor< + ListContinuousTestResultsRequest, ListContinuousTestResultsResponse, ContinuousTestResult> + LIST_CONTINUOUS_TEST_RESULTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListContinuousTestResultsRequest injectToken( + ListContinuousTestResultsRequest payload, String token) { + return ListContinuousTestResultsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListContinuousTestResultsRequest injectPageSize( + ListContinuousTestResultsRequest payload, int pageSize) { + return ListContinuousTestResultsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListContinuousTestResultsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListContinuousTestResultsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable<ContinuousTestResult> extractResources( + ListContinuousTestResultsResponse payload) { + return payload.getContinuousTestResultsList() == null + ? ImmutableList.<ContinuousTestResult>of() + : payload.getContinuousTestResultsList(); + } + }; + private static final PagedListResponseFactory< ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> LIST_ENVIRONMENTS_PAGE_STR_FACT = @@ -256,6 +319,34 @@ public ApiFuture<LookupEnvironmentHistoryPagedResponse> getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ListContinuousTestResultsPagedResponse> + LIST_CONTINUOUS_TEST_RESULTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ListContinuousTestResultsPagedResponse>() { + @Override + public ApiFuture<ListContinuousTestResultsPagedResponse> getFuturePagedResponse( + UnaryCallable<ListContinuousTestResultsRequest, ListContinuousTestResultsResponse> + callable, + ListContinuousTestResultsRequest request, + ApiCallContext context, + ApiFuture<ListContinuousTestResultsResponse> futureResponse) { + PageContext< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ContinuousTestResult> + pageContext = + PageContext.create( + callable, LIST_CONTINUOUS_TEST_RESULTS_PAGE_STR_DESC, request, context); + return ListContinuousTestResultsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listEnvironments. */ public PagedCallSettings< ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> @@ -304,6 +395,27 @@ public UnaryCallSettings<DeleteEnvironmentRequest, Empty> deleteEnvironmentSetti return lookupEnvironmentHistorySettings; } + /** Returns the object with the settings used for calls to runContinuousTest. */ + public UnaryCallSettings<RunContinuousTestRequest, Operation> runContinuousTestSettings() { + return runContinuousTestSettings; + } + + /** Returns the object with the settings used for calls to runContinuousTest. */ + public OperationCallSettings< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationSettings() { + return runContinuousTestOperationSettings; + } + + /** Returns the object with the settings used for calls to listContinuousTestResults. */ + public PagedCallSettings< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ListContinuousTestResultsPagedResponse> + listContinuousTestResultsSettings() { + return listContinuousTestResultsSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public EnvironmentsStub createStub() throws IOException { if (getTransportChannelProvider() @@ -383,6 +495,10 @@ protected EnvironmentsStubSettings(Builder settingsBuilder) throws IOException { settingsBuilder.updateEnvironmentOperationSettings().build(); deleteEnvironmentSettings = settingsBuilder.deleteEnvironmentSettings().build(); lookupEnvironmentHistorySettings = settingsBuilder.lookupEnvironmentHistorySettings().build(); + runContinuousTestSettings = settingsBuilder.runContinuousTestSettings().build(); + runContinuousTestOperationSettings = + settingsBuilder.runContinuousTestOperationSettings().build(); + listContinuousTestResultsSettings = settingsBuilder.listContinuousTestResultsSettings().build(); } /** Builder for EnvironmentsStubSettings. */ @@ -408,6 +524,16 @@ public static class Builder extends StubSettings.Builder<EnvironmentsStubSetting LookupEnvironmentHistoryResponse, LookupEnvironmentHistoryPagedResponse> lookupEnvironmentHistorySettings; + private final UnaryCallSettings.Builder<RunContinuousTestRequest, Operation> + runContinuousTestSettings; + private final OperationCallSettings.Builder< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationSettings; + private final PagedCallSettings.Builder< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ListContinuousTestResultsPagedResponse> + listContinuousTestResultsSettings; private static final ImmutableMap<String, ImmutableSet<StatusCode.Code>> RETRYABLE_CODE_DEFINITIONS; @@ -455,6 +581,10 @@ protected Builder(ClientContext clientContext) { deleteEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); lookupEnvironmentHistorySettings = PagedCallSettings.newBuilder(LOOKUP_ENVIRONMENT_HISTORY_PAGE_STR_FACT); + runContinuousTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runContinuousTestOperationSettings = OperationCallSettings.newBuilder(); + listContinuousTestResultsSettings = + PagedCallSettings.newBuilder(LIST_CONTINUOUS_TEST_RESULTS_PAGE_STR_FACT); unaryMethodSettingsBuilders = ImmutableList.<UnaryCallSettings.Builder<?, ?>>of( @@ -463,7 +593,9 @@ protected Builder(ClientContext clientContext) { createEnvironmentSettings, updateEnvironmentSettings, deleteEnvironmentSettings, - lookupEnvironmentHistorySettings); + lookupEnvironmentHistorySettings, + runContinuousTestSettings, + listContinuousTestResultsSettings); initDefaults(this); } @@ -478,6 +610,9 @@ protected Builder(EnvironmentsStubSettings settings) { updateEnvironmentOperationSettings = settings.updateEnvironmentOperationSettings.toBuilder(); deleteEnvironmentSettings = settings.deleteEnvironmentSettings.toBuilder(); lookupEnvironmentHistorySettings = settings.lookupEnvironmentHistorySettings.toBuilder(); + runContinuousTestSettings = settings.runContinuousTestSettings.toBuilder(); + runContinuousTestOperationSettings = settings.runContinuousTestOperationSettings.toBuilder(); + listContinuousTestResultsSettings = settings.listContinuousTestResultsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.<UnaryCallSettings.Builder<?, ?>>of( @@ -486,7 +621,9 @@ protected Builder(EnvironmentsStubSettings settings) { createEnvironmentSettings, updateEnvironmentSettings, deleteEnvironmentSettings, - lookupEnvironmentHistorySettings); + lookupEnvironmentHistorySettings, + runContinuousTestSettings, + listContinuousTestResultsSettings); } private static Builder createDefault() { @@ -531,6 +668,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .runContinuousTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listContinuousTestResultsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .createEnvironmentOperationSettings() .setInitialCallSettings( @@ -579,6 +726,32 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .runContinuousTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .<RunContinuousTestRequest, OperationSnapshot>newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + RunContinuousTestResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + RunContinuousTestMetadata.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; } @@ -652,6 +825,30 @@ public UnaryCallSettings.Builder<DeleteEnvironmentRequest, Empty> deleteEnvironm return lookupEnvironmentHistorySettings; } + /** Returns the builder for the settings used for calls to runContinuousTest. */ + public UnaryCallSettings.Builder<RunContinuousTestRequest, Operation> + runContinuousTestSettings() { + return runContinuousTestSettings; + } + + /** Returns the builder for the settings used for calls to runContinuousTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationSettings() { + return runContinuousTestOperationSettings; + } + + /** Returns the builder for the settings used for calls to listContinuousTestResults. */ + public PagedCallSettings.Builder< + ListContinuousTestResultsRequest, + ListContinuousTestResultsResponse, + ListContinuousTestResultsPagedResponse> + listContinuousTestResultsSettings() { + return listContinuousTestResultsSettings; + } + @Override public EnvironmentsStubSettings build() throws IOException { return new EnvironmentsStubSettings(this); diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java index 38ead881b..e00483b66 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java @@ -16,6 +16,7 @@ package com.google.cloud.dialogflow.cx.v3beta1.stub; +import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListContinuousTestResultsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.LookupEnvironmentHistoryPagedResponse; @@ -32,10 +33,15 @@ import com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.Environment; import com.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse; import com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; import com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; import com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest; +import com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse; import com.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; @@ -126,6 +132,31 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { ProtoUtils.marshaller(LookupEnvironmentHistoryResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor<RunContinuousTestRequest, Operation> + runContinuousTestMethodDescriptor = + MethodDescriptor.<RunContinuousTestRequest, Operation>newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Environments/RunContinuousTest") + .setRequestMarshaller( + ProtoUtils.marshaller(RunContinuousTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListContinuousTestResultsRequest, ListContinuousTestResultsResponse> + listContinuousTestResultsMethodDescriptor = + MethodDescriptor + .<ListContinuousTestResultsRequest, ListContinuousTestResultsResponse>newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Environments/ListContinuousTestResults") + .setRequestMarshaller( + ProtoUtils.marshaller(ListContinuousTestResultsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListContinuousTestResultsResponse.getDefaultInstance())) + .build(); + private final UnaryCallable<ListEnvironmentsRequest, ListEnvironmentsResponse> listEnvironmentsCallable; private final UnaryCallable<ListEnvironmentsRequest, ListEnvironmentsPagedResponse> @@ -143,6 +174,15 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { private final UnaryCallable< LookupEnvironmentHistoryRequest, LookupEnvironmentHistoryPagedResponse> lookupEnvironmentHistoryPagedCallable; + private final UnaryCallable<RunContinuousTestRequest, Operation> runContinuousTestCallable; + private final OperationCallable< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationCallable; + private final UnaryCallable<ListContinuousTestResultsRequest, ListContinuousTestResultsResponse> + listContinuousTestResultsCallable; + private final UnaryCallable< + ListContinuousTestResultsRequest, ListContinuousTestResultsPagedResponse> + listContinuousTestResultsPagedCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -268,6 +308,34 @@ public Map<String, String> extract(LookupEnvironmentHistoryRequest request) { } }) .build(); + GrpcCallSettings<RunContinuousTestRequest, Operation> runContinuousTestTransportSettings = + GrpcCallSettings.<RunContinuousTestRequest, Operation>newBuilder() + .setMethodDescriptor(runContinuousTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor<RunContinuousTestRequest>() { + @Override + public Map<String, String> extract(RunContinuousTestRequest request) { + ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); + params.put("environment", String.valueOf(request.getEnvironment())); + return params.build(); + } + }) + .build(); + GrpcCallSettings<ListContinuousTestResultsRequest, ListContinuousTestResultsResponse> + listContinuousTestResultsTransportSettings = + GrpcCallSettings + .<ListContinuousTestResultsRequest, ListContinuousTestResultsResponse>newBuilder() + .setMethodDescriptor(listContinuousTestResultsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor<ListContinuousTestResultsRequest>() { + @Override + public Map<String, String> extract(ListContinuousTestResultsRequest request) { + ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); this.listEnvironmentsCallable = callableFactory.createUnaryCallable( @@ -315,6 +383,27 @@ public Map<String, String> extract(LookupEnvironmentHistoryRequest request) { lookupEnvironmentHistoryTransportSettings, settings.lookupEnvironmentHistorySettings(), clientContext); + this.runContinuousTestCallable = + callableFactory.createUnaryCallable( + runContinuousTestTransportSettings, + settings.runContinuousTestSettings(), + clientContext); + this.runContinuousTestOperationCallable = + callableFactory.createOperationCallable( + runContinuousTestTransportSettings, + settings.runContinuousTestOperationSettings(), + clientContext, + operationsStub); + this.listContinuousTestResultsCallable = + callableFactory.createUnaryCallable( + listContinuousTestResultsTransportSettings, + settings.listContinuousTestResultsSettings(), + clientContext); + this.listContinuousTestResultsPagedCallable = + callableFactory.createPagedCallable( + listContinuousTestResultsTransportSettings, + settings.listContinuousTestResultsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -380,6 +469,30 @@ public UnaryCallable<DeleteEnvironmentRequest, Empty> deleteEnvironmentCallable( return lookupEnvironmentHistoryPagedCallable; } + @Override + public UnaryCallable<RunContinuousTestRequest, Operation> runContinuousTestCallable() { + return runContinuousTestCallable; + } + + @Override + public OperationCallable< + RunContinuousTestRequest, RunContinuousTestResponse, RunContinuousTestMetadata> + runContinuousTestOperationCallable() { + return runContinuousTestOperationCallable; + } + + @Override + public UnaryCallable<ListContinuousTestResultsRequest, ListContinuousTestResultsResponse> + listContinuousTestResultsCallable() { + return listContinuousTestResultsCallable; + } + + @Override + public UnaryCallable<ListContinuousTestResultsRequest, ListContinuousTestResultsPagedResponse> + listContinuousTestResultsPagedCallable() { + return listContinuousTestResultsPagedCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java index 8d282b61d..5889663e9 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.dialogflow.cx.v3beta1; +import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListContinuousTestResultsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EnvironmentsClient.LookupEnvironmentHistoryPagedResponse; @@ -591,4 +592,154 @@ public void lookupEnvironmentHistoryExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void runContinuousTestTest() throws Exception { + RunContinuousTestResponse expectedResponse = + RunContinuousTestResponse.newBuilder() + .setContinuousTestResult(ContinuousTestResult.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runContinuousTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + RunContinuousTestRequest request = + RunContinuousTestRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .build(); + + RunContinuousTestResponse actualResponse = client.runContinuousTestAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List<AbstractMessage> actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunContinuousTestRequest actualRequest = ((RunContinuousTestRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runContinuousTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + RunContinuousTestRequest request = + RunContinuousTestRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]") + .toString()) + .build(); + client.runContinuousTestAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listContinuousTestResultsTest() throws Exception { + ContinuousTestResult responsesElement = ContinuousTestResult.newBuilder().build(); + ListContinuousTestResultsResponse expectedResponse = + ListContinuousTestResultsResponse.newBuilder() + .setNextPageToken("") + .addAllContinuousTestResults(Arrays.asList(responsesElement)) + .build(); + mockEnvironments.addResponse(expectedResponse); + + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + + ListContinuousTestResultsPagedResponse pagedListResponse = + client.listContinuousTestResults(parent); + + List<ContinuousTestResult> resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getContinuousTestResultsList().get(0), resources.get(0)); + + List<AbstractMessage> actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListContinuousTestResultsRequest actualRequest = + ((ListContinuousTestResultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listContinuousTestResultsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + EnvironmentName parent = + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); + client.listContinuousTestResults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listContinuousTestResultsTest2() throws Exception { + ContinuousTestResult responsesElement = ContinuousTestResult.newBuilder().build(); + ListContinuousTestResultsResponse expectedResponse = + ListContinuousTestResultsResponse.newBuilder() + .setNextPageToken("") + .addAllContinuousTestResults(Arrays.asList(responsesElement)) + .build(); + mockEnvironments.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListContinuousTestResultsPagedResponse pagedListResponse = + client.listContinuousTestResults(parent); + + List<ContinuousTestResult> resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getContinuousTestResultsList().get(0), resources.get(0)); + + List<AbstractMessage> actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListContinuousTestResultsRequest actualRequest = + ((ListContinuousTestResultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listContinuousTestResultsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String parent = "parent-995424086"; + client.listContinuousTestResults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java index 27bd5bde9..a916bfc3d 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEnvironmentsImpl.java @@ -186,4 +186,47 @@ public void lookupEnvironmentHistory( Exception.class.getName()))); } } + + @Override + public void runContinuousTest( + RunContinuousTestRequest request, StreamObserver<Operation> 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 RunContinuousTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listContinuousTestResults( + ListContinuousTestResultsRequest request, + StreamObserver<ListContinuousTestResultsResponse> responseObserver) { + Object response = responses.poll(); + if (response instanceof ListContinuousTestResultsResponse) { + requests.add(request); + responseObserver.onNext(((ListContinuousTestResultsResponse) 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 ListContinuousTestResults, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListContinuousTestResultsResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java index ab66aa553..4643dc874 100644 --- a/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java +++ b/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsGrpc.java @@ -316,6 +316,103 @@ private EnvironmentsGrpc() {} return getLookupEnvironmentHistoryMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest, + com.google.longrunning.Operation> + getRunContinuousTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunContinuousTest", + requestType = com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest, + com.google.longrunning.Operation> + getRunContinuousTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest, + com.google.longrunning.Operation> + getRunContinuousTestMethod; + if ((getRunContinuousTestMethod = EnvironmentsGrpc.getRunContinuousTestMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getRunContinuousTestMethod = EnvironmentsGrpc.getRunContinuousTestMethod) == null) { + EnvironmentsGrpc.getRunContinuousTestMethod = + getRunContinuousTestMethod = + io.grpc.MethodDescriptor + .<com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest, + com.google.longrunning.Operation> + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunContinuousTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("RunContinuousTest")) + .build(); + } + } + } + return getRunContinuousTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse> + getListContinuousTestResultsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListContinuousTestResults", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse> + getListContinuousTestResultsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse> + getListContinuousTestResultsMethod; + if ((getListContinuousTestResultsMethod = EnvironmentsGrpc.getListContinuousTestResultsMethod) + == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getListContinuousTestResultsMethod = + EnvironmentsGrpc.getListContinuousTestResultsMethod) + == null) { + EnvironmentsGrpc.getListContinuousTestResultsMethod = + getListContinuousTestResultsMethod = + io.grpc.MethodDescriptor + .<com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse> + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListContinuousTestResults")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1 + .ListContinuousTestResultsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1 + .ListContinuousTestResultsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("ListContinuousTestResults")) + .build(); + } + } + } + return getListContinuousTestResultsMethod; + } + /** 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<EnvironmentsStub> factory = @@ -454,6 +551,36 @@ public void lookupEnvironmentHistory( getLookupEnvironmentHistoryMethod(), responseObserver); } + /** + * + * + * <pre> + * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * </pre> + */ + public void runContinuousTest( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest request, + io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRunContinuousTestMethod(), responseObserver); + } + + /** + * + * + * <pre> + * Fetches a list of continuous test results for a given environment. + * </pre> + */ + public void listContinuousTestResults( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListContinuousTestResultsMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -496,6 +623,19 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest, com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse>( this, METHODID_LOOKUP_ENVIRONMENT_HISTORY))) + .addMethod( + getRunContinuousTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest, + com.google.longrunning.Operation>(this, METHODID_RUN_CONTINUOUS_TEST))) + .addMethod( + getListContinuousTestResultsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse>( + this, METHODID_LIST_CONTINUOUS_TEST_RESULTS))) .build(); } } @@ -617,6 +757,40 @@ public void lookupEnvironmentHistory( request, responseObserver); } + + /** + * + * + * <pre> + * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * </pre> + */ + public void runContinuousTest( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest request, + io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRunContinuousTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + * <pre> + * Fetches a list of continuous test results for a given environment. + * </pre> + */ + public void listContinuousTestResults( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListContinuousTestResultsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -716,6 +890,33 @@ public com.google.protobuf.Empty deleteEnvironment( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getLookupEnvironmentHistoryMethod(), getCallOptions(), request); } + + /** + * + * + * <pre> + * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * </pre> + */ + public com.google.longrunning.Operation runContinuousTest( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRunContinuousTestMethod(), getCallOptions(), request); + } + + /** + * + * + * <pre> + * Fetches a list of continuous test results for a given environment. + * </pre> + */ + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + listContinuousTestResults( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListContinuousTestResultsMethod(), getCallOptions(), request); + } } /** @@ -818,6 +1019,34 @@ protected EnvironmentsFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getLookupEnvironmentHistoryMethod(), getCallOptions()), request); } + + /** + * + * + * <pre> + * Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + * </pre> + */ + public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> + runContinuousTest(com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRunContinuousTestMethod(), getCallOptions()), request); + } + + /** + * + * + * <pre> + * Fetches a list of continuous test results for a given environment. + * </pre> + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse> + listContinuousTestResults( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListContinuousTestResultsMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_ENVIRONMENTS = 0; @@ -826,6 +1055,8 @@ protected EnvironmentsFutureStub build( private static final int METHODID_UPDATE_ENVIRONMENT = 3; private static final int METHODID_DELETE_ENVIRONMENT = 4; 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 class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, @@ -879,6 +1110,18 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse>) responseObserver); break; + case METHODID_RUN_CONTINUOUS_TEST: + serviceImpl.runContinuousTest( + (com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) request, + (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); + break; + case METHODID_LIST_CONTINUOUS_TEST_RESULTS: + serviceImpl.listContinuousTestResults( + (com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -949,6 +1192,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getUpdateEnvironmentMethod()) .addMethod(getDeleteEnvironmentMethod()) .addMethod(getLookupEnvironmentHistoryMethod()) + .addMethod(getRunContinuousTestMethod()) + .addMethod(getListContinuousTestResultsMethod()) .build(); } } diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResult.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResult.java new file mode 100644 index 000000000..3b282666d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResult.java @@ -0,0 +1,1564 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + * <pre> + * Represents a result from running a test case in an agent environment. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} + */ +public final class ContinuousTestResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) + ContinuousTestResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContinuousTestResult.newBuilder() to construct. + private ContinuousTestResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + + private ContinuousTestResult() { + name_ = ""; + result_ = 0; + testCaseResults_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContinuousTestResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContinuousTestResult( + 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 16: + { + int rawValue = input.readEnum(); + + result_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + testCaseResults_.add(s); + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (runTime_ != null) { + subBuilder = runTime_.toBuilder(); + } + runTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(runTime_); + runTime_ = 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = testCaseResults_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.class, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder.class); + } + + /** + * + * + * <pre> + * The overall result for a continuous test run in an agent environment. + * </pre> + * + * Protobuf enum {@code + * google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult} + */ + public enum AggregatedTestResult implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + * <pre> + * Not specified. Should never be used. + * </pre> + * + * <code>AGGREGATED_TEST_RESULT_UNSPECIFIED = 0;</code> + */ + AGGREGATED_TEST_RESULT_UNSPECIFIED(0), + /** + * + * + * <pre> + * All the tests passed. + * </pre> + * + * <code>PASSED = 1;</code> + */ + PASSED(1), + /** + * + * + * <pre> + * At least one test did not pass. + * </pre> + * + * <code>FAILED = 2;</code> + */ + FAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + * <pre> + * Not specified. Should never be used. + * </pre> + * + * <code>AGGREGATED_TEST_RESULT_UNSPECIFIED = 0;</code> + */ + public static final int AGGREGATED_TEST_RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + * <pre> + * All the tests passed. + * </pre> + * + * <code>PASSED = 1;</code> + */ + public static final int PASSED_VALUE = 1; + /** + * + * + * <pre> + * At least one test did not pass. + * </pre> + * + * <code>FAILED = 2;</code> + */ + public static final int FAILED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AggregatedTestResult 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 AggregatedTestResult forNumber(int value) { + switch (value) { + case 0: + return AGGREGATED_TEST_RESULT_UNSPECIFIED; + case 1: + return PASSED; + case 2: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<AggregatedTestResult> + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap<AggregatedTestResult> + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<AggregatedTestResult>() { + public AggregatedTestResult findValueByNumber(int number) { + return AggregatedTestResult.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AggregatedTestResult[] VALUES = values(); + + public static AggregatedTestResult 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 AggregatedTestResult(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @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; + } + } + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @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 RESULT_FIELD_NUMBER = 2; + private int result_; + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult + getResult() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult.valueOf( + result_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult + .UNRECOGNIZED + : result; + } + + public static final int TEST_CASE_RESULTS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList testCaseResults_; + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... }</code> + * + * @return A list containing the testCaseResults. + */ + public com.google.protobuf.ProtocolStringList getTestCaseResultsList() { + return testCaseResults_; + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... }</code> + * + * @return The count of testCaseResults. + */ + public int getTestCaseResultsCount() { + return testCaseResults_.size(); + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... }</code> + * + * @param index The index of the element to return. + * @return The testCaseResults at the given index. + */ + public java.lang.String getTestCaseResults(int index) { + return testCaseResults_.get(index); + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... }</code> + * + * @param index The index of the value to return. + * @return The bytes of the testCaseResults at the given index. + */ + public com.google.protobuf.ByteString getTestCaseResultsBytes(int index) { + return testCaseResults_.getByteString(index); + } + + public static final int RUN_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp runTime_; + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + * + * @return Whether the runTime field is set. + */ + @java.lang.Override + public boolean hasRunTime() { + return runTime_ != null; + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + * + * @return The runTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRunTime() { + return runTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : runTime_; + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRunTimeOrBuilder() { + return getRunTime(); + } + + 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 (result_ + != com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult + .AGGREGATED_TEST_RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, result_); + } + for (int i = 0; i < testCaseResults_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, testCaseResults_.getRaw(i)); + } + if (runTime_ != null) { + output.writeMessage(4, getRunTime()); + } + 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 (result_ + != com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult + .AGGREGATED_TEST_RESULT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, result_); + } + { + int dataSize = 0; + for (int i = 0; i < testCaseResults_.size(); i++) { + dataSize += computeStringSizeNoTag(testCaseResults_.getRaw(i)); + } + size += dataSize; + size += 1 * getTestCaseResultsList().size(); + } + if (runTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRunTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult other = + (com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) obj; + + if (!getName().equals(other.getName())) return false; + if (result_ != other.result_) return false; + if (!getTestCaseResultsList().equals(other.getTestCaseResultsList())) return false; + if (hasRunTime() != other.hasRunTime()) return false; + if (hasRunTime()) { + if (!getRunTime().equals(other.getRunTime())) 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) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + if (getTestCaseResultsCount() > 0) { + hash = (37 * hash) + TEST_CASE_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getTestCaseResultsList().hashCode(); + } + if (hasRunTime()) { + hash = (37 * hash) + RUN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRunTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult 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; + } + /** + * + * + * <pre> + * Represents a result from running a test case in an agent environment. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.class, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.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_ = ""; + + result_ = 0; + + testCaseResults_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (runTimeBuilder_ == null) { + runTime_ = null; + } else { + runTime_ = null; + runTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult build() { + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult result = + new com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.result_ = result_; + if (((bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = testCaseResults_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.testCaseResults_ = testCaseResults_; + if (runTimeBuilder_ == null) { + result.runTime_ = runTime_; + } else { + result.runTime_ = runTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (!other.testCaseResults_.isEmpty()) { + if (testCaseResults_.isEmpty()) { + testCaseResults_ = other.testCaseResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestCaseResultsIsMutable(); + testCaseResults_.addAll(other.testCaseResults_); + } + onChanged(); + } + if (other.hasRunTime()) { + mergeRunTime(other.getRunTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @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; + } + } + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @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; + } + } + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @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; + } + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @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 int result_ = 0; + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code> + * .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code> + * .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + + result_ = value; + onChanged(); + return this; + } + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code> + * .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult + getResult() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult.valueOf( + result_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult + .UNRECOGNIZED + : result; + } + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code> + * .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult value) { + if (value == null) { + throw new NullPointerException(); + } + + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code> + * .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @return This builder for chaining. + */ + public Builder clearResult() { + + result_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList testCaseResults_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTestCaseResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + testCaseResults_ = new com.google.protobuf.LazyStringArrayList(testCaseResults_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @return A list containing the testCaseResults. + */ + public com.google.protobuf.ProtocolStringList getTestCaseResultsList() { + return testCaseResults_.getUnmodifiableView(); + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @return The count of testCaseResults. + */ + public int getTestCaseResultsCount() { + return testCaseResults_.size(); + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @param index The index of the element to return. + * @return The testCaseResults at the given index. + */ + public java.lang.String getTestCaseResults(int index) { + return testCaseResults_.get(index); + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @param index The index of the value to return. + * @return The bytes of the testCaseResults at the given index. + */ + public com.google.protobuf.ByteString getTestCaseResultsBytes(int index) { + return testCaseResults_.getByteString(index); + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @param index The index to set the value at. + * @param value The testCaseResults to set. + * @return This builder for chaining. + */ + public Builder setTestCaseResults(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseResultsIsMutable(); + testCaseResults_.set(index, value); + onChanged(); + return this; + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @param value The testCaseResults to add. + * @return This builder for chaining. + */ + public Builder addTestCaseResults(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(value); + onChanged(); + return this; + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @param values The testCaseResults to add. + * @return This builder for chaining. + */ + public Builder addAllTestCaseResults(java.lang.Iterable<java.lang.String> values) { + ensureTestCaseResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCaseResults_); + onChanged(); + return this; + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @return This builder for chaining. + */ + public Builder clearTestCaseResults() { + testCaseResults_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... } + * </code> + * + * @param value The bytes of the testCaseResults to add. + * @return This builder for chaining. + */ + public Builder addTestCaseResultsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTestCaseResultsIsMutable(); + testCaseResults_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp runTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + runTimeBuilder_; + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + * + * @return Whether the runTime field is set. + */ + public boolean hasRunTime() { + return runTimeBuilder_ != null || runTime_ != null; + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + * + * @return The runTime. + */ + public com.google.protobuf.Timestamp getRunTime() { + if (runTimeBuilder_ == null) { + return runTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : runTime_; + } else { + return runTimeBuilder_.getMessage(); + } + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + public Builder setRunTime(com.google.protobuf.Timestamp value) { + if (runTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runTime_ = value; + onChanged(); + } else { + runTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + public Builder setRunTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (runTimeBuilder_ == null) { + runTime_ = builderForValue.build(); + onChanged(); + } else { + runTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + public Builder mergeRunTime(com.google.protobuf.Timestamp value) { + if (runTimeBuilder_ == null) { + if (runTime_ != null) { + runTime_ = + com.google.protobuf.Timestamp.newBuilder(runTime_).mergeFrom(value).buildPartial(); + } else { + runTime_ = value; + } + onChanged(); + } else { + runTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + public Builder clearRunTime() { + if (runTimeBuilder_ == null) { + runTime_ = null; + onChanged(); + } else { + runTime_ = null; + runTimeBuilder_ = null; + } + + return this; + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + public com.google.protobuf.Timestamp.Builder getRunTimeBuilder() { + + onChanged(); + return getRunTimeFieldBuilder().getBuilder(); + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + public com.google.protobuf.TimestampOrBuilder getRunTimeOrBuilder() { + if (runTimeBuilder_ != null) { + return runTimeBuilder_.getMessageOrBuilder(); + } else { + return runTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : runTime_; + } + } + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRunTimeFieldBuilder() { + if (runTimeBuilder_ == null) { + runTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRunTime(), getParentForChildren(), isClean()); + runTime_ = null; + } + return runTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) + private static final com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ContinuousTestResult> PARSER = + new com.google.protobuf.AbstractParser<ContinuousTestResult>() { + @java.lang.Override + public ContinuousTestResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContinuousTestResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<ContinuousTestResult> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ContinuousTestResult> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultName.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultName.java new file mode 100644 index 000000000..c8fb8855b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultName.java @@ -0,0 +1,306 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ContinuousTestResultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_ENVIRONMENT_CONTINUOUS_TEST_RESULT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}"); + private volatile Map<String, String> fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String environment; + private final String continuousTestResult; + + @Deprecated + protected ContinuousTestResultName() { + project = null; + location = null; + agent = null; + environment = null; + continuousTestResult = null; + } + + private ContinuousTestResultName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + continuousTestResult = Preconditions.checkNotNull(builder.getContinuousTestResult()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getEnvironment() { + return environment; + } + + public String getContinuousTestResult() { + return continuousTestResult; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ContinuousTestResultName of( + String project, + String location, + String agent, + String environment, + String continuousTestResult) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setEnvironment(environment) + .setContinuousTestResult(continuousTestResult) + .build(); + } + + public static String format( + String project, + String location, + String agent, + String environment, + String continuousTestResult) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setEnvironment(environment) + .setContinuousTestResult(continuousTestResult) + .build() + .toString(); + } + + public static ContinuousTestResultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map<String, String> matchMap = + PROJECT_LOCATION_AGENT_ENVIRONMENT_CONTINUOUS_TEST_RESULT.validatedMatch( + formattedString, "ContinuousTestResultName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("environment"), + matchMap.get("continuous_test_result")); + } + + public static List<ContinuousTestResultName> parseList(List<String> formattedStrings) { + List<ContinuousTestResultName> list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List<String> toStringList(List<ContinuousTestResultName> values) { + List<String> list = new ArrayList<>(values.size()); + for (ContinuousTestResultName 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_CONTINUOUS_TEST_RESULT.matches(formattedString); + } + + @Override + public Map<String, String> getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder<String, String> 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 (continuousTestResult != null) { + fieldMapBuilder.put("continuous_test_result", continuousTestResult); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_ENVIRONMENT_CONTINUOUS_TEST_RESULT.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "environment", + environment, + "continuous_test_result", + continuousTestResult); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ContinuousTestResultName that = ((ContinuousTestResultName) 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.continuousTestResult, that.continuousTestResult); + } + 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(continuousTestResult); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String environment; + private String continuousTestResult; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getEnvironment() { + return environment; + } + + public String getContinuousTestResult() { + return continuousTestResult; + } + + 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 setContinuousTestResult(String continuousTestResult) { + this.continuousTestResult = continuousTestResult; + return this; + } + + private Builder(ContinuousTestResultName continuousTestResultName) { + project = continuousTestResultName.project; + location = continuousTestResultName.location; + agent = continuousTestResultName.agent; + environment = continuousTestResultName.environment; + continuousTestResult = continuousTestResultName.continuousTestResult; + } + + public ContinuousTestResultName build() { + return new ContinuousTestResultName(this); + } + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultOrBuilder.java new file mode 100644 index 000000000..11db813e7 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ContinuousTestResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + * <pre> + * The resource name for the continuous test result. Format: + * `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment + * ID>/continuousTestResults/<ContinuousTestResult ID>`. + * </pre> + * + * <code>string name = 1;</code> + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + * + * + * <pre> + * The result of this continuous test run, i.e. whether all the tests in this + * continuous test run pass or not. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult result = 2; + * </code> + * + * @return The result. + */ + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult getResult(); + + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... }</code> + * + * @return A list containing the testCaseResults. + */ + java.util.List<java.lang.String> getTestCaseResultsList(); + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... }</code> + * + * @return The count of testCaseResults. + */ + int getTestCaseResultsCount(); + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... }</code> + * + * @param index The index of the element to return. + * @return The testCaseResults at the given index. + */ + java.lang.String getTestCaseResults(int index); + /** + * + * + * <pre> + * A list of individual test case results names in this continuous test run. + * </pre> + * + * <code>repeated string test_case_results = 3 [(.google.api.resource_reference) = { ... }</code> + * + * @param index The index of the value to return. + * @return The bytes of the testCaseResults at the given index. + */ + com.google.protobuf.ByteString getTestCaseResultsBytes(int index); + + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + * + * @return Whether the runTime field is set. + */ + boolean hasRunTime(); + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + * + * @return The runTime. + */ + com.google.protobuf.Timestamp getRunTime(); + /** + * + * + * <pre> + * Time when the continuous testing run starts. + * </pre> + * + * <code>.google.protobuf.Timestamp run_time = 4;</code> + */ + com.google.protobuf.TimestampOrBuilder getRunTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentProto.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentProto.java index d2e168e57..b81317c32 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentProto.java @@ -67,6 +67,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_LookupEnvironmentHistoryResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_LookupEnvironmentHistoryResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -122,50 +146,93 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "nvironmentHistoryResponse\022E\n\014environment" + "s\030\001 \003(\0132/.google.cloud.dialogflow.cx.v3b" + "eta1.Environment\022\027\n\017next_page_token\030\002 \001(" - + "\t2\237\014\n\014Environments\022\336\001\n\020ListEnvironments\022" - + ";.google.cloud.dialogflow.cx.v3beta1.Lis" - + "tEnvironmentsRequest\032<.google.cloud.dial" - + "ogflow.cx.v3beta1.ListEnvironmentsRespon" - + "se\"O\202\323\344\223\002@\022>/v3beta1/{parent=projects/*/" - + "locations/*/agents/*}/environments\332A\006par" - + "ent\022\313\001\n\016GetEnvironment\0229.google.cloud.di" - + "alogflow.cx.v3beta1.GetEnvironmentReques" - + "t\032/.google.cloud.dialogflow.cx.v3beta1.E" - + "nvironment\"M\202\323\344\223\002@\022>/v3beta1/{name=proje" - + "cts/*/locations/*/agents/*/environments/" - + "*}\332A\004name\022\203\002\n\021CreateEnvironment\022<.google" - + ".cloud.dialogflow.cx.v3beta1.CreateEnvir" - + "onmentRequest\032\035.google.longrunning.Opera" - + "tion\"\220\001\202\323\344\223\002M\">/v3beta1/{parent=projects" - + "/*/locations/*/agents/*}/environments:\013e" - + "nvironment\332A\022parent,environment\312A%\n\013Envi" - + "ronment\022\026google.protobuf.Struct\022\224\002\n\021Upda" - + "teEnvironment\022<.google.cloud.dialogflow." - + "cx.v3beta1.UpdateEnvironmentRequest\032\035.go" - + "ogle.longrunning.Operation\"\241\001\202\323\344\223\002Y2J/v3" - + "beta1/{environment.name=projects/*/locat" - + "ions/*/agents/*/environments/*}:\013environ" - + "ment\332A\027environment,update_mask\312A%\n\013Envir" - + "onment\022\026google.protobuf.Struct\022\270\001\n\021Delet" - + "eEnvironment\022<.google.cloud.dialogflow.c" - + "x.v3beta1.DeleteEnvironmentRequest\032\026.goo" - + "gle.protobuf.Empty\"M\202\323\344\223\002@*>/v3beta1/{na" - + "me=projects/*/locations/*/agents/*/envir" - + "onments/*}\332A\004name\022\215\002\n\030LookupEnvironmentH" - + "istory\022C.google.cloud.dialogflow.cx.v3be" - + "ta1.LookupEnvironmentHistoryRequest\032D.go" - + "ogle.cloud.dialogflow.cx.v3beta1.LookupE" - + "nvironmentHistoryResponse\"f\202\323\344\223\002Y\022W/v3be" - + "ta1/{name=projects/*/locations/*/agents/" - + "*/environments/*}:lookupEnvironmentHisto" - + "ry\332A\004name\032x\312A\031dialogflow.googleapis.com\322" - + "AYhttps://www.googleapis.com/auth/cloud-" - + "platform,https://www.googleapis.com/auth" - + "/dialogflowB\257\001\n&com.google.cloud.dialogf" - + "low.cx.v3beta1B\020EnvironmentProtoP\001ZDgoog" - + "le.golang.org/genproto/googleapis/cloud/" - + "dialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002\"Googl" - + "e.Cloud.Dialogflow.Cx.V3Beta1b\006proto3" + + "\t\"\215\004\n\024ContinuousTestResult\022\014\n\004name\030\001 \001(\t" + + "\022]\n\006result\030\002 \001(\0162M.google.cloud.dialogfl" + + "ow.cx.v3beta1.ContinuousTestResult.Aggre" + + "gatedTestResult\022H\n\021test_case_results\030\003 \003" + + "(\tB-\372A*\n(dialogflow.googleapis.com/TestC" + + "aseResult\022,\n\010run_time\030\004 \001(\0132\032.google.pro" + + "tobuf.Timestamp\"V\n\024AggregatedTestResult\022" + + "&\n\"AGGREGATED_TEST_RESULT_UNSPECIFIED\020\000\022" + + "\n\n\006PASSED\020\001\022\n\n\006FAILED\020\002:\267\001\352A\263\001\n.dialogfl" + + "ow.googleapis.com/ContinuousTestResult\022\200" + + "\001projects/{project}/locations/{location}" + + "/agents/{agent}/environments/{environmen" + + "t}/continuousTestResults/{continuous_tes" + + "t_result}\"^\n\030RunContinuousTestRequest\022B\n" + + "\013environment\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.g" + + "oogleapis.com/Environment\"u\n\031RunContinuo" + + "usTestResponse\022X\n\026continuous_test_result" + + "\030\001 \001(\01328.google.cloud.dialogflow.cx.v3be" + + "ta1.ContinuousTestResult\"Z\n\031RunContinuou" + + "sTestMetadata\022=\n\006errors\030\001 \003(\0132-.google.c" + + "loud.dialogflow.cx.v3beta1.TestError\"\221\001\n" + + " ListContinuousTestResultsRequest\022F\n\006par" + + "ent\030\001 \001(\tB6\340A\002\372A0\022.dialogflow.googleapis" + + ".com/ContinuousTestResult\022\021\n\tpage_size\030\002" + + " \001(\005\022\022\n\npage_token\030\003 \001(\t\"\227\001\n!ListContinu" + + "ousTestResultsResponse\022Y\n\027continuous_tes" + + "t_results\030\001 \003(\01328.google.cloud.dialogflo" + + "w.cx.v3beta1.ContinuousTestResult\022\027\n\017nex" + + "t_page_token\030\002 \001(\t2\304\020\n\014Environments\022\336\001\n\020" + + "ListEnvironments\022;.google.cloud.dialogfl" + + "ow.cx.v3beta1.ListEnvironmentsRequest\032<." + + "google.cloud.dialogflow.cx.v3beta1.ListE" + + "nvironmentsResponse\"O\202\323\344\223\002@\022>/v3beta1/{p" + + "arent=projects/*/locations/*/agents/*}/e" + + "nvironments\332A\006parent\022\313\001\n\016GetEnvironment\022" + + "9.google.cloud.dialogflow.cx.v3beta1.Get" + + "EnvironmentRequest\032/.google.cloud.dialog" + + "flow.cx.v3beta1.Environment\"M\202\323\344\223\002@\022>/v3" + + "beta1/{name=projects/*/locations/*/agent" + + "s/*/environments/*}\332A\004name\022\203\002\n\021CreateEnv" + + "ironment\022<.google.cloud.dialogflow.cx.v3" + + "beta1.CreateEnvironmentRequest\032\035.google." + + "longrunning.Operation\"\220\001\202\323\344\223\002M\">/v3beta1" + + "/{parent=projects/*/locations/*/agents/*" + + "}/environments:\013environment\332A\022parent,env" + + "ironment\312A%\n\013Environment\022\026google.protobu" + + "f.Struct\022\224\002\n\021UpdateEnvironment\022<.google." + + "cloud.dialogflow.cx.v3beta1.UpdateEnviro" + + "nmentRequest\032\035.google.longrunning.Operat" + + "ion\"\241\001\202\323\344\223\002Y2J/v3beta1/{environment.name" + + "=projects/*/locations/*/agents/*/environ" + + "ments/*}:\013environment\332A\027environment,upda" + + "te_mask\312A%\n\013Environment\022\026google.protobuf" + + ".Struct\022\270\001\n\021DeleteEnvironment\022<.google.c" + + "loud.dialogflow.cx.v3beta1.DeleteEnviron" + + "mentRequest\032\026.google.protobuf.Empty\"M\202\323\344" + + "\223\002@*>/v3beta1/{name=projects/*/locations" + + "/*/agents/*/environments/*}\332A\004name\022\215\002\n\030L" + + "ookupEnvironmentHistory\022C.google.cloud.d" + + "ialogflow.cx.v3beta1.LookupEnvironmentHi" + + "storyRequest\032D.google.cloud.dialogflow.c" + + "x.v3beta1.LookupEnvironmentHistoryRespon" + + "se\"f\202\323\344\223\002Y\022W/v3beta1/{name=projects/*/lo" + + "cations/*/agents/*/environments/*}:looku" + + "pEnvironmentHistory\332A\004name\022\216\002\n\021RunContin" + + "uousTest\022<.google.cloud.dialogflow.cx.v3" + + "beta1.RunContinuousTestRequest\032\035.google." + + "longrunning.Operation\"\233\001\202\323\344\223\002\\\"W/v3beta1" + + "/{environment=projects/*/locations/*/age" + + "nts/*/environments/*}:runContinuousTest:" + + "\001*\312A6\n\031RunContinuousTestResponse\022\031RunCon" + + "tinuousTestMetadata\022\221\002\n\031ListContinuousTe" + + "stResults\022D.google.cloud.dialogflow.cx.v" + + "3beta1.ListContinuousTestResultsRequest\032" + + "E.google.cloud.dialogflow.cx.v3beta1.Lis" + + "tContinuousTestResultsResponse\"g\202\323\344\223\002X\022V" + + "/v3beta1/{parent=projects/*/locations/*/" + + "agents/*/environments/*}/continuousTestR" + + "esults\332A\006parent\032x\312A\031dialogflow.googleapi" + + "s.com\322AYhttps://www.googleapis.com/auth/" + + "cloud-platform,https://www.googleapis.co" + + "m/auth/dialogflowB\257\001\n&com.google.cloud.d" + + "ialogflow.cx.v3beta1B\020EnvironmentProtoP\001" + + "ZDgoogle.golang.org/genproto/googleapis/" + + "cloud/dialogflow/cx/v3beta1;cx\370\001\001\242\002\002DF\252\002" + + "\"Google.Cloud.Dialogflow.Cx.V3Beta1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -263,6 +330,54 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Environments", "NextPageToken", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ContinuousTestResult_descriptor, + new java.lang.String[] { + "Name", "Result", "TestCaseResults", "RunTime", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_descriptor, + new java.lang.String[] { + "Environment", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_descriptor, + new java.lang.String[] { + "ContinuousTestResult", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_descriptor, + new java.lang.String[] { + "Errors", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_descriptor, + new java.lang.String[] { + "ContinuousTestResults", "NextPageToken", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequest.java new file mode 100644 index 000000000..ce6f01411 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequest.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/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + * <pre> + * The request message for [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResults]. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} + */ +public final class ListContinuousTestResultsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) + ListContinuousTestResultsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListContinuousTestResultsRequest.newBuilder() to construct. + private ListContinuousTestResultsRequest( + com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + + private ListContinuousTestResultsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListContinuousTestResultsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListContinuousTestResultsRequest( + 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(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + * <pre> + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * </pre> + * + * <code>int32 page_size = 2;</code> + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) obj; + + 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; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest 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; + } + /** + * + * + * <pre> + * The request message for [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResults]. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.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(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + * <pre> + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * </pre> + * + * <code>int32 page_size = 2;</code> + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + * <pre> + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * </pre> + * + * <code>int32 page_size = 2;</code> + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + * <pre> + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * </pre> + * + * <code>int32 page_size = 2;</code> + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ListContinuousTestResultsRequest> PARSER = + new com.google.protobuf.AbstractParser<ListContinuousTestResultsRequest>() { + @java.lang.Override + public ListContinuousTestResultsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListContinuousTestResultsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<ListContinuousTestResultsRequest> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ListContinuousTestResultsRequest> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequestOrBuilder.java new file mode 100644 index 000000000..7ebf2cfa3 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListContinuousTestResultsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + * <pre> + * Required. The environment to list results for. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ + * environments/<Environment ID>`. + * </pre> + * + * <code> + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + * <pre> + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * </pre> + * + * <code>int32 page_size = 2;</code> + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + * <pre> + * The next_page_token value returned from a previous list request. + * </pre> + * + * <code>string page_token = 3;</code> + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponse.java new file mode 100644 index 000000000..41dd10909 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponse.java @@ -0,0 +1,1231 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + * <pre> + * The response message for [Environments.ListTestCaseResults][]. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} + */ +public final class ListContinuousTestResultsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) + ListContinuousTestResultsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListContinuousTestResultsResponse.newBuilder() to construct. + private ListContinuousTestResultsResponse( + com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + + private ListContinuousTestResultsResponse() { + continuousTestResults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListContinuousTestResultsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListContinuousTestResultsResponse( + 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)) { + continuousTestResults_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult>(); + mutable_bitField0_ |= 0x00000001; + } + continuousTestResults_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.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)) { + continuousTestResults_ = java.util.Collections.unmodifiableList(continuousTestResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.Builder.class); + } + + public static final int CONTINUOUS_TEST_RESULTS_FIELD_NUMBER = 1; + private java.util.List<com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult> + continuousTestResults_; + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + @java.lang.Override + public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult> + getContinuousTestResultsList() { + return continuousTestResults_; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder> + getContinuousTestResultsOrBuilderList() { + return continuousTestResults_; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + @java.lang.Override + public int getContinuousTestResultsCount() { + return continuousTestResults_.size(); + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getContinuousTestResults( + int index) { + return continuousTestResults_.get(index); + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder + getContinuousTestResultsOrBuilder(int index) { + return continuousTestResults_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @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; + } + } + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @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 < continuousTestResults_.size(); i++) { + output.writeMessage(1, continuousTestResults_.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 < continuousTestResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, continuousTestResults_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) obj; + + if (!getContinuousTestResultsList().equals(other.getContinuousTestResultsList())) 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 (getContinuousTestResultsCount() > 0) { + hash = (37 * hash) + CONTINUOUS_TEST_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getContinuousTestResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse 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; + } + /** + * + * + * <pre> + * The response message for [Environments.ListTestCaseResults][]. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getContinuousTestResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (continuousTestResultsBuilder_ == null) { + continuousTestResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + continuousTestResultsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListContinuousTestResultsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse(this); + int from_bitField0_ = bitField0_; + if (continuousTestResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + continuousTestResults_ = java.util.Collections.unmodifiableList(continuousTestResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.continuousTestResults_ = continuousTestResults_; + } else { + result.continuousTestResults_ = continuousTestResultsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + .getDefaultInstance()) return this; + if (continuousTestResultsBuilder_ == null) { + if (!other.continuousTestResults_.isEmpty()) { + if (continuousTestResults_.isEmpty()) { + continuousTestResults_ = other.continuousTestResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContinuousTestResultsIsMutable(); + continuousTestResults_.addAll(other.continuousTestResults_); + } + onChanged(); + } + } else { + if (!other.continuousTestResults_.isEmpty()) { + if (continuousTestResultsBuilder_.isEmpty()) { + continuousTestResultsBuilder_.dispose(); + continuousTestResultsBuilder_ = null; + continuousTestResults_ = other.continuousTestResults_; + bitField0_ = (bitField0_ & ~0x00000001); + continuousTestResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContinuousTestResultsFieldBuilder() + : null; + } else { + continuousTestResultsBuilder_.addAllMessages(other.continuousTestResults_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List<com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult> + continuousTestResults_ = java.util.Collections.emptyList(); + + private void ensureContinuousTestResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + continuousTestResults_ = + new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult>( + continuousTestResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder> + continuousTestResultsBuilder_; + + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult> + getContinuousTestResultsList() { + if (continuousTestResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(continuousTestResults_); + } else { + return continuousTestResultsBuilder_.getMessageList(); + } + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public int getContinuousTestResultsCount() { + if (continuousTestResultsBuilder_ == null) { + return continuousTestResults_.size(); + } else { + return continuousTestResultsBuilder_.getCount(); + } + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getContinuousTestResults( + int index) { + if (continuousTestResultsBuilder_ == null) { + return continuousTestResults_.get(index); + } else { + return continuousTestResultsBuilder_.getMessage(index); + } + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder setContinuousTestResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult value) { + if (continuousTestResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContinuousTestResultsIsMutable(); + continuousTestResults_.set(index, value); + onChanged(); + } else { + continuousTestResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder setContinuousTestResults( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder builderForValue) { + if (continuousTestResultsBuilder_ == null) { + ensureContinuousTestResultsIsMutable(); + continuousTestResults_.set(index, builderForValue.build()); + onChanged(); + } else { + continuousTestResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder addContinuousTestResults( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult value) { + if (continuousTestResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContinuousTestResultsIsMutable(); + continuousTestResults_.add(value); + onChanged(); + } else { + continuousTestResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder addContinuousTestResults( + int index, com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult value) { + if (continuousTestResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContinuousTestResultsIsMutable(); + continuousTestResults_.add(index, value); + onChanged(); + } else { + continuousTestResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder addContinuousTestResults( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder builderForValue) { + if (continuousTestResultsBuilder_ == null) { + ensureContinuousTestResultsIsMutable(); + continuousTestResults_.add(builderForValue.build()); + onChanged(); + } else { + continuousTestResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder addContinuousTestResults( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder builderForValue) { + if (continuousTestResultsBuilder_ == null) { + ensureContinuousTestResultsIsMutable(); + continuousTestResults_.add(index, builderForValue.build()); + onChanged(); + } else { + continuousTestResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder addAllContinuousTestResults( + java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult> + values) { + if (continuousTestResultsBuilder_ == null) { + ensureContinuousTestResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, continuousTestResults_); + onChanged(); + } else { + continuousTestResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder clearContinuousTestResults() { + if (continuousTestResultsBuilder_ == null) { + continuousTestResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + continuousTestResultsBuilder_.clear(); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public Builder removeContinuousTestResults(int index) { + if (continuousTestResultsBuilder_ == null) { + ensureContinuousTestResultsIsMutable(); + continuousTestResults_.remove(index); + onChanged(); + } else { + continuousTestResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder + getContinuousTestResultsBuilder(int index) { + return getContinuousTestResultsFieldBuilder().getBuilder(index); + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder + getContinuousTestResultsOrBuilder(int index) { + if (continuousTestResultsBuilder_ == null) { + return continuousTestResults_.get(index); + } else { + return continuousTestResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder> + getContinuousTestResultsOrBuilderList() { + if (continuousTestResultsBuilder_ != null) { + return continuousTestResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(continuousTestResults_); + } + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder + addContinuousTestResultsBuilder() { + return getContinuousTestResultsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.getDefaultInstance()); + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder + addContinuousTestResultsBuilder(int index) { + return getContinuousTestResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.getDefaultInstance()); + } + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder> + getContinuousTestResultsBuilderList() { + return getContinuousTestResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder> + getContinuousTestResultsFieldBuilder() { + if (continuousTestResultsBuilder_ == null) { + continuousTestResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder>( + continuousTestResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + continuousTestResults_ = null; + } + return continuousTestResultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @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; + } + } + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @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; + } + } + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @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; + } + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ListContinuousTestResultsResponse> PARSER = + new com.google.protobuf.AbstractParser<ListContinuousTestResultsResponse>() { + @java.lang.Override + public ListContinuousTestResultsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListContinuousTestResultsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<ListContinuousTestResultsResponse> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ListContinuousTestResultsResponse> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponseOrBuilder.java new file mode 100644 index 000000000..5bcd2d472 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponseOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListContinuousTestResultsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + java.util.List<com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult> + getContinuousTestResultsList(); + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getContinuousTestResults(int index); + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + int getContinuousTestResultsCount(); + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder> + getContinuousTestResultsOrBuilderList(); + /** + * + * + * <pre> + * The list of continuous test results. + * </pre> + * + * <code> + * repeated .google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_results = 1; + * </code> + */ + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder + getContinuousTestResultsOrBuilder(int index); + + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + * <pre> + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * </pre> + * + * <code>string next_page_token = 2;</code> + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadata.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadata.java new file mode 100644 index 000000000..4d09ad34f --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadata.java @@ -0,0 +1,963 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + * <pre> + * Metadata returned for the [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest] long running + * operation. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} + */ +public final class RunContinuousTestMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) + RunContinuousTestMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunContinuousTestMetadata.newBuilder() to construct. + private RunContinuousTestMetadata(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + + private RunContinuousTestMetadata() { + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunContinuousTestMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunContinuousTestMetadata( + 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)) { + errors_ = + new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3beta1.TestError>(); + mutable_bitField0_ |= 0x00000001; + } + errors_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.TestError.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.Builder.class); + } + + public static final int ERRORS_FIELD_NUMBER = 1; + private java.util.List<com.google.cloud.dialogflow.cx.v3beta1.TestError> errors_; + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + @java.lang.Override + public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.TestError> getErrorsList() { + return errors_; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + getErrorsOrBuilderList() { + return errors_; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestError getErrors(int index) { + return errors_.get(index); + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getErrorsOrBuilder(int index) { + return errors_.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 < errors_.size(); i++) { + output.writeMessage(1, errors_.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 < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) obj; + + if (!getErrorsList().equals(other.getErrorsList())) 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 (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata 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; + } + /** + * + * + * <pre> + * Metadata returned for the [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest] long running + * operation. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata(this); + int from_bitField0_ = bitField0_; + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.getDefaultInstance()) + return this; + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorsFieldBuilder() + : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List<com.google.cloud.dialogflow.cx.v3beta1.TestError> errors_ = + java.util.Collections.emptyList(); + + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errors_ = + new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3beta1.TestError>(errors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + errorsBuilder_; + + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.TestError> getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder setErrors(int index, com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder setErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder addErrors(com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder addErrors(int index, com.google.cloud.dialogflow.cx.v3beta1.TestError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder addErrors( + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder addErrors( + int index, com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder addAllErrors( + java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.TestError> values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder getErrorsBuilder(int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getErrorsOrBuilder(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder addErrorsBuilder() { + return getErrorsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.TestError.getDefaultInstance()); + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder addErrorsBuilder(int index) { + return getErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.TestError.getDefaultInstance()); + } + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder> + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.TestError, + com.google.cloud.dialogflow.cx.v3beta1.TestError.Builder, + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder>( + errors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<RunContinuousTestMetadata> PARSER = + new com.google.protobuf.AbstractParser<RunContinuousTestMetadata>() { + @java.lang.Override + public RunContinuousTestMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunContinuousTestMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<RunContinuousTestMetadata> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<RunContinuousTestMetadata> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadataOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadataOrBuilder.java new file mode 100644 index 000000000..60663c3aa --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadataOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface RunContinuousTestMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + java.util.List<com.google.cloud.dialogflow.cx.v3beta1.TestError> getErrorsList(); + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + com.google.cloud.dialogflow.cx.v3beta1.TestError getErrors(int index); + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + int getErrorsCount(); + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder> + getErrorsOrBuilderList(); + /** + * + * + * <pre> + * The test errors. + * </pre> + * + * <code>repeated .google.cloud.dialogflow.cx.v3beta1.TestError errors = 1;</code> + */ + com.google.cloud.dialogflow.cx.v3beta1.TestErrorOrBuilder getErrorsOrBuilder(int index); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequest.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequest.java new file mode 100644 index 000000000..24a9083e9 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + * <pre> + * The request message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest]. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} + */ +public final class RunContinuousTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) + RunContinuousTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunContinuousTestRequest.newBuilder() to construct. + private RunContinuousTestRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + + private RunContinuousTestRequest() { + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunContinuousTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunContinuousTestRequest( + 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; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.Builder.class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object environment_; + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @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; + } + } + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @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; + } + } + + 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_); + } + 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_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest 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; + } + /** + * + * + * <pre> + * The request message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest]. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest(this); + result.environment_ = environment_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.getDefaultInstance()) + return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @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; + } + } + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @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; + } + } + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @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; + } + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<RunContinuousTestRequest> PARSER = + new com.google.protobuf.AbstractParser<RunContinuousTestRequest>() { + @java.lang.Override + public RunContinuousTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunContinuousTestRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<RunContinuousTestRequest> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<RunContinuousTestRequest> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequestOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequestOrBuilder.java new file mode 100644 index 000000000..ce282cacc --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface RunContinuousTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + * <pre> + * Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/environments/<Environment ID>`. + * </pre> + * + * <code> + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * </code> + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponse.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponse.java new file mode 100644 index 000000000..f8a8aaa26 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponse.java @@ -0,0 +1,762 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + * <pre> + * The response message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest]. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse} + */ +public final class RunContinuousTestResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) + RunContinuousTestResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunContinuousTestResponse.newBuilder() to construct. + private RunContinuousTestResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + + private RunContinuousTestResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunContinuousTestResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunContinuousTestResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder subBuilder = null; + if (continuousTestResult_ != null) { + subBuilder = continuousTestResult_.toBuilder(); + } + continuousTestResult_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(continuousTestResult_); + continuousTestResult_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.Builder.class); + } + + public static final int CONTINUOUS_TEST_RESULT_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuousTestResult_; + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + * + * @return Whether the continuousTestResult field is set. + */ + @java.lang.Override + public boolean hasContinuousTestResult() { + return continuousTestResult_ != null; + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + * + * @return The continuousTestResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getContinuousTestResult() { + return continuousTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.getDefaultInstance() + : continuousTestResult_; + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder + getContinuousTestResultOrBuilder() { + return getContinuousTestResult(); + } + + 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 (continuousTestResult_ != null) { + output.writeMessage(1, getContinuousTestResult()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (continuousTestResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContinuousTestResult()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) obj; + + if (hasContinuousTestResult() != other.hasContinuousTestResult()) return false; + if (hasContinuousTestResult()) { + if (!getContinuousTestResult().equals(other.getContinuousTestResult())) 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 (hasContinuousTestResult()) { + hash = (37 * hash) + CONTINUOUS_TEST_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getContinuousTestResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse 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; + } + /** + * + * + * <pre> + * The response message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest]. + * </pre> + * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.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 (continuousTestResultBuilder_ == null) { + continuousTestResult_ = null; + } else { + continuousTestResult_ = null; + continuousTestResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_RunContinuousTestResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse(this); + if (continuousTestResultBuilder_ == null) { + result.continuousTestResult_ = continuousTestResult_; + } else { + result.continuousTestResult_ = continuousTestResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.getDefaultInstance()) + return this; + if (other.hasContinuousTestResult()) { + mergeContinuousTestResult(other.getContinuousTestResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuousTestResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder> + continuousTestResultBuilder_; + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + * + * @return Whether the continuousTestResult field is set. + */ + public boolean hasContinuousTestResult() { + return continuousTestResultBuilder_ != null || continuousTestResult_ != null; + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + * + * @return The continuousTestResult. + */ + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getContinuousTestResult() { + if (continuousTestResultBuilder_ == null) { + return continuousTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.getDefaultInstance() + : continuousTestResult_; + } else { + return continuousTestResultBuilder_.getMessage(); + } + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + public Builder setContinuousTestResult( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult value) { + if (continuousTestResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + continuousTestResult_ = value; + onChanged(); + } else { + continuousTestResultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + public Builder setContinuousTestResult( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder builderForValue) { + if (continuousTestResultBuilder_ == null) { + continuousTestResult_ = builderForValue.build(); + onChanged(); + } else { + continuousTestResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + public Builder mergeContinuousTestResult( + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult value) { + if (continuousTestResultBuilder_ == null) { + if (continuousTestResult_ != null) { + continuousTestResult_ = + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.newBuilder( + continuousTestResult_) + .mergeFrom(value) + .buildPartial(); + } else { + continuousTestResult_ = value; + } + onChanged(); + } else { + continuousTestResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + public Builder clearContinuousTestResult() { + if (continuousTestResultBuilder_ == null) { + continuousTestResult_ = null; + onChanged(); + } else { + continuousTestResult_ = null; + continuousTestResultBuilder_ = null; + } + + return this; + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder + getContinuousTestResultBuilder() { + + onChanged(); + return getContinuousTestResultFieldBuilder().getBuilder(); + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + public com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder + getContinuousTestResultOrBuilder() { + if (continuousTestResultBuilder_ != null) { + return continuousTestResultBuilder_.getMessageOrBuilder(); + } else { + return continuousTestResult_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.getDefaultInstance() + : continuousTestResult_; + } + } + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder> + getContinuousTestResultFieldBuilder() { + if (continuousTestResultBuilder_ == null) { + continuousTestResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder>( + getContinuousTestResult(), getParentForChildren(), isClean()); + continuousTestResult_ = null; + } + return continuousTestResultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<RunContinuousTestResponse> PARSER = + new com.google.protobuf.AbstractParser<RunContinuousTestResponse>() { + @java.lang.Override + public RunContinuousTestResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunContinuousTestResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<RunContinuousTestResponse> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<RunContinuousTestResponse> getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponseOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponseOrBuilder.java new file mode 100644 index 000000000..80468a50d --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponseOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface RunContinuousTestResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + * + * @return Whether the continuousTestResult field is set. + */ + boolean hasContinuousTestResult(); + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + * + * @return The continuousTestResult. + */ + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult getContinuousTestResult(); + /** + * + * + * <pre> + * The result for a continuous test run. + * </pre> + * + * <code>.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult continuous_test_result = 1; + * </code> + */ + com.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResultOrBuilder + getContinuousTestResultOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto index 33fd9e816..837551df9 100644 --- a/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto +++ b/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/environment.proto @@ -98,6 +98,26 @@ service Environments { }; option (google.api.method_signature) = "name"; } + + // Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + rpc RunContinuousTest(RunContinuousTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{environment=projects/*/locations/*/agents/*/environments/*}:runContinuousTest" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "RunContinuousTestResponse" + metadata_type: "RunContinuousTestMetadata" + }; + } + + // Fetches a list of continuous test results for a given environment. + rpc ListContinuousTestResults(ListContinuousTestResultsRequest) returns (ListContinuousTestResultsResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/continuousTestResults" + }; + option (google.api.method_signature) = "parent"; + } } // Represents an environment for an agent. You can create multiple versions @@ -261,3 +281,96 @@ message LookupEnvironmentHistoryResponse { // results in the list. string next_page_token = 2; } + +// Represents a result from running a test case in an agent environment. +message ContinuousTestResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/ContinuousTestResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}" + }; + + // The overall result for a continuous test run in an agent environment. + enum AggregatedTestResult { + // Not specified. Should never be used. + AGGREGATED_TEST_RESULT_UNSPECIFIED = 0; + + // All the tests passed. + PASSED = 1; + + // At least one test did not pass. + FAILED = 2; + } + + // The resource name for the continuous test result. Format: + // `projects/<Project ID>/locations/<Location ID>/agents/<Agent + // ID>/environments/<Environment + // ID>/continuousTestResults/<ContinuousTestResult ID>`. + string name = 1; + + // The result of this continuous test run, i.e. whether all the tests in this + // continuous test run pass or not. + AggregatedTestResult result = 2; + + // A list of individual test case results names in this continuous test run. + repeated string test_case_results = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCaseResult" + }]; + + // Time when the continuous testing run starts. + google.protobuf.Timestamp run_time = 4; +} + +// The request message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest]. +message RunContinuousTestRequest { + // Required. 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) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; +} + +// The response message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest]. +message RunContinuousTestResponse { + // The result for a continuous test run. + ContinuousTestResult continuous_test_result = 1; +} + +// Metadata returned for the [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest] long running +// operation. +message RunContinuousTestMetadata { + // The test errors. + repeated TestError errors = 1; +} + +// The request message for [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResults]. +message ListContinuousTestResultsRequest { + // Required. The environment to list results 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) = { + child_type: "dialogflow.googleapis.com/ContinuousTestResult" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Environments.ListTestCaseResults][]. +message ListContinuousTestResultsResponse { + // The list of continuous test results. + repeated ContinuousTestResult continuous_test_results = 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; +} diff --git a/synth.metadata b/synth.metadata index 03315fcaf..8a1886531 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,23 +4,23 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-dialogflow-cx.git", - "sha": "f42002ce744e96c80902a4476806496d155652a2" + "sha": "684faba2ec4325b45a9cfc592c9115626b0003af" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c27d0463cc0097d7a64a7b108aca659df00d2e06", - "internalRef": "374474736" + "sha": "31313cb7f81b4323d25fb0a320e688a7c6c22502", + "internalRef": "374994233" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c27d0463cc0097d7a64a7b108aca659df00d2e06", - "internalRef": "374474736" + "sha": "31313cb7f81b4323d25fb0a320e688a7c6c22502", + "internalRef": "374994233" } }, { @@ -841,6 +841,9 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponse.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CalculateCoverageResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResult.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultName.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ContinuousTestResultOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurn.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ConversationTurnOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateAgentRequest.java", @@ -1004,6 +1007,10 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsResponse.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListAgentsResponseOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListContinuousTestResultsResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEntityTypesRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEntityTypesRequestOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListEntityTypesResponse.java", @@ -1093,6 +1100,12 @@ "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RestoreAgentRequest.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RestoreAgentRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadata.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestMetadataOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequest.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestRequestOrBuilder.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponse.java", + "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunContinuousTestResponseOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadata.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseMetadataOrBuilder.java", "proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/RunTestCaseRequest.java",